summaryrefslogtreecommitdiff
path: root/qpid/java/perftests
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-04-12 15:43:13 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-04-12 15:43:13 +0000
commitbca42ad2daf61898e6d3ec53795618c04df212c2 (patch)
tree0b75605f2862d2f91b1c5c3fd71363d475648ae5 /qpid/java/perftests
parent37860ced5c1268d810b67fa88c9bc004d56d0036 (diff)
downloadqpid-python-bca42ad2daf61898e6d3ec53795618c04df212c2.tar.gz
QPID-2425 : Update to automate the gathering of throughput min/max/avg.
Merge 0.5.x-dev rev 917585 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@933285 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests')
-rwxr-xr-xqpid/java/perftests/bin/processing/processTests.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/qpid/java/perftests/bin/processing/processTests.py b/qpid/java/perftests/bin/processing/processTests.py
index 745d9059d1..bb9efcc5a2 100755
--- a/qpid/java/perftests/bin/processing/processTests.py
+++ b/qpid/java/perftests/bin/processing/processTests.py
@@ -729,9 +729,12 @@ def createTestStatData(resultDir, testName):
# Keep track of the min/max sum and entries,.
minLatency=float(sys.maxint)
maxLatency=0.0
+ minThroughput=float(sys.maxint)
+ maxThroughput=0.0
entries=0
sumLatency=0.0
+ sumThroughput=0.0
#
# Open csv File
@@ -746,6 +749,7 @@ def createTestStatData(resultDir, testName):
# <Test> <TestName> <Thread> <Status> <Time> <Latency> <Concurrency> <Thread> <TestSize>
#org.apache.qpid.ping.PingAsyncTestPerf, testAsyncPingOk, Dispatcher-Channel-1, Pass, 209.074, 219.706, 0, 1, 10
LatencyIndex = 5
+ ThroughputIndex = 4
# The PingLatencyTestPerf test class just outputs the latency data.
if line.find("PingLatencyTestPerf") != -1:
@@ -754,6 +758,7 @@ def createTestStatData(resultDir, testName):
# <Test> <TestName> <Thread> <Status> <Time> <Latency> <Concurrency> <Thread> <TestSize>
# org.apache.qpid.ping.PingLatencyTestPerf, testPingLatency, Dispatcher-Channel-1, Pass, 397.05502, 0, 2, 1000
LatencyIndex = 4
+ ThroughputIndex = -1
# Only process the test lines that have 'org.apache.qpid.ping', i.e. skip header and footer.
@@ -765,7 +770,7 @@ def createTestStatData(resultDir, testName):
entries = entries + 1
# Record Metrics
- # Record Lateny data
+ # Record Latency data
latency = float(data[LatencyIndex])
if (latency < minLatency):
minLatency = latency
@@ -775,7 +780,18 @@ def createTestStatData(resultDir, testName):
sumLatency = sumLatency + latency
+ if (ThroughputIndex != -1):
+ # Record Latency data
+ throughput = float(data[ThroughputIndex])
+ if (throughput < minThroughput):
+ minThroughput = throughput
+
+ if (throughput > maxThroughput):
+ maxThroughput = throughput
+
+ sumThroughput = sumThroughput + throughput
+
csvFile.close()
# Output stats file
@@ -785,6 +801,12 @@ def createTestStatData(resultDir, testName):
output.write('\n')
output.write("LATENCY:"+str(minLatency)+"/"+str(maxLatency)+"/"+str(float(sumLatency)/float(entries)))
output.write('\n')
+
+ if (ThroughputIndex != -1):
+ # Output msgs/sec based on time for a batch of msgs
+ output.write("THROUGHPUT:"+str(float(1000)/maxThroughput)+"/"+str(float(1000)/minThroughput)+"/"+str(float(1000)/(float(sumThroughput)/float(entries))))
+ output.write('\n')
+
output.close
log("Generated stat data from test "+testName+" CSV file")