Skip to content

Commit 7d396a1

Browse files
committed
Do not reported 0 allocated-memory for native binaries
1 parent 8243bb1 commit 7d396a1

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -993,32 +993,33 @@ def parse(self, text):
993993
suite = suite[:-len("-heap")]
994994
benchmark = f"{suite}.{self.tracker.bmSuite.currently_running_benchmark()}"
995995
vm_flags = ' '.join(self.tracker.bmSuite.vmArgs(self.bmSuiteArgs))
996-
return [
997-
PythonBaseBenchmarkSuite.with_branch_and_commit_dict({
998-
"benchmark": benchmark,
999-
"bench-suite": suite,
1000-
"config.vm-flags": vm_flags,
1001-
"metric.name": "allocated-memory",
1002-
"metric.value": heap_deciles[-1],
1003-
"metric.unit": "MB",
1004-
"metric.type": "numeric",
1005-
"metric.score-function": "id",
1006-
"metric.better": "lower",
1007-
"metric.iteration": 0
1008-
}),
1009-
PythonBaseBenchmarkSuite.with_branch_and_commit_dict({
1010-
"benchmark": benchmark,
1011-
"bench-suite": suite,
1012-
"config.vm-flags": vm_flags,
1013-
"metric.name": "memory",
1014-
"metric.value": uss_deciles[-1],
1015-
"metric.unit": "MB",
1016-
"metric.type": "numeric",
1017-
"metric.score-function": "id",
1018-
"metric.better": "lower",
1019-
"metric.iteration": 0
1020-
})
1021-
]
996+
return (
997+
[
998+
PythonBaseBenchmarkSuite.with_branch_and_commit_dict({
999+
"benchmark": benchmark,
1000+
"bench-suite": suite,
1001+
"config.vm-flags": vm_flags,
1002+
"metric.name": "allocated-memory",
1003+
"metric.value": heap_deciles[-1],
1004+
"metric.unit": "MB",
1005+
"metric.type": "numeric",
1006+
"metric.score-function": "id",
1007+
"metric.better": "lower",
1008+
"metric.iteration": 0
1009+
})
1010+
] if heap_deciles[-1] != 0 else []
1011+
) + [PythonBaseBenchmarkSuite.with_branch_and_commit_dict({
1012+
"benchmark": benchmark,
1013+
"bench-suite": suite,
1014+
"config.vm-flags": vm_flags,
1015+
"metric.name": "memory",
1016+
"metric.value": uss_deciles[-1],
1017+
"metric.unit": "MB",
1018+
"metric.type": "numeric",
1019+
"metric.score-function": "id",
1020+
"metric.better": "lower",
1021+
"metric.iteration": 0
1022+
})]
10221023

10231024

10241025
class PythonHeapBenchmarkSuite(PythonBaseBenchmarkSuite):

0 commit comments

Comments
 (0)