Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement stats #9

Open
juliangruber opened this issue Sep 21, 2016 · 4 comments
Open

implement stats #9

juliangruber opened this issue Sep 21, 2016 · 4 comments

Comments

@juliangruber
Copy link
Owner

@mafintosh @joehand

Let's implement here what dat-js has been doing manually. I created issues for all the stat fields to support, with implementation ideas where I had some.

It would be great if we could all collaborate on getting those nailed, as reliable stats behavior is required for all our tools.

Feel free to ignore the initial implementation of some of the stats in this repo.

@juliangruber
Copy link
Owner Author

The interface I thought of is

const stats = Stats(archive)
stats.on('update', stats => console.log(stats))
stats.on('update:filesProgress', progress => console.log(progress))

@okdistribute
Copy link

yes!

@joehand
Copy link
Collaborator

joehand commented Sep 21, 2016

Sweet! Interface looks good.

@pfrazee
Copy link

pfrazee commented Sep 21, 2016

Yeah that's all looking good to me.

I have code, right now, where I'm converting the file-listing into a tree structure, and then calculating the blocks progress for each entry. It percolates up the tree, so that directories reflect their combined children progress. I don't think that needs to be in here, but I thought I'd mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants