forked from premiere/premiere-libtorrent
fixes to dht rtt parser
This commit is contained in:
parent
d60a5399bf
commit
b48049bb90
|
@ -3,8 +3,8 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
quantize = 200
|
||||
max_rtt = 10000
|
||||
quantize = 100
|
||||
max_rtt = 5000
|
||||
|
||||
f = open(sys.argv[1])
|
||||
distribution = {}
|
||||
|
@ -15,7 +15,7 @@ for i in range(0, max_rtt, quantize):
|
|||
|
||||
for line in f:
|
||||
time = int(line.split('\t')[1])
|
||||
if (time < 0 or time > max_rtt): continue
|
||||
if (time < 0 or time > max_rtt - quantize): continue
|
||||
num_messages += 1
|
||||
time /= quantize
|
||||
time *= quantize
|
||||
|
|
Loading…
Reference in New Issue