Skip to content

Instantly share code, notes, and snippets.

@quiver
Last active August 22, 2016 08:50
Show Gist options
  • Save quiver/8383823 to your computer and use it in GitHub Desktop.
Save quiver/8383823 to your computer and use it in GitHub Desktop.
# http://www.kutukupret.com/2011/05/10/graphing-apachebench-results-using-gnuplot/
# collect data
# $ ab -n 100 -c 4 -g imagemagick.tsv url
# $ ab -n 100 -c 4 -g gd.tsv url
# $ ab -n 100 -c 4 -g imlib2.tsv url
# plot data
# $ gnuplot template.p
# output as png image
set terminal png
# save file to "benchmark.png"
set output "benchmark.png"
# graph a title
#set title "ab -n 100 -c 4"
set title "nginx ngx_small_light(ImageMagick vs gd vs imlib2)"
# nicer aspect ratio for image size
set size 1,0.7
# y-axis grid
set grid y
# x-axis label
set xlabel "request"
# y-axis label
set ylabel "response time (ms)"
# plot data from "gd.tsv" and "imagemagick.tsv" and "mlib2.tsv" using column 9 with smooth sbezier lines
plot "gd.tsv" using 9 smooth sbezier with lines title "gd:", \
"imagemagick.tsv" using 9 smooth sbezier with lines title "imagemagick:", \
"imlib2.tsv" using 9 smooth sbezier with lines title "imlib2:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment