Created
April 27, 2017 00:00
-
-
Save roblogic/3d98db838e385c817efcf248a9557385 to your computer and use it in GitHub Desktop.
Parse Jmeter output, get performance stats from `stats.sh` and `percentiles.sh`
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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Superseded by new script jstats2