How to measure a method multiple times with different parameter values
David Karr
davidmichaelkarr at gmail.com
Sat May 23 18:57:13 UTC 2020
I want to benchmark the performance of a method that takes a parameter, a
list of objects to be more specific. I can easily write a benchmark that
creates a static list and write a benchmark that takes the body of the
original method and references the static list.
Instead of benchmarking a void method, I'd really like to benchmark the
method that takes the list parameter, keeping the signature, and having it
return the value.
I would also like to run multiple benchmarks of the same method, but with
different values sent to the method, mostly to test it with different list
lengths.
More information about the jmh-dev
mailing list