Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAstro <astro@spaceboyz.net>2014-11-22 04:39:09 +0300
committerAstro <astro@spaceboyz.net>2014-11-22 04:39:09 +0300
commit37b7251657acd3cee57ff36ad660c70a0ccfa707 (patch)
treeeec82d43487d3e4d7cdd8997d33094b2a2f65142 /bin
parent3a3d661499e79490b906cfe44ad0bee7c3d07afd (diff)
display requests per wire
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index b7bb649..d3a6bdb 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -386,10 +386,14 @@ function onReady () {
wires.every(function (wire) {
var tags = []
if (wire.peerChoking) tags.push('choked')
+ var reqStats = wire.requests.map(function(req) {
+ return req.piece;
+ })
clivas.line(
'{25+magenta:' + wire.remoteAddress + '} {10:'+bytes(wire.downloaded)+'} ' +
'{10+cyan:' + bytes(wire.downloadSpeed()) + '/s} ' +
- '{15+grey:' + tags.join(', ') + '}'
+ '{15+grey:' + tags.join(', ') + '}' +
+ '{15+cyan:' + reqStats.join(' ') + '}'
)
peerslisted++
return linesremaining - peerslisted > 4