From 0c744d5c7a79d0d4444c9eb23ef4c4f4f0fe9e66 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Mon, 12 Apr 2010 15:42:59 +0000 Subject: QPID-2425 : Augment script to extract latency from csv file. Also updated processAll script to colate the statistics for the given run. Merged from 0.5.x-dev rev 917482 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@933284 13f79535-47bb-0310-9956-ffa450edef68 --- java/perftests/bin/processing/processTests.py | 78 ++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 6 deletions(-) (limited to 'java/perftests/bin/processing/processTests.py') diff --git a/java/perftests/bin/processing/processTests.py b/java/perftests/bin/processing/processTests.py index 57c8cc7668..745d9059d1 100755 --- a/java/perftests/bin/processing/processTests.py +++ b/java/perftests/bin/processing/processTests.py @@ -99,6 +99,8 @@ def main(): # Process the log files we know of # def preProcessBrokerLogs(resultDir): + + print "Pre Processing Broker Logs" # Pre-Process GC - no pre processing required # Process Log4j - no processing required as file is already time stamped. @@ -153,7 +155,6 @@ def processCPUUsage(resultDir): sumCPU=0.0 sumMem=0.0 - entries = 0 output= open(datedFile, "w") for line in logfile: # @@ -357,6 +358,7 @@ def createResultSetPackage(root, resultFile): sliceBrokerLogs(resultDir, start, end) createGraphData(resultDir, testName) + createTestStatData(resultDir, testName) log("Created Result Package for:"+ testName) @@ -387,9 +389,7 @@ def sliceCPULog(resultDir, start, end): entries=0 sumCPU=0.0 sumMem=0.0 - - entries = 0 - + # # Create outputfile # @@ -721,6 +721,73 @@ def extractTestData(property,resultDir,testName,type): found=True return result.strip() + +def createTestStatData(resultDir, testName): + csvFilePath=resultDir + os.sep + testName + ".csv" + + # Open the output file, erasing any existing version + # Keep track of the min/max sum and entries,. + minLatency=float(sys.maxint) + maxLatency=0.0 + + entries=0 + sumLatency=0.0 + + # + # Open csv File + # + csvFile = open(csvFilePath,"r") + for line in csvFile: + + # The PingAsyncTestPerf test class outputs the latency and throughput data. + if line.find("PingAsyncTestPerf") != -1: + # + # Data format is + #