summaryrefslogtreecommitdiffstats
path: root/perf-framework/calc_best
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-02-18 10:36:44 -0800
committerGerrit Code Review <root@dev.gluster.com>2012-02-18 10:36:44 -0800
commit6ed4ac470d7aaddd05ce179bc304ef688f5553aa (patch)
tree095187e0649d88c226563f41f19a6fba0b4a156e /perf-framework/calc_best
parent4de9a1a4df6667a59dd36148167d7ea188c69831 (diff)
parentdb468693ef5faa294d9bc3cd3c5d70c0d99d488b (diff)
Merge "Adding the performance framework to the qa repo"
Diffstat (limited to 'perf-framework/calc_best')
-rwxr-xr-xperf-framework/calc_best31
1 files changed, 31 insertions, 0 deletions
diff --git a/perf-framework/calc_best b/perf-framework/calc_best
new file mode 100755
index 0000000..fed9fda
--- /dev/null
+++ b/perf-framework/calc_best
@@ -0,0 +1,31 @@
+#!/bin/bash -ue
+
+egrep_patt=""
+
+for run in "$@"
+do
+ egrep_patt+="^`echo run$run\|`"
+ PERFLOG="log_repo/run$run/client/perf-test.log"
+ if [ $run -lt 9 ]
+ then
+ run="0$run"
+ fi
+ echo "RUN$run " > /tmp/run$run.$$
+ echo "------------" >> /tmp/run$run.$$
+ for op in `cat ops`
+ do
+ printf "%-6s" `grep -w ^$op $PERFLOG | awk '{print $2}'| cut -f1 -d'.' | cat -n | sort -n -k2 | head -1` >> /tmp/run$run.$$
+ printf "\n" >> /tmp/run$run.$$
+ done
+done
+egrep_patt+="^zzz"
+
+echo ""
+egrep -w "$egrep_patt" log_repo/runlog
+echo ""
+echo "Operations " > /tmp/tmp_ops.$$
+echo "-------------------------" >> /tmp/tmp_ops.$$
+awk '{ printf("%-25s\n", $0) }' ops >> /tmp/tmp_ops.$$
+
+paste /tmp/tmp_ops.$$ /tmp/run*.$$
+rm /tmp/run*.$$ /tmp/tmp_ops.$$