Question about iteration numbers

Zoltan Farkas zolyfarkas at yahoo.com
Thu Jun 23 18:54:59 UTC 2016


I was investigating some benchmark behavior where I was seeing:
# Warmup Iteration 1: 70485.272 ops/s
# Warmup Iteration 2: 77614.082 ops/s
# Warmup Iteration 3: 4704.416 ops/s

And I wanted to compare the benchmark profile between 2 iterations…
I modified my profiler to save the iteration profile to disk in “afterIteration” and I wanted to add the iteration number in the file name somewhere for correlation purposes…
I ended up keeping a count myself :-), here is the actual implementation detail: https://github.com/zolyfarkas/spf4j/blob/master/spf4j-jmh/src/main/java/org/spf4j/stackmonitor/Spf4jJmhProfiler.java  

Ultimately this helped me narrow down the potential cause, if interested please see for more detail: http://zolyfarkas.github.io/spf4j/spf4j-benchmarks/CrazyJVM.pdf

This is also related with my other question regarding the printing out of: “# Warmup Iteration 1: 70485.272 ops/s”

if it would be possible to print this out like:

synchronized(System.out) {
...
}

this way it will(might) not be broken up by up by other output  (like GC, JIT details…) assuming that the other output acquires the System.out monitor…(which might not be the case…)

let me know if you have any questions.

thank you

—Z



> On Jun 23, 2016, at 1:04 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> 
> On 16.06.2016 19:24, Zoltan Farkas wrote:
>> I have a questions about iteration numbers:
>> # Warmup Iteration   1: 62995.070 ops/s
>> # Warmup Iteration   2: 70660.918 ops/s
>> # Warmup Iteration   3: 73127.240 ops/s
>> ...
>> Iteration   1: 73277.416 ops/s
>> Iteration   2: 72664.450 ops/s
>> Iteration   3: 72385.558 ops/s
>> 
>> Is there a way to obtain this number from void 
>> InternalProfiler.beforeIteration(BenchmarkParams benchmarkParams,
>> IterationParams iterationParams)?
> 
> No, there is no way to get this data from within the profiler. Both
> BenchmarkParams and IterationParams are the configuration parameters,
> not the on-going run state.
> 
> Why would you need it?
> 
> Thanks,
> -Aleksey
> 



More information about the jmh-dev mailing list