jmh icon indicating copy to clipboard operation
jmh copied to clipboard

7904037: Make OutputFormatAdapter public

Open galderz opened this issue 5 months ago • 15 comments
trafficstars

This is the first in a series of PRs that I will be sending over the next few days, which make extending JMH to benchmark Java code running as GraalVM native images more easily. The codename for this extension is Fibula. It can still work without this PRs but without them the extension has to duplicate code that exists in JMH, which is not desirable.

In this PR, we make OutputFormatAdapter public.

Why do that? This enables Fibula to reuse the same class when it wants to redirect the output from the process to the JMH output. This is useful for example when Fibula's PGO integration invokes native image to recreate the binary with the profiling information, see https://github.com/galderz/fibula/commit/20eaf64936ef3e8f77eaed2ac7e8094b57e66a8d

Here is the PR list for reference:

  1. Make OutputFormatAdapter public
  2. Enable BenchmarkParams construction to be overriden
  3. Enable alternative Runner instantiation and Main reuse
  4. Enable profiler classes to be reused outside of JMH
  5. Enable JMH integration tests to be executed against other impls

Progress

  • [x] Change must not contain extraneous whitespace
  • [ ] Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmh.git pull/158/head:pull/158
$ git checkout pull/158

Update a local copy of the PR:
$ git checkout pull/158
$ git pull https://git.openjdk.org/jmh.git pull/158/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 158

View PR using the GUI difftool:
$ git pr show -t 158

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmh/pull/158.diff

Using Webrev

Link to Webrev Comment

galderz avatar Jun 17 '25 12:06 galderz

:wave: Welcome back galder! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Jun 17 '25 12:06 bridgekeeper[bot]

Oh forgot, I'll create a CODETOOLS issue for each of these PRs, coming...

galderz avatar Jun 17 '25 12:06 galderz

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Jun 17 '25 12:06 openjdk[bot]

Webrevs

mlbridge[bot] avatar Jun 17 '25 12:06 mlbridge[bot]

@galderz This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jul 15 '25 19:07 bridgekeeper[bot]

/touch

galderz avatar Jul 18 '25 15:07 galderz

@galderz The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Jul 18 '25 15:07 openjdk[bot]

@galderz This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Aug 15 '25 21:08 bridgekeeper[bot]

/touch

galderz avatar Aug 18 '25 10:08 galderz

@galderz The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Aug 18 '25 10:08 openjdk[bot]

@galderz This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Sep 15 '25 23:09 bridgekeeper[bot]

/touch

galderz avatar Sep 19 '25 04:09 galderz

@galderz The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Sep 19 '25 04:09 openjdk[bot]

/touch

galderz avatar Oct 09 '25 10:10 galderz

@galderz The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Oct 09 '25 10:10 openjdk[bot]

@galderz This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 06 '25 12:11 bridgekeeper[bot]

/touch

galderz avatar Nov 06 '25 17:11 galderz

@galderz The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Nov 06 '25 17:11 openjdk[bot]