Source

hs2010 / graphs.gnuplot

# -*- fundamental -*-

set term epslatex color size 3.2in,1.6in
set ylabel 'Execution time (secs)'
set xlabel 'Thousands of running threads'
set style fill solid 0.3
set style data linespoints
set output 'old.tex'
set key top left reverse Left
plot 'old.dat' using 1:2 notitle

set output 'old-new.tex'
set key top right reverse Left
set log y
plot 'old-new.dat' using 1:3 title 'old', \
     '' using ($1+0.5):2 title 'new'

unset log y
set key top left reverse Left
set xrange [0:3000]
set output 'new.tex'
set xlabel ''
plot 'new.dat' using 1:2 notitle

set term epslatex color size 3.2in,1.8in
set key top left reverse Left
set xrange [*:*]
set output 'cores.tex'
set xlabel 'Thousands of running threads'
set style data linespoints
plot 'new1.dat' using 1:4 title '1 core', \
     'new2.dat' using 1:4 title '2 cores', \
     'new3.dat' using 1:4 title '3', \
     'new4.dat' using 1:4 title '4'

set term epslatex color size 3.2in,2.5in
set ytics 0,5000
set key top center outside
set yrange [0:*]
set xrange [1:70000]
set output 'http-rps.tex'
set log x
set xlabel 'Concurrent active clients'
set ylabel 'Requests per second'
plot 'new-pong-server.dat' using 1:3 title '\texttt{pong} (new)', \
     'old-pong-server.dat' using 1:3 title '\texttt{pong} (old)', \
     'new-static-http-4k.dat' using 1:3 title '\texttt{file} (new)', \
     'old-static-http-4k.dat' using 1:3 title '\texttt{file} (old)'

set term epslatex color size 3.2in,2.3in
set output 'idle-rps.tex'
set xlabel 'Concurrent idle clients'
set yrange [0:20000]
plot 'new-dead-pong.dat' using 1:3 title '\texttt{pong} (new, \texttt{epoll})', \
     'poll-dead-pong.dat' using 1:3 title '\texttt{pong} (new, \texttt{poll})', \
     'old-dead-pong.dat' using 1:3 title '\texttt{pong} (old)'
     

set term epslatex color size 3.2in,1.6in
set output 'http-lat.tex'
set log
set ytics autofreq
set yrange [*:*]
set xlabel ''
set ylabel 'Request latency (ms)'
set key off
plot 'new-pong-server.dat' using 1:7 title '\texttt{pong} (new)', \
     'old-pong-server.dat' using 1:7 title '\texttt{pong} (old)', \
     'new-static-http-4k.dat' using 1:7 title '\texttt{file} (new)', \
     'old-static-http-4k.dat' using 1:7 title '\texttt{file} (old)'

set term epslatex color size 3.2in,1.6in
set output 'idle-lat.tex'
set xlabel ''
set yrange [*:*]
set key off
plot 'new-dead-pong.dat' using 1:7 title '\texttt{pong} (new, \texttt{epoll})', \
     'poll-dead-pong.dat' using 1:7 title '\texttt{pong} (new, \texttt{poll})', \
     'old-dead-pong.dat' using 1:7 title '\texttt{pong} (old)'