Skip to content

Commit c234af6

Browse files
committed
[hotfix] post process bench results (add results replacement rules for special field value labels)
PullRequest: graalpython/520
2 parents 7a9cb61 + 3ef6193 commit c234af6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def __init__(self, name, bench_path, benchmarks, python_path=None):
276276
def rules(self, output, benchmarks, bm_suite_args):
277277
bench_name = os.path.basename(os.path.splitext(benchmarks[0])[0])
278278
arg = " ".join(self._benchmarks[bench_name])
279+
279280
return [
280281
# warmup curves
281282
StdOutRule(
@@ -309,6 +310,21 @@ def rules(self, output, benchmarks, bm_suite_args):
309310
),
310311
]
311312

313+
def runAndReturnStdOut(self, benchmarks, bmSuiteArgs):
314+
# host-vm rewrite rules
315+
ret_code, out, dims = super(PythonBenchmarkSuite, self).runAndReturnStdOut(benchmarks, bmSuiteArgs)
316+
317+
def _replace_host_vm(key):
318+
host_vm = dims.get("host-vm")
319+
if host_vm and host_vm.startswith(key):
320+
dims['host-vm'] = key
321+
mx.logv("[DEBUG] replace 'host-vm': '{key}-python' -> '{key}'".format(key=key))
322+
323+
_replace_host_vm('graalvm-ce')
324+
_replace_host_vm('graalvm-ee')
325+
326+
return ret_code, out, dims
327+
312328
def run(self, benchmarks, bm_suite_args):
313329
results = super(PythonBenchmarkSuite, self).run(benchmarks, bm_suite_args)
314330
self.addAverageAcrossLatestResults(results)

0 commit comments

Comments
 (0)