# HG changeset patch # User Josef Haider # Date 1310060597 -7200 # Node ID 6ff76a1b8339cb772c0ed5375390a27c439de4bb # Parent 0baa318b28f5e2ef2bc04d1d936f27284e80b8bc The benchmark tool should now print zero values to the csv file, if a benchmark fails diff -r 0baa318b28f5 -r 6ff76a1b8339 perf/benchmarktool.sh --- a/perf/benchmarktool.sh Thu Jul 07 18:31:25 2011 +0200 +++ b/perf/benchmarktool.sh Thu Jul 07 19:43:17 2011 +0200 @@ -112,6 +112,11 @@ csvOutput[csvOutputLine].append(match.group(5)) else: matchGraalTime(line, csvOutput, csvOutputLine, options.n) + + if nRuns < options.n: + csvOutputLine = csvOutputLine + (options.n - nRuns) + for i in range(options.n - nRuns): + csvOutput.append([str(nRuns + i), benchmark, '0']) writeout(outputFile, csvOutput) @@ -126,12 +131,8 @@ benchmarkScore = re.compile(r"([a-zA-Z0-9_\(\),= ]+):\s+([0-9]+\.[0-9]+)$") - csvOutput = [['run']] - csvOutputLine = 0 + csvOutput = [['run'],[]] scOutput = runBash(cmd) - csvOutputLine = csvOutputLine + 1 - csvOutput.append(list()) - csvOutput[csvOutputLine].append(str(csvOutputLine)) while True: line = scOutput.readline().decode() if not line: @@ -139,12 +140,11 @@ line = line.strip() match = benchmarkScore.search(line) if match: - if csvOutputLine == 1: - csvOutput[0].append(match.group(1).strip()) print('Scimark '+match.group(1)+' score: '+match.group(2)) - csvOutput[csvOutputLine].append(match.group(2)) + csvOutput[0].append(match.group(1).strip()) + csvOutput[1].append(match.group(2)) else: - matchGraalTime(line,csvOutput,csvOutputLine, 1) + matchGraalTime(line,csvOutput, 1, 1) writeout(outputFile, csvOutput) outputFile.close()