Average time computation just prints out "10??"

Aleksey Shipilev shade at redhat.com
Mon Oct 1 15:32:21 UTC 2018


On 10/01/2018 05:27 PM, David Karr wrote:
> That doesn't really seem like a clear answer, but in any case, I changed the class annotation,
> adding a @Warmup annotation.  I let the run finish completely.  Every statistic was "s/op", and had
> the encoded characters.
> 
> If it matters, here's the entire skeleton of the class:
> 
>     @Measurement(timeUnit = TimeUnit.MICROSECONDS)
>     @Warmup(timeUnit = TimeUnit.MICROSECONDS)
>     public class MyBenchmark {
>         @Benchmark
>         @BenchmarkMode(value = { Mode.AverageTime})
>         public void createBigDecimalFromFormattedDouble() {
>             ...
>         }
>    
>         @Benchmark
>         @BenchmarkMode(value = { Mode.AverageTime})
>         public void createBigDecimalFromDoubleWithScale() {
>             ...
>         }
>     }

Time units can also be overridden by command line option and/or Java API runner.

Please show the complete example, together with the code that runs it?

-Aleksey





More information about the jmh-dev mailing list