Skip to content

Instantly share code, notes, and snippets.

@roblogic
Last active May 26, 2020 03:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblogic/b5d018949eef092675153745cf4cb5b5 to your computer and use it in GitHub Desktop.
Save roblogic/b5d018949eef092675153745cf4cb5b5 to your computer and use it in GitHub Desktop.
How to get response time distributions from Jmeter data, and plot the data to compare performance.

Comparing Response Distributions with Gnuplot

Bash script to get Response data

Analyse Jmeter CSV output using jstats2. The response values are in tmp files. Get frequency of response times into .dat files, using uniq and awk per below...

$ uniq -c /tmp/jstats2.1hASD | awk '{print $2, $1}' | sort -n > FPE10-50k-24May-freq.dat
$ uniq -c /tmp/jstats2.lJAVX | awk '{print $2, $1}' | sort -n > FPE11a-GetJourneys-freq.dat
$ uniq -c /tmp/jstats2.lEV2M | awk '{print $2, $1}' | sort -n > FPE11b-JourneyKnown-freq.dat

Gnuplot Example

Plot 3 distributions

set xrange [0:150]
set yrange [0:1200]
set xlabel "response time (ms)"
set ylabel "frequency (count)"
set title "FPEligibility response distributions"
set xtics 10
set grid
set style fill transparent solid 0.35
plot 'FPE10-50k-24May-freq.dat' with filledcurves, 'FPE11a-GetJourneys-freq.dat' with filledcurves, 'FPE11b-JourneyKnown-freq.dat' with filledcurves

FPE-multiplot.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment