dat-ecosystem-archive / dat-node

Node module for creating dat compatible tools on file systems [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
https://dat.foundation
MIT License
503 stars 64 forks source link

stats for selective downloads #166

Open joehand opened 6 years ago

joehand commented 6 years ago

The stats should track how much data you've requested, along with the total. This will allow us to show progress for selective downloads:

(in hypercore) might be as easy to making ._selections -> .selections

Also, having total data for inflightRequests may also be useful here:

mafintosh> jhand: each peer object has an inflightRequests array, https://github.com/mafintosh/hypercore/blob/master/lib/replicate.js#L53
mafintosh> jhand: we can add a getter on the feed instance that adds the legnth of all those together
okdistribute commented 6 years ago

Yeah, it'd be awesome if we didn't have to track this up front but relied on hypercore's replication to know how many files are being requested!