diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-04-15 11:02:31 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-04-15 11:02:31 +0000 |
| commit | bad8a25ebd0c5a4faa9da8b006bd9162f81df0da (patch) | |
| tree | 3e3b28194a115a0c0ca4f73880e46f2b62858b5f /java/perftests/etc/scripts/extractThroughputResults.sh | |
| parent | 6dd5a628ce4ae2e6c306d7e21fb45ceceee20cad (diff) | |
| download | qpid-python-bad8a25ebd0c5a4faa9da8b006bd9162f81df0da.tar.gz | |
QPID-1810 : Added perftest processing scripts
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@765134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/perftests/etc/scripts/extractThroughputResults.sh')
| -rwxr-xr-x | java/perftests/etc/scripts/extractThroughputResults.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/perftests/etc/scripts/extractThroughputResults.sh b/java/perftests/etc/scripts/extractThroughputResults.sh new file mode 100755 index 0000000000..e85286ea3e --- /dev/null +++ b/java/perftests/etc/scripts/extractThroughputResults.sh @@ -0,0 +1,30 @@ +#!/bin/bash +x +# +# Process a given directory (defaults to '.') and provides the throughput results as +# reported by the tests. +# +# if a second argument of -n is provided then it will only list the number output for +# easy copy/paste +# + +if [ $# == 0 ] ; then + dir=. +else + dir=$1 +fi + +numeric=0 +if [ "$dir" == "-n" ] ; then + numeric=1 + dir=. +fi + +if [ "$2" == "-n" ] ; then + numeric=1 +fi + +if [ $numeric == 1 ] ; then + grep 'Total Tests:' $dir/*Qpid* | sed -e 's/^.*\/\([A-Z]*-[A-Z][A-Z]-Qpid-01\).*Size Throughput:, \([0-9.]*\).*$/\1, \2/' | sed -e 's/\.\([0-9][0-9][0-9]\)/\1\./' | sed -e 's/, 0/, /' | awk '{print $2}' +else + grep 'Total Tests:' $dir/*Qpid* | sed -e 's/^.*\/\([A-Z]*-[A-Z][A-Z]-Qpid-01\).*Size Throughput:, \([0-9.]*\).*$/\1, \2/' | sed -e 's/\.\([0-9][0-9][0-9]\)/\1\./' | sed -e 's/, 0/, /' +fi |
