Skip to content

Commit 854cd09

Browse files
author
Andrija Kolic
committed
[GR-59047] Add 'micronaut-pegasus' to the 'barista-native-image' suite
PullRequest: graal/19256
2 parents 5eb3d21 + 3670dd5 commit 854cd09

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,7 @@ def rules(self, out, benchmarks, bmSuiteArgs):
11891189
"micronaut-hello-world": {},
11901190
"micronaut-shopcart": {},
11911191
"micronaut-similarity": {},
1192+
"micronaut-pegasus": {},
11921193
"quarkus-hello-world": {},
11931194
"quarkus-tika-odt": {
11941195
"barista-bench-name": "quarkus-tika",
@@ -1260,7 +1261,10 @@ def subgroup(self):
12601261
return "graal-compiler"
12611262

12621263
def benchmarkList(self, bmSuiteArgs):
1263-
return self.completeBenchmarkList(bmSuiteArgs)
1264+
exclude = []
1265+
# Barista currently does not support running 'micronaut-pegasus' on the JVM - running it results in a crash
1266+
exclude.append("micronaut-pegasus")
1267+
return [b for b in self.completeBenchmarkList(bmSuiteArgs) if not b in exclude]
12641268

12651269
def completeBenchmarkList(self, bmSuiteArgs):
12661270
return _baristaConfig["benchmarks"].keys()

substratevm/mx.substratevm/mx_substratevm_benchmark.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@ def benchSuiteName(self, bmSuiteArgs=None):
286286
def benchmarkName(self):
287287
return self.context.benchmark
288288

289+
def benchmarkList(self, bmSuiteArgs):
290+
return self.completeBenchmarkList(bmSuiteArgs)
291+
292+
def default_stages(self):
293+
if self.context.benchmark == "micronaut-pegasus":
294+
# The 'agent' stage is not supported, as currently we cannot run micronaut-pegasus on the JVM
295+
return ['instrument-image', 'instrument-run', 'image', 'run']
296+
return super().default_stages()
297+
289298
def application_nib(self):
290299
if self.benchmarkName() not in self._application_nibs:
291300
# Run subprocess retrieving the application nib from the Barista 'build' script
@@ -337,6 +346,7 @@ def extra_run_arg(self, benchmark, args, image_run_args):
337346
return []
338347

339348
def run(self, benchmarks, bmSuiteArgs) -> mx_benchmark.DataPoints:
349+
self.context = mx_sdk_benchmark.BaristaBenchmarkSuite.RuntimeContext(self, None, benchmarks[0], bmSuiteArgs)
340350
return self.intercept_run(super(), benchmarks, bmSuiteArgs)
341351

342352
def ensure_image_is_at_desired_location(self, bmSuiteArgs):

0 commit comments

Comments
 (0)