|
3 | 3 |
|
4 | 4 | import glob
|
5 | 5 | import json
|
| 6 | +import shutil |
6 | 7 | import subprocess
|
7 | 8 | import sys
|
8 | 9 |
|
|
11 | 12 | from os.path import join, abspath
|
12 | 13 |
|
13 | 14 |
|
| 15 | +SUITE = mx.suite("graalpython") |
| 16 | + |
| 17 | + |
14 | 18 | class PyPerfJsonRule(mx_benchmark.Rule):
|
15 | 19 | """Parses a JSON file produced by PyPerf and creates a measurement result."""
|
16 | 20 |
|
@@ -304,6 +308,7 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
|
304 | 308 | ],
|
305 | 309 | cwd=workdir,
|
306 | 310 | )
|
| 311 | + shutil.copy(json_file, join(SUITE.dir, "raw_results.json")) |
307 | 312 | return retcode, json_file
|
308 | 313 |
|
309 | 314 |
|
@@ -368,6 +373,7 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
|
368 | 373 | ],
|
369 | 374 | cwd=workdir,
|
370 | 375 | )
|
| 376 | + shutil.copy(json_file, join(SUITE.dir, "raw_results.json")) |
371 | 377 | return retcode, json_file
|
372 | 378 |
|
373 | 379 |
|
@@ -459,7 +465,9 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
|
459 | 465 |
|
460 | 466 | json_file = glob.glob(join(benchdir, "results", "*", "*numpy*.json"))
|
461 | 467 | 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 |
463 | 471 | else:
|
464 | 472 | return retcode, ""
|
465 | 473 |
|
@@ -488,9 +496,7 @@ def register_python_benchmarks():
|
488 | 496 | 100,
|
489 | 497 | ),
|
490 | 498 | ]:
|
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) |
494 | 500 |
|
495 | 501 | mx_benchmark.add_bm_suite(PyPerformanceSuite())
|
496 | 502 | mx_benchmark.add_bm_suite(PyPySuite())
|
|
0 commit comments