You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/04/12 17:43:13 UTC

svn commit: r933285 - /qpid/trunk/qpid/java/perftests/bin/processing/processTests.py

Author: ritchiem
Date: Mon Apr 12 15:43:13 2010
New Revision: 933285

URL: http://svn.apache.org/viewvc?rev=933285&view=rev
Log:
QPID-2425 : Update to automate the gathering of throughput min/max/avg.

Merge 0.5.x-dev rev 917585

Modified:
    qpid/trunk/qpid/java/perftests/bin/processing/processTests.py

Modified: qpid/trunk/qpid/java/perftests/bin/processing/processTests.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/bin/processing/processTests.py?rev=933285&r1=933284&r2=933285&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/bin/processing/processTests.py (original)
+++ qpid/trunk/qpid/java/perftests/bin/processing/processTests.py Mon Apr 12 15:43:13 2010
@@ -729,9 +729,12 @@ def createTestStatData(resultDir, testNa
     # 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, testNa
             # <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, testNa
             # <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, testNa
             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, testNa
             
             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, testNa
     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")    



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org