Skip to content

Commit 26d9259

Browse files
committed
fix tracking and reporting of maxrss in pyperformance and warmup in pypy suite
1 parent 89be8be commit 26d9259

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

mx.graalpython/mx_graalpython_python_benchmarks.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,7 @@ def parse(self, text: str) -> dict:
213213
"metric.value": value,
214214
}
215215
)
216-
if maxrss := run["metadata"].get(
217-
"mem_max_rss", js["metadata"].get("mem_max_rss", 0)
218-
):
216+
if maxrss := run["metadata"].get("mem_max_rss", 0):
219217
r.append(
220218
{
221219
"bench-suite": self.suiteName,
@@ -295,7 +293,7 @@ def parse(self, text: str) -> dict:
295293
return r
296294

297295

298-
class PyPyJsonRule(mx_benchmark.Rule):
296+
class PyPyJsonRule(mx_benchmark.Rule, mx_benchmark.AveragingBenchmarkMixin):
299297
"""Parses a JSON file produced by the Unladen Swallow or PyPy benchmark harness and creates a measurement result."""
300298

301299
def __init__(self, filename: str, suiteName: str):
@@ -321,7 +319,7 @@ def parse(self, text: str) -> dict:
321319
{
322320
"bench-suite": self.suiteName,
323321
"benchmark": name,
324-
"metric.name": "time",
322+
"metric.name": "warmup",
325323
"metric.unit": "s",
326324
"metric.score-function": "id",
327325
"metric.better": "lower",
@@ -330,7 +328,7 @@ def parse(self, text: str) -> dict:
330328
"metric.value": value,
331329
}
332330
)
333-
331+
self.addAverageAcrossLatestResults(r)
334332
return r
335333

336334

@@ -517,7 +515,6 @@ def _vmRun(self, vm, workdir, command, benchmarks, bmSuiteArgs):
517515
"run",
518516
"--inherit-environ",
519517
"PIP_INDEX_URL,PIP_TRUSTED_HOST,PIP_TIMEOUT,PIP_RETRIES,LD_LIBRARY_PATH,LIBRARY_PATH,CPATH,PATH,PYPY_GC_MAX",
520-
"-m",
521518
"-o",
522519
json_file,
523520
*bms,

0 commit comments

Comments
 (0)