From: Razvan Deaconescu Date: Tue, 21 Sep 2010 09:18:03 +0000 (+0200) Subject: next-share: fix peer logging speed print X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=c21f4f440d2b881463dbc82f1611c184dec22df0;p=cs-p2p-next.git next-share: fix peer logging speed print Print double decimal speed. Replace 1000 (int) with 1000.0 (float). --- diff --git a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py index a000f51..eddac2b 100644 --- a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py +++ b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py @@ -92,7 +92,7 @@ def state_callback(ds): for item in peerlist: print >>sys.stderr, \ '[ ip: %s, dl: %.2fKB/s, ul: %.2fKB/s ]' % \ - (item['ip'], item['downrate']/1000, item['uprate']/1000), + (item['ip'], item['downrate']/1000.0, item['uprate']/1000.0), print >>sys.stderr return (1.0, peer_logging)