Created
June 30, 2016 10:48
-
-
Save ykrkn/a8db9f1a63a36bd4918e4199fc534529 to your computer and use it in GitHub Desktop.
apache bench + gnuplot
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 -s 120 -k -p post.json -T application/json -c 1 -n 1000 -g out.dat http://localhost:8080/api/datas/ZZZ | |
gnuplot plot.p | |
plot.p | |
# Output to a jpeg file | |
set terminal jpeg size 1280,720 | |
# Set the aspect ratio of the graph | |
set size 1, 1 | |
# The file to write to | |
set output "timeseries.jpg" | |
# 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' | |
# Plot the data | |
plot "out.dat" every ::2 using 2:5 title 'response time' with points |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment