Created
April 1, 2021 17:11
-
-
Save ivan3bx/1a8375060b925391e7cc49376a7208f7 to your computer and use it in GitHub Desktop.
Plotting response time from Apache Bench..
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
# define output file as variable (with default) | |
if (!exists("outfile")) outfile='output.png' | |
# define input file as variable (with default) | |
if (!exists("infile")) infile='values.tsv' | |
# set output format & size | |
set terminal png size 1024,768 crop | |
# set output filename (see 'outfile' variable) | |
set output outfile | |
# graph title | |
set title "My results" | |
# set aspect ratio | |
set size 1,0.75 | |
# y-axis (grid + label) | |
set grid y | |
set ylabel "Response time \(ms\)" | |
# x-axis (label only) | |
set xlabel "Time" | |
# y-axis range | |
set yrange [0:500] | |
# x-series will base off time | |
set xdata time | |
# x-series time *input* format (seconds) | |
set timefmt "%s" | |
# x-series time *output* format for tic marks | |
set format x "" | |
# point size | |
set pointsize 2 | |
# plot data (using 'infile' variable) | |
# ::2 will skip the header (line 1) | |
plot "/work/".infile every ::2 using 6:9 smooth sbezier with lines title "x" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Data was generated w/
ab -c 1 -n 5000 -t 10 -g input.tsv http://127.0.0.1:7777/