JMHでの計測を本ブログ内でいくつか行いましたが、全てThroughput
(Mode.Throughput)というモードで実施しました。
Throughput
は、単位時間辺りに対象の処理を何回実行できるかを取得するものです。
JMHにはThroughput
以外の計測モードも用意されています。
Throughput
含めて以下の計測モードを指定することができます。
Throughput
AverageTime
SingleShotTime
SampleTime
All
各モードで何が計測できるのかと計測例を以下に記述します
Throughput - スループットの計測
単位時間当たりの処理実行回数を取得するモードです
■サンプルコード
import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class SampleBenchmark1 { @Benchmark public void sampleBenchmark() { java.util.Date d = java.util.Calendar.getInstance().getTime(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(SampleBenchmark1.class.getName()) .warmupIterations(15) .measurementIterations(5) .forks(1) .mode(Mode.Throughput) // <- Mode .build(); new Runner(opt).run(); } }
■実行結果
(一部省略)
# Benchmark mode: Throughput, ops/time # Benchmark: jmh.sample.mode.SampleBenchmark1.sampleBenchmark # Run progress: 0.00% complete, ETA 00:00:20 # Fork: 1 of 1 # Warmup Iteration 1: 4892522.614 ops/s # Warmup Iteration 2: 5029202.677 ops/s # Warmup Iteration 3: 7103350.797 ops/s # Warmup Iteration 4: 6971876.945 ops/s # Warmup Iteration 5: 7142556.518 ops/s # Warmup Iteration 6: 7124398.220 ops/s # Warmup Iteration 7: 7136978.008 ops/s # Warmup Iteration 8: 7093508.289 ops/s # Warmup Iteration 9: 7159257.643 ops/s # Warmup Iteration 10: 6871893.838 ops/s # Warmup Iteration 11: 6844028.532 ops/s # Warmup Iteration 12: 6773701.228 ops/s # Warmup Iteration 13: 6982278.526 ops/s # Warmup Iteration 14: 6857810.287 ops/s # Warmup Iteration 15: 6969538.290 ops/s Iteration 1: 7064584.988 ops/s Iteration 2: 7114835.353 ops/s Iteration 3: 7114541.845 ops/s Iteration 4: 7102074.035 ops/s Iteration 5: 7077583.391 ops/s Result "sampleBenchmark": 7094723.922 ±(99.9%) 87244.857 ops/s [Average] (min, avg, max) = (7064584.988, 7094723.922, 7114835.353), stdev = 22657.212 CI (99.9%): [7007479.065, 7181968.780] (assumes normal distribution) # Run complete. Total time: 00:00:20 Benchmark Mode Cnt Score Error Units SampleBenchmark1.sampleBenchmark thrpt 5 7094723.922 ± 87244.857 ops/s
AverageTime - 平均実行時間の計測
計測対象の処理を1回実行するのにどれだけの時間を要するか(平均実行時間)を計測するモードです
■サンプルコード
import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class SampleBenchmark2 { @Benchmark public void sampleBenchmark() { java.util.Date d = java.util.Calendar.getInstance().getTime(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(SampleBenchmark2.class.getName()) .warmupIterations(15) .measurementIterations(5) .forks(1) .timeUnit(TimeUnit.MICROSECONDS) .mode(Mode.AverageTime) // <- Mode .build(); new Runner(opt).run(); } }
■実行結果
(一部省略)
# Benchmark mode: Average time, time/op # Benchmark: jmh.sample.mode.SampleBenchmark2.sampleBenchmark # Run progress: 0.00% complete, ETA 00:00:20 # Fork: 1 of 1 # Warmup Iteration 1: 0.205 us/op # Warmup Iteration 2: 0.178 us/op # Warmup Iteration 3: 0.146 us/op # Warmup Iteration 4: 0.143 us/op # Warmup Iteration 5: 0.143 us/op # Warmup Iteration 6: 0.144 us/op # Warmup Iteration 7: 0.144 us/op # Warmup Iteration 8: 0.142 us/op # Warmup Iteration 9: 0.143 us/op # Warmup Iteration 10: 0.145 us/op # Warmup Iteration 11: 0.141 us/op # Warmup Iteration 12: 0.141 us/op # Warmup Iteration 13: 0.141 us/op # Warmup Iteration 14: 0.142 us/op # Warmup Iteration 15: 0.142 us/op Iteration 1: 0.142 us/op Iteration 2: 0.142 us/op Iteration 3: 0.142 us/op Iteration 4: 0.141 us/op Iteration 5: 0.142 us/op Result "sampleBenchmark": 0.142 ±(99.9%) 0.001 us/op [Average] (min, avg, max) = (0.141, 0.142, 0.142), stdev = 0.001 CI (99.9%): [0.141, 0.143] (assumes normal distribution) # Run complete. Total time: 00:00:20 Benchmark Mode Cnt Score Error Units SampleBenchmark2.sampleBenchmark avgt 5 0.142 ± 0.001 us/op
SingleShotTime - 指定回数分の処理にかかる時間の計測
指定の処理回数(バッチサイズ)をこなすのにどれだけの時間がかかるのかを計測するモードです
例えば、以下のサンプルコードではバッチサイズ=50000を指定していますので、対象のベンチマーク用の処理を50000回実行するのにどれだけの時間がかかるかを計測することができます。
■サンプルコード
import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class SampleBenchmark3 { @Benchmark public void sampleBenchmark() { java.util.Date d = java.util.Calendar.getInstance().getTime(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(SampleBenchmark3.class.getName()) .warmupIterations(15) .warmupBatchSize(50000) // <- ウォームアップのバッチサイズ .measurementIterations(5) .measurementBatchSize(50000) // <- 計測対象のバッチサイズ .forks(1) .timeUnit(TimeUnit.MICROSECONDS) .mode(Mode.SingleShotTime) // <- Mode .build(); new Runner(opt).run(); } }
■実行結果
(一部省略)
# Warmup: 15 iterations, single-shot each, 50000 calls per op # Measurement: 5 iterations, single-shot each, 50000 calls per op # Timeout: 10 min per iteration # Threads: 1 thread # Benchmark mode: Single shot invocation time # Benchmark: jmh.sample.mode.SampleBenchmark3.sampleBenchmark # Run progress: 0.00% complete, ETA 00:00:00 # Fork: 1 of 1 # Warmup Iteration 1: 74059.785 us/op # Warmup Iteration 2: 28991.073 us/op # Warmup Iteration 3: 9220.343 us/op # Warmup Iteration 4: 7852.567 us/op # Warmup Iteration 5: 9032.881 us/op # Warmup Iteration 6: 8292.392 us/op # Warmup Iteration 7: 9047.673 us/op # Warmup Iteration 8: 12890.187 us/op # Warmup Iteration 9: 12785.739 us/op # Warmup Iteration 10: 9764.918 us/op # Warmup Iteration 11: 7622.541 us/op # Warmup Iteration 12: 7846.227 us/op # Warmup Iteration 13: 7589.335 us/op # Warmup Iteration 14: 20715.283 us/op # Warmup Iteration 15: 7510.848 us/op Iteration 1: 7944.335 us/op Iteration 2: 7328.518 us/op Iteration 3: 7344.819 us/op Iteration 4: 9196.797 us/op Iteration 5: 13353.257 us/op Result "sampleBenchmark": N = 5 mean = 9033.545 ±(99.9%) 9747.503 us/op Histogram, us/op: [ 7000.000, 7500.000) = 2 [ 7500.000, 8000.000) = 1 [ 8000.000, 8500.000) = 0 [ 8500.000, 9000.000) = 0 [ 9000.000, 9500.000) = 1 [ 9500.000, 10000.000) = 0 [10000.000, 10500.000) = 0 [10500.000, 11000.000) = 0 [11000.000, 11500.000) = 0 [11500.000, 12000.000) = 0 [12000.000, 12500.000) = 0 [12500.000, 13000.000) = 0 [13000.000, 13500.000) = 1 Percentiles, us/op: p(0.0000) = 7328.518 us/op p(50.0000) = 7944.335 us/op p(90.0000) = 13353.257 us/op p(95.0000) = 13353.257 us/op p(99.0000) = 13353.257 us/op p(99.9000) = 13353.257 us/op p(99.9900) = 13353.257 us/op p(99.9990) = 13353.257 us/op p(99.9999) = 13353.257 us/op p(100.0000) = 13353.257 us/op # Run complete. Total time: 00:00:00 Benchmark Mode Cnt Score Error Units SampleBenchmark3.sampleBenchmark ss 5 9033.545 ± 9747.503 us/op
本計測では、対象の処理を5万回実施するのに 9033マイクロ秒かかるという結果になっています。
また計測の各イテレーションがヒストグラムとパーセンタイルで表すとどこに出現するかという結果も出力されます。
SampleTime - 処理時間の分散を取得する
処理時間の計測結果の分散を取得することができます。
計測結果をヒストグラムやパーセンタイルで出力してくれます。
■サンプルコード
import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class SampleBenchmark4 { @Benchmark public void sampleBenchmark() { java.util.Date d = java.util.Calendar.getInstance().getTime(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(SampleBenchmark4.class.getName()) .warmupIterations(15) .measurementIterations(5) .forks(1) .timeUnit(TimeUnit.MICROSECONDS) .mode(Mode.SampleTime) // <- Mode .build(); new Runner(opt).run(); } }
■実行結果
(一部省略)
# Benchmark mode: Sampling time # Benchmark: jmh.sample.mode.SampleBenchmark4.sampleBenchmark # Run progress: 0.00% complete, ETA 00:00:20 # Fork: 1 of 1 # Warmup Iteration 1: 0.998 ±(99.9%) 2.399 us/op # Warmup Iteration 2: 0.209 ±(99.9%) 0.064 us/op # Warmup Iteration 3: 0.162 ±(99.9%) 0.008 us/op # Warmup Iteration 4: 0.179 ±(99.9%) 0.009 us/op # Warmup Iteration 5: 0.177 ±(99.9%) 0.009 us/op # Warmup Iteration 6: 0.173 ±(99.9%) 0.013 us/op # Warmup Iteration 7: 0.162 ±(99.9%) 0.007 us/op # Warmup Iteration 8: 0.163 ±(99.9%) 0.008 us/op # Warmup Iteration 9: 0.162 ±(99.9%) 0.007 us/op # Warmup Iteration 10: 0.163 ±(99.9%) 0.008 us/op # Warmup Iteration 11: 0.160 ±(99.9%) 0.007 us/op # Warmup Iteration 12: 0.159 ±(99.9%) 0.007 us/op # Warmup Iteration 13: 0.162 ±(99.9%) 0.008 us/op # Warmup Iteration 14: 0.192 ±(99.9%) 0.089 us/op # Warmup Iteration 15: 0.164 ±(99.9%) 0.008 us/op Iteration 1: 0.209 ±(99.9%) 0.111 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 8.031 us/op sampleBenchmark·p0.9999: 181.322 us/op sampleBenchmark·p1.00: 701.440 us/op Iteration 2: 0.166 ±(99.9%) 0.022 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 2.279 us/op sampleBenchmark·p0.9999: 37.319 us/op sampleBenchmark·p1.00: 145.152 us/op Iteration 3: 0.181 ±(99.9%) 0.053 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 9.046 us/op sampleBenchmark·p0.9999: 30.386 us/op sampleBenchmark·p1.00: 435.200 us/op Iteration 4: 0.181 ±(99.9%) 0.072 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 4.110 us/op sampleBenchmark·p0.9999: 15.549 us/op sampleBenchmark·p1.00: 596.992 us/op Iteration 5: 0.164 ±(99.9%) 0.009 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 9.034 us/op sampleBenchmark·p0.9999: 14.266 us/op sampleBenchmark·p1.00: 40.448 us/op Result "sampleBenchmark": N = 136943 mean = 0.180 ±(99.9%) 0.029 us/op Histogram, us/op: [ 0.000, 50.000) = 136936 [ 50.000, 100.000) = 2 [100.000, 150.000) = 1 [150.000, 200.000) = 0 [200.000, 250.000) = 0 [250.000, 300.000) = 0 [300.000, 350.000) = 0 [350.000, 400.000) = 0 [400.000, 450.000) = 1 [450.000, 500.000) = 0 [500.000, 550.000) = 0 [550.000, 600.000) = 2 [600.000, 650.000) = 0 [650.000, 700.000) = 0 [700.000, 750.000) = 1 Percentiles, us/op: p(0.0000) = ≈ 0 us/op p(50.0000) = ≈ 0 us/op p(90.0000) = 0.302 us/op p(95.0000) = 0.302 us/op p(99.0000) = 0.303 us/op p(99.9000) = 5.145 us/op p(99.9900) = 14.877 us/op p(99.9990) = 663.231 us/op p(99.9999) = 701.440 us/op p(100.0000) = 701.440 us/op # Run complete. Total time: 00:00:20 Benchmark Mode Cnt Score Error Units SampleBenchmark4.sampleBenchmark sample 136943 0.180 ± 0.029 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.00 sample ≈ 0 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.50 sample ≈ 0 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.90 sample 0.302 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.95 sample 0.302 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.99 sample 0.303 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.999 sample 5.145 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p0.9999 sample 14.877 us/op SampleBenchmark4.sampleBenchmark:sampleBenchmark·p1.00 sample 701.440 us/op
All
Throughput
, AverageTime
, SingleShotTime
, SampleTime
の計測を全て実行するモードです
■サンプルコード
import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class SampleBenchmark5 { @Benchmark public void sampleBenchmark() { java.util.Date d = java.util.Calendar.getInstance().getTime(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(SampleBenchmark5.class.getName()) .warmupIterations(15) .measurementIterations(5) .forks(1) .timeUnit(TimeUnit.MICROSECONDS) .mode(Mode.All) // <- Mode .build(); new Runner(opt).run(); } }
■実行結果
(一部省略)
# Warmup: 15 iterations, 1 s each # Measurement: 5 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: jmh.sample.mode.SampleBenchmark5.sampleBenchmark # Run progress: 0.00% complete, ETA 00:01:00 # Fork: 1 of 1 # Warmup Iteration 1: 5.484 ops/us # Warmup Iteration 2: 6.549 ops/us # Warmup Iteration 3: 7.287 ops/us # Warmup Iteration 4: 7.276 ops/us # Warmup Iteration 5: 7.248 ops/us # Warmup Iteration 6: 7.256 ops/us # Warmup Iteration 7: 7.172 ops/us # Warmup Iteration 8: 7.169 ops/us # Warmup Iteration 9: 7.160 ops/us # Warmup Iteration 10: 7.133 ops/us # Warmup Iteration 11: 7.163 ops/us # Warmup Iteration 12: 7.148 ops/us # Warmup Iteration 13: 7.161 ops/us # Warmup Iteration 14: 7.175 ops/us # Warmup Iteration 15: 7.174 ops/us Iteration 1: 7.179 ops/us Iteration 2: 7.128 ops/us Iteration 3: 7.160 ops/us Iteration 4: 7.161 ops/us Iteration 5: 7.184 ops/us Result "sampleBenchmark": 7.162 ±(99.9%) 0.085 ops/us [Average] (min, avg, max) = (7.128, 7.162, 7.184), stdev = 0.022 CI (99.9%): [7.078, 7.247] (assumes normal distribution) # Warmup: 15 iterations, 1 s each # Measurement: 5 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: jmh.sample.mode.SampleBenchmark5.sampleBenchmark # Run progress: 33.32% complete, ETA 00:00:40 # Fork: 1 of 1 # Warmup Iteration 1: 0.180 us/op # Warmup Iteration 2: 0.154 us/op # Warmup Iteration 3: 0.138 us/op # Warmup Iteration 4: 0.139 us/op # Warmup Iteration 5: 0.139 us/op # Warmup Iteration 6: 0.139 us/op # Warmup Iteration 7: 0.141 us/op # Warmup Iteration 8: 0.139 us/op # Warmup Iteration 9: 0.139 us/op # Warmup Iteration 10: 0.139 us/op # Warmup Iteration 11: 0.140 us/op # Warmup Iteration 12: 0.141 us/op # Warmup Iteration 13: 0.140 us/op # Warmup Iteration 14: 0.141 us/op # Warmup Iteration 15: 0.141 us/op Iteration 1: 0.140 us/op Iteration 2: 0.141 us/op Iteration 3: 0.139 us/op Iteration 4: 0.140 us/op Iteration 5: 0.140 us/op Result "sampleBenchmark": 0.140 ±(99.9%) 0.002 us/op [Average] (min, avg, max) = (0.139, 0.140, 0.141), stdev = 0.001 CI (99.9%): [0.138, 0.142] (assumes normal distribution) # Warmup: 15 iterations, 1 s each # Measurement: 5 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Sampling time # Benchmark: jmh.sample.mode.SampleBenchmark5.sampleBenchmark # Run progress: 66.64% complete, ETA 00:00:20 # Fork: 1 of 1 # Warmup Iteration 1: 0.632 ±(99.9%) 1.235 us/op # Warmup Iteration 2: 0.225 ±(99.9%) 0.126 us/op # Warmup Iteration 3: 0.154 ±(99.9%) 0.007 us/op # Warmup Iteration 4: 0.156 ±(99.9%) 0.008 us/op # Warmup Iteration 5: 0.162 ±(99.9%) 0.023 us/op # Warmup Iteration 6: 0.155 ±(99.9%) 0.007 us/op # Warmup Iteration 7: 0.178 ±(99.9%) 0.079 us/op # Warmup Iteration 8: 0.160 ±(99.9%) 0.012 us/op # Warmup Iteration 9: 0.156 ±(99.9%) 0.008 us/op # Warmup Iteration 10: 0.160 ±(99.9%) 0.009 us/op # Warmup Iteration 11: 0.155 ±(99.9%) 0.008 us/op # Warmup Iteration 12: 0.158 ±(99.9%) 0.008 us/op # Warmup Iteration 13: 0.157 ±(99.9%) 0.008 us/op # Warmup Iteration 14: 0.156 ±(99.9%) 0.008 us/op # Warmup Iteration 15: 0.156 ±(99.9%) 0.008 us/op Iteration 1: 0.164 ±(99.9%) 0.019 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 9.269 us/op sampleBenchmark·p0.9999: 22.604 us/op sampleBenchmark·p1.00: 141.568 us/op Iteration 2: 0.159 ±(99.9%) 0.009 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 9.215 us/op sampleBenchmark·p0.9999: 17.213 us/op sampleBenchmark·p1.00: 22.016 us/op Iteration 3: 0.158 ±(99.9%) 0.009 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 8.944 us/op sampleBenchmark·p0.9999: 18.053 us/op sampleBenchmark·p1.00: 22.336 us/op Iteration 4: 0.159 ±(99.9%) 0.010 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 8.472 us/op sampleBenchmark·p0.9999: 14.550 us/op sampleBenchmark·p1.00: 46.464 us/op Iteration 5: 0.206 ±(99.9%) 0.105 us/op sampleBenchmark·p0.00: ≈ 0 us/op sampleBenchmark·p0.50: ≈ 0 us/op sampleBenchmark·p0.90: 0.302 us/op sampleBenchmark·p0.95: 0.302 us/op sampleBenchmark·p0.99: 0.303 us/op sampleBenchmark·p0.999: 9.344 us/op sampleBenchmark·p0.9999: 220.982 us/op sampleBenchmark·p1.00: 720.896 us/op Result "sampleBenchmark": N = 135765 mean = 0.169 ±(99.9%) 0.021 us/op Histogram, us/op: [ 0.000, 50.000) = 135761 [ 50.000, 100.000) = 0 [100.000, 150.000) = 2 [150.000, 200.000) = 0 [200.000, 250.000) = 0 [250.000, 300.000) = 0 [300.000, 350.000) = 0 [350.000, 400.000) = 0 [400.000, 450.000) = 1 [450.000, 500.000) = 0 [500.000, 550.000) = 0 [550.000, 600.000) = 0 [600.000, 650.000) = 0 [650.000, 700.000) = 0 [700.000, 750.000) = 1 Percentiles, us/op: p(0.0000) = ≈ 0 us/op p(50.0000) = ≈ 0 us/op p(90.0000) = 0.302 us/op p(95.0000) = 0.302 us/op p(99.0000) = 0.303 us/op p(99.9000) = 9.056 us/op p(99.9900) = 16.235 us/op p(99.9990) = 623.292 us/op p(99.9999) = 720.896 us/op p(100.0000) = 720.896 us/op # Warmup: 15 iterations, single-shot each # Measurement: 5 iterations, single-shot each # Timeout: 10 min per iteration # Threads: 1 thread # Benchmark mode: Single shot invocation time # Benchmark: jmh.sample.mode.SampleBenchmark5.sampleBenchmark # Run progress: 99.97% complete, ETA 00:00:00 # Fork: 1 of 1 # Warmup Iteration 1: 15885.651 us/op # Warmup Iteration 2: 30.187 us/op # Warmup Iteration 3: 20.829 us/op # Warmup Iteration 4: 16.905 us/op # Warmup Iteration 5: 26.866 us/op # Warmup Iteration 6: 15.697 us/op # Warmup Iteration 7: 44.375 us/op # Warmup Iteration 8: 20.225 us/op # Warmup Iteration 9: 18.414 us/op # Warmup Iteration 10: 16.603 us/op # Warmup Iteration 11: 19.019 us/op # Warmup Iteration 12: 17.810 us/op # Warmup Iteration 13: 17.207 us/op # Warmup Iteration 14: 17.508 us/op # Warmup Iteration 15: 18.716 us/op Iteration 1: 18.715 us/op Iteration 2: 19.924 us/op Iteration 3: 19.019 us/op Iteration 4: 19.018 us/op Iteration 5: 16.603 us/op Result "sampleBenchmark": N = 5 mean = 18.656 ±(99.9%) 4.751 us/op Histogram, us/op: [16.000, 16.250) = 0 [16.250, 16.500) = 0 [16.500, 16.750) = 1 [16.750, 17.000) = 0 [17.000, 17.250) = 0 [17.250, 17.500) = 0 [17.500, 17.750) = 0 [17.750, 18.000) = 0 [18.000, 18.250) = 0 [18.250, 18.500) = 0 [18.500, 18.750) = 1 [18.750, 19.000) = 0 [19.000, 19.250) = 2 [19.250, 19.500) = 0 [19.500, 19.750) = 0 Percentiles, us/op: p(0.0000) = 16.603 us/op p(50.0000) = 19.018 us/op p(90.0000) = 19.924 us/op p(95.0000) = 19.924 us/op p(99.0000) = 19.924 us/op p(99.9000) = 19.924 us/op p(99.9900) = 19.924 us/op p(99.9990) = 19.924 us/op p(99.9999) = 19.924 us/op p(100.0000) = 19.924 us/op # Run complete. Total time: 00:01:01 Benchmark Mode Cnt Score Error Units SampleBenchmark5.sampleBenchmark thrpt 5 7.162 ± 0.085 ops/us SampleBenchmark5.sampleBenchmark avgt 5 0.140 ± 0.002 us/op SampleBenchmark5.sampleBenchmark sample 135765 0.169 ± 0.021 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.00 sample ≈ 0 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.50 sample ≈ 0 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.90 sample 0.302 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.95 sample 0.302 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.99 sample 0.303 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.999 sample 9.056 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p0.9999 sample 16.235 us/op SampleBenchmark5.sampleBenchmark:sampleBenchmark·p1.00 sample 720.896 us/op SampleBenchmark5.sampleBenchmark ss 5 18.656 ± 4.751 us/op