AuxCounters
Aleksey Shipilev
shade at redhat.com
Thu Mar 9 17:10:36 UTC 2017
On 03/06/2017 10:15 PM, Henri Tremblay wrote:
> Ok. That was my understanding so far.
>
> Then, I don't understand how it's calculated. Lets say I use OPERATIONS and
> Throughput (per second). And I increment once the counter. I will get the number
> of time the counter was incremented per second? And then the average time is
> what? 1/throughput?
Throughput is $counter / $measuredTime. Average time is $measuredTime /
$counter. Think about @AuxCounter "OPERATIONS" as the _auxiliary_ operations
counter, in addition to the regular JMH's one.
> Now, for my original question. Will it be crazy to have a way to split
> executions according to an enum returned by the benchmarked method? By crazy I
> mean impossible. Or a boolean.
It's not impossible technically, but the amount of work required to engineer
this is probably not worth it. Non-steady state workloads are weird anyway.
Partial throughput measures get even weirder. You might just want to balance the
number of cache hits/misses and see how the overall performance changes with the
changed mix.
-Aleksey
More information about the jmh-dev
mailing list