summaryrefslogtreecommitdiff
path: root/qpid/java/perftests/bin/processing/process.sh
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/perftests/bin/processing/process.sh')
-rwxr-xr-xqpid/java/perftests/bin/processing/process.sh84
1 files changed, 82 insertions, 2 deletions
diff --git a/qpid/java/perftests/bin/processing/process.sh b/qpid/java/perftests/bin/processing/process.sh
index cb2181622c..f8e13cd5cd 100755
--- a/qpid/java/perftests/bin/processing/process.sh
+++ b/qpid/java/perftests/bin/processing/process.sh
@@ -51,7 +51,11 @@ processCMSGCFile()
cat parnew.gc.log | awk '{print $8}' | cut -d 'K' -f 2 | cut -d '>' -f 2 > HEAP_POST_GC.log
cat parnew.gc.log | awk '{print $1}' | cut -d ':' -f 1 > GC_TIME.log
-
+ calculateStats "MEM_PRE" HEAP_PRE_GC.log
+ calculateStats "MEM_POST" HEAP_POST_GC.log
+ calcualteStatsBC "GC_FREQ" GC_FREQ.log
+
+
# Calculate ParNew GC Cumulative total
cat parnew.gc.log |awk '{sum=sum+$6; print $6, sum}' > GC_DUR.log
# Give a count of GC occurances
@@ -129,6 +133,82 @@ processG1GCFile()
}
+calculateStatsBC()
+{
+label=$1
+file=$2
+# Calculate GC Frequencies
+ prevFreq=0
+ countFreq=0
+ gcFreqTotal=0
+ minFreq=99999999
+ maxFreq=0
+
+ echo "" > GC_FREQ.log
+ for time in `cat $file` ; do
+ if [ $prevFreq == 0 ] ; then
+ prevFreq=$time
+ else
+ freq=`echo $time - $prevFreq | bc`
+ echo $freq >> GC_FREQ.log
+
+ prevFreq=$time
+ gcFreqTotal=`echo $gcFreqTotal + $freq | bc`
+ countFreq=$[$countFreq + 1]
+
+ if [ `echo "$freq > $maxFreq " | bc` == 1 ] ; then
+ maxFreq=$freq
+ fi
+
+ if [ `echo "$freq < $minFreq " | bc ` == 1 ] ; then
+ minFreq=$freq
+ fi
+ fi
+ 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
+}
+
+calculateStats()
+{
+label=$1
+file=$2
+
+# Calculate GC Frequencies
+ count=0
+ gcTotal=0
+ min=0
+ max=0
+
+
+ for item in `cat $file` ; do
+ if [ $min == 0 ] ; then
+ min=$item
+ fi
+
+ gcTotal=$[$gcTotal + $item]
+ count=$[$count + 1]
+
+ if [ $item -gt $max ] ; then
+ max=$item
+ fi
+
+ if [ $item -lt $min ] ; then
+ min=$item
+ fi
+ 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"
+}
+
#
# Take an input file ($1) of lines
# <value><K|M>
@@ -282,4 +362,4 @@ set format x "%H:%M"
plot "CPU.data" using 1:2 with lines
EOGNUPLOT
-popd &> /dev/null
+popd &> /dev/null \ No newline at end of file