Skip to content

Commit 2488f1c

Browse files
committed
keep the last raw_results.json
1 parent 9677469 commit 2488f1c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

mx.graalpython/mx_graalpython_python_benchmarks.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import glob
55
import json
6+
import shutil
67
import subprocess
78
import sys
89

@@ -11,6 +12,9 @@
1112
from os.path import join, abspath
1213

1314

15+
SUITE = mx.suite("graalpython")
16+
17+
1418
class PyPerfJsonRule(mx_benchmark.Rule):
1519
"""Parses a JSON file produced by PyPerf and creates a measurement result."""
1620

@@ -304,6 +308,7 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
304308
],
305309
cwd=workdir,
306310
)
311+
shutil.copy(json_file, join(SUITE.dir, "raw_results.json"))
307312
return retcode, json_file
308313

309314

@@ -368,6 +373,7 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
368373
],
369374
cwd=workdir,
370375
)
376+
shutil.copy(json_file, join(SUITE.dir, "raw_results.json"))
371377
return retcode, json_file
372378

373379

@@ -459,7 +465,9 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
459465

460466
json_file = glob.glob(join(benchdir, "results", "*", "*numpy*.json"))
461467
if json_file:
462-
return retcode, json_file[0]
468+
json_file = json_file[0]
469+
shutil.copy(json_file, join(SUITE.dir, "raw_results.json"))
470+
return retcode, json_file
463471
else:
464472
return retcode, ""
465473

@@ -488,9 +496,7 @@ def register_python_benchmarks():
488496
100,
489497
),
490498
]:
491-
python_vm_registry.add_vm(
492-
GraalPyVm(config_name, options), mx.suite("graalpython"), priority
493-
)
499+
python_vm_registry.add_vm(GraalPyVm(config_name, options), SUITE, priority)
494500

495501
mx_benchmark.add_bm_suite(PyPerformanceSuite())
496502
mx_benchmark.add_bm_suite(PyPySuite())

0 commit comments

Comments
 (0)