RFR: CODETOOLS-7903560: JMH: async profiler reports only the last fork result [v5]

Jonas Konrad duke at openjdk.org
Tue Feb 27 14:37:06 UTC 2024


> Without this change, async-profiler would write the same result in each fork, overwriting the previous result.
> 
> This patch introduces a new "FileResult" class that collects the output paths of each benchmark. In `afterTrial`, the output files are moved to a new path that includes the pid (fork number would be an alternative but it's not as easily available).
> 
> At the moment, results of different runs are not coalesced. But with these changes, it would be easy to coalesce at least the results of the "collapsed" output mode. I plan to do this in another PR.

Jonas Konrad has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:

 - add async-profiler to github runner
 - Merge branch 'master' into async-fork
 - fix test
 - fix test
 - address review
 - Merge branch 'master' into async-fork
 - license headers
 - Include PID in async-profiler file name when forking
   Without this change, async-profiler would write the same result in each fork, overwriting the previous result.
   
   This patch introduces a new "FileResult" class that collects the output paths of each benchmark. In `afterTrial`, the output files are moved to a new path that includes the pid (fork number would be an alternative but it's not as easily available).
   
   At the moment, results of different runs are not coalesced. But with these changes, it would be easy to coalesce at least the results of the "collapsed" output mode. I plan to do this in another PR.

-------------

Changes:
  - all: https://git.openjdk.org/jmh/pull/121/files
  - new: https://git.openjdk.org/jmh/pull/121/files/31688d9d..98fe5bff

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jmh&pr=121&range=04
 - incr: https://webrevs.openjdk.org/?repo=jmh&pr=121&range=03-04

  Stats: 109 lines in 11 files changed: 75 ins; 3 del; 31 mod
  Patch: https://git.openjdk.org/jmh/pull/121.diff
  Fetch: git fetch https://git.openjdk.org/jmh.git pull/121/head:pull/121

PR: https://git.openjdk.org/jmh/pull/121


More information about the jmh-dev mailing list