diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:42:59 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:42:59 +0000 |
| commit | 37860ced5c1268d810b67fa88c9bc004d56d0036 (patch) | |
| tree | 135c7e9a362bd80fde16aec25dfb946022b6354e /qpid/java/perftests/bin/processing/process.sh | |
| parent | b1bffee58eeadcd846dd300fcb26ccf3e7250a10 (diff) | |
| download | qpid-python-37860ced5c1268d810b67fa88c9bc004d56d0036.tar.gz | |
QPID-2425 : Augment script to extract latency from csv file. Also updated processAll script to colate the statistics for the given run.
Merged from 0.5.x-dev rev 917482
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@933284 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/bin/processing/process.sh')
| -rwxr-xr-x | qpid/java/perftests/bin/processing/process.sh | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/qpid/java/perftests/bin/processing/process.sh b/qpid/java/perftests/bin/processing/process.sh index f8e13cd5cd..5e0adf1541 100755 --- a/qpid/java/perftests/bin/processing/process.sh +++ b/qpid/java/perftests/bin/processing/process.sh @@ -53,7 +53,7 @@ processCMSGCFile() calculateStats "MEM_PRE" HEAP_PRE_GC.log calculateStats "MEM_POST" HEAP_POST_GC.log - calcualteStatsBC "GC_FREQ" GC_FREQ.log + calculateStatsBC "GC_FREQ" GC_FREQ.log # Calculate ParNew GC Cumulative total @@ -136,7 +136,7 @@ processG1GCFile() calculateStatsBC() { label=$1 -file=$2 +statFile=$2 # Calculate GC Frequencies prevFreq=0 countFreq=0 @@ -145,7 +145,7 @@ file=$2 maxFreq=0 echo "" > GC_FREQ.log - for time in `cat $file` ; do + for time in `cat $statFile` ; do if [ $prevFreq == 0 ] ; then prevFreq=$time else @@ -167,15 +167,22 @@ file=$2 done # Extract Min/Max/Avg - echo "#type:min/max/avg" > $file.stats - avgFreq=`echo $gcFreqTotal / $countFreq | bc -l` - echo "$1:$minFreq/$maxFreq/$avgFreq" >> $file.stats + echo "#type:min/max/avg" > $statFile.stats + + if [ $countFreq != 0 ] ; then + avgFreq=`echo $gcFreqTotal / $countFreq | bc -l 2&> /dev/null` + echo "$label:$minFreq/$maxFreq/$avgFreq" >> $statFile.stats + echo "Done GC Freq Stat generation for $statFile" + else + echo "$label:-/-/-" >> $statFile.stats + echo "Unable to calculate GC Freq stats as no freq entries found." + fi } calculateStats() { label=$1 -file=$2 +statFile=$2 # Calculate GC Frequencies count=0 @@ -184,7 +191,7 @@ file=$2 max=0 - for item in `cat $file` ; do + for item in `cat $statFile` ; do if [ $min == 0 ] ; then min=$item fi @@ -202,11 +209,18 @@ file=$2 done # Extract Min/Max/Avg - echo "#type:min/max/avg" > $file.stats - avg=`echo $gcTotal / $count | bc -l` - - echo "$label:$min/$max/$avg" >> $file.stats - echo "Done Stat generation for $file" + echo "#type:min/max/avg" > $statFile.stats + + if [ $count != 0 ] ; then + avg=`echo $gcTotal / $count | bc -l` + + echo "$label:$min/$max/$avg" >> $statFile.stats + echo "Done $label Stat generation for $statFile" + else + echo "$label:-/-/-" >> $statFile.stats + echo "Unable to calculate $label stats as no entries found." + fi + } # @@ -287,6 +301,12 @@ else PLOT="\"GC.Dur.data\" with lines axis x1y1 ti \"G1 Young Time ($youngGCCount)\", " fi +# +# Colate Stats +# +echo -n "Colating stat Data : " +echo "#type:min/max/avg" > $file.statistics.txt +find .. -name "*stats" -exec grep -v "type" {} >> $file.statistics.txt \; # Prepare the plot command @@ -362,4 +382,7 @@ set format x "%H:%M" plot "CPU.data" using 1:2 with lines EOGNUPLOT +#" +# Pop out of $work directory. +# popd &> /dev/null
\ No newline at end of file |
