Skip to content

Instantly share code, notes, and snippets.

@roblogic
Created April 27, 2017 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblogic/3d98db838e385c817efcf248a9557385 to your computer and use it in GitHub Desktop.
Save roblogic/3d98db838e385c817efcf248a9557385 to your computer and use it in GitHub Desktop.
Parse Jmeter output, get performance stats from `stats.sh` and `percentiles.sh`
#!/bin/sh
# Parse jmeter output and get various stats
usage="jstats.sh <jmeter-csv-output-file>"
[ $1 ] || { echo "$usage" ; exit 1 ; }
jfile=$1
ut1=`sed -n '2p' $jfile | cut -c -10`
ut2=`tail -1 $jfile | cut -c -10`
t1=`date --date="@$ut1" +"%y%m%d.%H%M%S"`
t2=`date --date="@$ut2" +"%y%m%d.%H%M%S"`
el=`echo "$ut2 - $ut1" | bc`
echo "started $t1 utime $ut1"
echo "stopped $t2 utime $ut2"
echo "duration $el seconds"
echo "_statistics_"
cut -d, -f2 $jfile | grep -v "elapsed" | ~/bin/stats.sh
cut -d, -f2 $jfile | grep -v "elapsed" | ~/bin/percentiles.sh
@roblogic
Copy link
Author

roblogic commented Jun 7, 2017

Superseded by new script jstats2

@roblogic
Copy link
Author

And that's also superseded by istats

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