RFR 8221623 : Add StackWalker micro benchmarks to jdk repo
daniel.fuchs at oracle.com
Mon Sep 23 09:15:36 UTC 2019
On 19/09/2019 20:08, Brent Christian wrote:
> JMH defaults to using 1 worker thread, but can be configured to use
> more. I tried with '-t max' (8 threads on my machine), and the
> benchmark NPE'd, as you predicted.
> I've updated the benchmark to use a separate handler (and Logger)
> per-thread, and it can now run w/ '-t max'. Single-thread scores are
> within a few % of the original test. I also added "Logging" to the
> benchmark names to make it easier to select both in JMH using a simple
Good. Thanks for checking!
The updated benchmark looks good to me.
I almost missed the magic at line 47:
47 @State(value = Scope.Thread) // create a separate one for each
I'll try to remember that trick.
> Though really, since logging is no longer using Throwable to examine the
> call stack, maybe it makes more sense to move the logging benchmarks to
> their own file under:
Well, I'll let you decide on that. That would be the first
logging benchmark :-)
More information about the core-libs-dev