Skip to content

Commit 02c6ae5

Browse files
committed
JMH based benchmarks
Use JMH support in MX to run our JMH benchmarks. New JMH benchmarks: context initialization and host interop micro benchmarks. Update the existing JMH interop benchmarks to not be single shot and let JMH harness run the benchmark loop instead of the benchmark function itself. Remove the custom JMH driver and rely on the standard JMH entry point (used by JMH MX support). Replace explicit Blackhole usage with returning a value, which should be equivalent. Keep only PyEuler11 for now, other benchmarks seem to exercise the same/similar interop interactions.
1 parent f36d9bc commit 02c6ae5

File tree

14 files changed

+354
-1603
lines changed

14 files changed

+354
-1603
lines changed

graalpython/com.oracle.graal.python.benchmarks/java/com/oracle/graal/python/benchmarks/JavaBenchmarkDriver.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -58,6 +58,11 @@
5858
import org.graalvm.polyglot.Source;
5959
import org.graalvm.polyglot.Value;
6060

61+
/**
62+
* Driver that can execute our Python benchmarks via Java embedding. Java version of the Python
63+
* benchmark harness. The benchmarks must define Python function entry point named
64+
* {@code java_embedded_bench_entrypoint} and this driver executes that as one benchmark iteration.
65+
*/
6166
public class JavaBenchmarkDriver extends AbstractLanguageLauncher {
6267
private static final String LINE = "-------------------------------------------------------------------------------";
6368
private static final String BENCHMARK_ENTRY_POINT = "java_embedded_bench_entrypoint";

graalpython/com.oracle.graal.python.benchmarks/java/com/oracle/graal/python/benchmarks/interop/BenchOutputFormat.java

Lines changed: 0 additions & 348 deletions
This file was deleted.

0 commit comments

Comments
 (0)