diff --git a/parse_session_stats.py b/parse_session_stats.py index 69910feaa..78fecdcdd 100755 --- a/parse_session_stats.py +++ b/parse_session_stats.py @@ -21,7 +21,7 @@ def gen_report(name, unit, lines, generation, log_file): os.mkdir(output_dir) except: pass - out = open('session_stats_%s.gnuplot' % name, 'wb') + out = open('session_stats.gnuplot', 'wb') print >>out, "set term png size 1200,700" print >>out, 'set output "%s"' % (os.path.join(output_dir, 'session_stats_%s_%04d.png' % (name, generation))) print >>out, 'set xrange [0:*]' @@ -48,7 +48,7 @@ def gen_report(name, unit, lines, generation, log_file): column = column + 1 print >>out, '' - print >>out, "set term png size 300,150" + print >>out, "set term png size 150,100" print >>out, 'set output "%s"' % (os.path.join(output_dir, 'session_stats_%s_%04d_thumb.png' % (name, generation))) print >>out, 'set key off' print >>out, 'unset tics' @@ -57,9 +57,13 @@ def gen_report(name, unit, lines, generation, log_file): print >>out, 'set xlabel ""' print >>out, 'set ylabel ""' print >>out, 'set y2label ""' + print >>out, 'set rmargin 0' + print >>out, 'set lmargin 0' + print >>out, 'set tmargin 0' + print >>out, 'set bmargin 0' print >>out, "replot" out.close() - os.system('gnuplot session_stats_%s.gnuplot 2>/dev/null' % name); + os.system('gnuplot session_stats.gnuplot 2>/dev/null'); sys.stdout.write('.') sys.stdout.flush() @@ -68,15 +72,17 @@ def gen_html(reports, generations): css = '''img { margin: 0} #head { display: block } + #graphs { white-space:nowrap; } h1 { line-height: 1; display: inline } h2 { line-height: 1; display: inline; font-size: 1em; font-weight: normal};''' print >>file, '
' % css for i in reports: - print >>file, '