Skip to content

Commit

Permalink
Use self.benchSuiteName instead self.name in mx_vm_benchmark.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Oct 2, 2024
1 parent 4daeafd commit 2170939
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.32.0",
"mx_version": "7.32.2",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down
7 changes: 3 additions & 4 deletions sdk/mx.sdk/mx_sdk_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,8 @@ def name(self):
return "specjvm2008"

def benchSuiteName(self, bmSuiteArgs=None):
return self.name()
# For historical reasons, we have the suffix. Dropping the suffix would require data migration.
return "specjvm2008-single"

def group(self):
return "Graal"
Expand Down Expand Up @@ -992,14 +993,12 @@ def flakySuccessPatterns(self):
return []

def rules(self, out, benchmarks, bmSuiteArgs):
# For historical reasons, we have the suffix. Dropping the suffix would require data migration.
suite_name = self.benchSuiteName() + "-single"
return [
mx_benchmark.StdOutRule(
r"^Score on (?P<benchmark>[a-zA-Z0-9\._]+): (?P<score>[0-9]+((,|\.)[0-9]+)?) ops/m$", # pylint: disable=line-too-long
{
"benchmark": ("<benchmark>", str),
"bench-suite": suite_name,
"bench-suite": self.benchSuiteName(),
"vm": "jvmci",
"config.name": "default",
"metric.name": "throughput",
Expand Down
3 changes: 0 additions & 3 deletions substratevm/mx.substratevm/mx_substratevm_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,6 @@ class SpecJVM2008NativeImageBenchmarkSuite(mx_sdk_benchmark.SpecJvm2008Benchmark
def name(self):
return 'specjvm2008-native-image'

def benchSuiteName(self, bmSuiteArgs=None):
return 'specjvm2008'

def run(self, benchmarks, bmSuiteArgs) -> mx_benchmark.DataPoints:
return self.intercept_run(super(), benchmarks, bmSuiteArgs)

Expand Down
7 changes: 5 additions & 2 deletions vm/mx.vm/mx_vm_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ def image_build_statistics_rules(self, benchmarks):
rules = []
for i in range(0, len(metric_objects)):
rules += self._get_image_build_stats_rules({
"bench-suite": self.config.benchmark_suite_name,
"benchmark": benchmarks[0],
"metric.name": "image-build-stats",
"metric.type": "numeric",
Expand All @@ -1013,6 +1014,7 @@ def image_build_timers_rules(self, benchmarks):
phase = measured_phases[i]
value_name = phase + "_time"
rules += self._get_image_build_stats_rules({
"bench-suite": self.config.benchmark_suite_name,
"benchmark": benchmarks[0],
"metric.name": "compile-time",
"metric.type": "numeric",
Expand All @@ -1025,6 +1027,7 @@ def image_build_timers_rules(self, benchmarks):
}, [value_name])
value_name = phase + "_memory"
rules += self._get_image_build_stats_rules({
"bench-suite": self.config.benchmark_suite_name,
"benchmark": benchmarks[0],
"metric.name": "compile-time",
"metric.type": "numeric",
Expand Down Expand Up @@ -1411,7 +1414,7 @@ def rules(self, out, benchmarks, bmSuiteArgs):
assert len(benchmarks) == 1
return [
mx_benchmark.StdOutRule(r'^Hundred thousand prime numbers in (?P<time>[0-9]+) ms$', {
"bench-suite": self.name(),
"bench-suite": self.benchSuiteName(),
"benchmark": (benchmarks[0], str),
"metric.name": "warmup",
"metric.type": "numeric",
Expand Down Expand Up @@ -1695,7 +1698,7 @@ def rules(self, output, benchmarks, bmSuiteArgs):
mx_benchmark.StdOutRule(
FileSizeBenchmarkSuite.SZ_RGX_PATTERN,
{
"bench-suite": self.name(),
"bench-suite": self.benchSuiteName(),
"benchmark": ("<image_name>", str),
"benchmark-configuration": ("<path>", str),
"vm": "svm",
Expand Down

0 comments on commit 2170939

Please sign in to comment.