forked from premiere/premiere-libtorrent
added graphing script for bandwidth manager log
This commit is contained in:
parent
56210c1687
commit
9304bd747c
|
@ -109,7 +109,7 @@ struct bandwidth_manager
|
||||||
{
|
{
|
||||||
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
|
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
|
||||||
if (log)
|
if (log)
|
||||||
m_log.open("bandwidth_limiter.log");
|
m_log.open("bandwidth_limiter.log", std::ios::trunc);
|
||||||
m_start = time_now();
|
m_start = time_now();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
import os, sys, time
|
||||||
|
|
||||||
|
keys = [['upload rate', 'x1y1', 6], ['history entries', 'x1y2', 10], ['queue', 'x1y2', 4]]
|
||||||
|
|
||||||
|
out = open('bandwidth.gnuplot', 'wb')
|
||||||
|
print >>out, "set term png size 1200,700"
|
||||||
|
print >>out, 'set output "bandwidth_manager.png"'
|
||||||
|
print >>out, 'set xrange [0:*]'
|
||||||
|
print >>out, 'set xlabel "time (ms)"'
|
||||||
|
print >>out, 'set ylabel "Rate (B/s)"'
|
||||||
|
print >>out, 'set ytics 10000'
|
||||||
|
print >>out, 'set y2label "number"'
|
||||||
|
print >>out, 'set y2range [0:*]'
|
||||||
|
#print >>out, "set style data lines"
|
||||||
|
print >>out, "set key box"
|
||||||
|
print >>out, 'plot',
|
||||||
|
for k, a, c in keys:
|
||||||
|
print >>out, ' "%s" using 1:%d title "%s" axes %s with steps,' % (sys.argv[1], c, k, a),
|
||||||
|
print >>out, 'x=0'
|
||||||
|
out.close()
|
||||||
|
|
||||||
|
os.system('gnuplot bandwidth.gnuplot');
|
||||||
|
|
Loading…
Reference in New Issue