is it possible to normalize the results by a @Param?

Travis Downs travis.downs at gmail.com
Wed Dec 14 18:19:38 UTC 2016


I'd like to run some benchmark for various @Param values (say the length of
an array), and then have the -bm avgt results reported normalized (divided)
by the parram value, so the results are effectively "time per element"
rather than "time for the whole (variable length" array.

Any intrinsic way to do it? I know about @OperationsPerInvocation, but it's
value is fixed in the code so I think it doesn't help here (I could of
course create N benchmarks with different OperationsPerInvocation
annotations, but I lose a lot of the niceness of @Param in that case, and
@Setup is more complicated).


More information about the jmh-dev mailing list