Thursday, June 14, 2012

Gnuplot


Recently I worked on measuring the performance of a RPC protocol vs. a restful HTTP protocol. I checked out gnuplot to chart my results. It comes pretty handy.

I track the server side performance in logs, and used python to parse the data into two columns, representing the size of the data vs response time.  Below is the scratch of the gnuplot commands used to generate trending chart.

set term gif
set output "perf.gif"scatch
set multiplot
set xrange [0:60000]
set yrange [0:200]
set xlabel "Response time in milliseconds"
set ylabel "# of C"
set label 1 at first 30000.0, 120.0 "rpc"
set label 2 at first 30000.0, 10.0  "restful"
set title "performance comparison"
plot "data1.txt" notitle w points pt 5
plot "data2.txt" notitle w points pt 5 linecolor rgb "blue"
unset multiplot
set output

Keep gnuplot commands into a file and run
gnuplot < command

That makes it easier to see trending charts quickly.

No comments:

Post a Comment