2 # Copyright Arvid Norberg 2008. Use, modification and distribution is
3 # subject to the Boost Software License, Version 1.0. (See accompanying
4 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ignore
= ['download rate', 'disk block buffers']
10 keys
= ['upload rate', 'download rate', 'downloading torrents', \
11 'seeding torrents', 'peers', 'connecting peers', 'disk block buffers']
13 axes
= ['x1y2', 'x1y2', 'x1y1', 'x1y1', 'x1y1', 'x1y1', 'x1y1']
15 out
= open('session_stats.gnuplot', 'wb')
16 print >>out
, "set term png size 1200,700"
17 print >>out
, 'set output "session_stats.png"'
18 print >>out
, 'set xrange [0:*]'
19 print >>out
, 'set xlabel "time (s)"'
20 print >>out
, 'set ylabel "number"'
21 print >>out
, 'set y2label "Rate (B/s)"'
22 print >>out
, 'set y2range [0:*]'
23 print >>out
, 'set y2tics 20000'
24 print >>out
, "set style data lines"
25 print >>out
, "set key box"
32 print >>out
, ' "%s" using 1:%d title "%s" axes %s with steps,' % (sys
.argv
[1], column
, k
, axes
[column
-2]),
37 os
.system('gnuplot session_stats.gnuplot');