Last active
August 29, 2015 14:20
-
-
Save j1n6/845f16b89682bbf91647 to your computer and use it in GitHub Desktop.
apache bench & gunplot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab -n 400 -c 10 -g "perf-data.tsv" "http://example.com/" | |
gnuplot <<- EOF | |
# Let's output to a jpeg file | |
set terminal png size 1000,600 | |
# This sets the aspect ratio of the graph | |
set size 1, 1 | |
# The graph title | |
set title "Benchmark testing" | |
# Where to place the legend/key | |
set key left top | |
# Draw gridlines oriented on the y axis | |
set grid y | |
# Specify that the x-series data is time data | |
set xdata time | |
# Specify the *input* format of the time data | |
set timefmt "%s" | |
# Specify the *output* format for the x-axis tick labels | |
set format x "%S" | |
# Label the x-axis | |
set xlabel 'seconds' | |
# Label the y-axis | |
set ylabel "response time (ms)" | |
# Tell gnuplot to use tabs as the delimiter instead of spaces (default) | |
set datafile separator '\t' | |
# | |
set output "perf-data.png" | |
# Plot the data | |
plot "perf-data.tsv" every ::2 using 2:5 title 'response time' with points | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment