Mercurial > hg > truffle
comparison perf/benchmarktool.sh @ 3187:6ff76a1b8339
The benchmark tool should now print zero values to the csv file, if a benchmark fails
author | Josef Haider <josef.haider@khg.jku.at> |
---|---|
date | Thu, 07 Jul 2011 19:43:17 +0200 |
parents | 4ccb3d5e4da1 |
children |
comparison
equal
deleted
inserted
replaced
3186:0baa318b28f5 | 3187:6ff76a1b8339 |
---|---|
110 print('Benchmark time: '+match.group(5)) | 110 print('Benchmark time: '+match.group(5)) |
111 csvOutput[csvOutputLine].append(match.group(1)) | 111 csvOutput[csvOutputLine].append(match.group(1)) |
112 csvOutput[csvOutputLine].append(match.group(5)) | 112 csvOutput[csvOutputLine].append(match.group(5)) |
113 else: | 113 else: |
114 matchGraalTime(line, csvOutput, csvOutputLine, options.n) | 114 matchGraalTime(line, csvOutput, csvOutputLine, options.n) |
115 | |
116 if nRuns < options.n: | |
117 csvOutputLine = csvOutputLine + (options.n - nRuns) | |
118 for i in range(options.n - nRuns): | |
119 csvOutput.append([str(nRuns + i), benchmark, '0']) | |
115 | 120 |
116 writeout(outputFile, csvOutput) | 121 writeout(outputFile, csvOutput) |
117 | 122 |
118 if options.runonly != 'all' and options.runonly != 'scimark': | 123 if options.runonly != 'all' and options.runonly != 'scimark': |
119 outputFile.close() | 124 outputFile.close() |
124 cmd = vm + '/bin/java ' + compilerFlags[compiler] + ' -d64 ' + DEFAULT_SCIMARK_OPTS + options.o + \ | 129 cmd = vm + '/bin/java ' + compilerFlags[compiler] + ' -d64 ' + DEFAULT_SCIMARK_OPTS + options.o + \ |
125 ' -Xbootclasspath/a:' + os.environ['SCIMARK'] + '/scimark2lib.jar jnt.scimark2.commandline' | 130 ' -Xbootclasspath/a:' + os.environ['SCIMARK'] + '/scimark2lib.jar jnt.scimark2.commandline' |
126 | 131 |
127 benchmarkScore = re.compile(r"([a-zA-Z0-9_\(\),= ]+):\s+([0-9]+\.[0-9]+)$") | 132 benchmarkScore = re.compile(r"([a-zA-Z0-9_\(\),= ]+):\s+([0-9]+\.[0-9]+)$") |
128 | 133 |
129 csvOutput = [['run']] | 134 csvOutput = [['run'],[]] |
130 csvOutputLine = 0 | |
131 scOutput = runBash(cmd) | 135 scOutput = runBash(cmd) |
132 csvOutputLine = csvOutputLine + 1 | |
133 csvOutput.append(list()) | |
134 csvOutput[csvOutputLine].append(str(csvOutputLine)) | |
135 while True: | 136 while True: |
136 line = scOutput.readline().decode() | 137 line = scOutput.readline().decode() |
137 if not line: | 138 if not line: |
138 break | 139 break |
139 line = line.strip() | 140 line = line.strip() |
140 match = benchmarkScore.search(line) | 141 match = benchmarkScore.search(line) |
141 if match: | 142 if match: |
142 if csvOutputLine == 1: | |
143 csvOutput[0].append(match.group(1).strip()) | |
144 print('Scimark '+match.group(1)+' score: '+match.group(2)) | 143 print('Scimark '+match.group(1)+' score: '+match.group(2)) |
145 csvOutput[csvOutputLine].append(match.group(2)) | 144 csvOutput[0].append(match.group(1).strip()) |
145 csvOutput[1].append(match.group(2)) | |
146 else: | 146 else: |
147 matchGraalTime(line,csvOutput,csvOutputLine, 1) | 147 matchGraalTime(line,csvOutput, 1, 1) |
148 | 148 |
149 writeout(outputFile, csvOutput) | 149 writeout(outputFile, csvOutput) |
150 outputFile.close() | 150 outputFile.close() |
151 | 151 |
152 return 0 | 152 return 0 |