diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:43:13 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2010-04-12 15:43:13 +0000 |
| commit | 478c77e8f2e6f69d3efa8252b0adb255ab7aa331 (patch) | |
| tree | 101953d076c2959a12c13cdba27dc2133b14a991 /java/perftests/bin/processing | |
| parent | 0c744d5c7a79d0d4444c9eb23ef4c4f4f0fe9e66 (diff) | |
| download | qpid-python-478c77e8f2e6f69d3efa8252b0adb255ab7aa331.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/qpid@933285 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/perftests/bin/processing')
| -rwxr-xr-x | java/perftests/bin/processing/processTests.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/java/perftests/bin/processing/processTests.py b/java/perftests/bin/processing/processTests.py index 745d9059d1..bb9efcc5a2 100755 --- a/java/perftests/bin/processing/processTests.py +++ b/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") |
