fixes bug where priorities where lost when force-rechecking.
[libtorrent.git] / parse_bandwidth_log.py
blob432cdb33e63bd72aebbe8a357af5cd32048eb8fb
1 import os, sys, time
3 keys = [['upload rate', 'x1y1', 6], ['history entries', 'x1y2', 10], ['queue', 'x1y2', 4]]
5 out = open('bandwidth.gnuplot', 'wb')
6 print >>out, "set term png size 1200,700"
7 print >>out, 'set output "bandwidth_manager.png"'
8 print >>out, 'set xrange [0:*]'
9 print >>out, 'set xlabel "time (ms)"'
10 print >>out, 'set ylabel "Rate (B/s)"'
11 print >>out, 'set ytics 10000'
12 print >>out, 'set y2label "number"'
13 print >>out, 'set y2range [0:*]'
14 #print >>out, "set style data lines"
15 print >>out, "set key box"
16 print >>out, 'plot',
17 for k, a, c in keys:
18 print >>out, ' "%s" using 1:%d title "%s" axes %s with steps,' % (sys.argv[1], c, k, a),
19 print >>out, 'x=0'
20 out.close()
22 os.system('gnuplot bandwidth.gnuplot');