Skip to content

Instantly share code, notes, and snippets.

@lukestephenson
Created November 16, 2017 23:25
Show Gist options
  • Save lukestephenson/625e5011b8acaf5e50ad49798c8d142f to your computer and use it in GitHub Desktop.
Save lukestephenson/625e5011b8acaf5e50ad49798c8d142f to your computer and use it in GitHub Desktop.
Added monix NIO benchmark
sbt:stream-benchmarks> jmh:run -i 3 -wi 3 -f1 -t1 .*LargeStreamBenchmark.*
[info] Running (fork) org.openjdk.jmh.Main -i 3 -wi 3 -f1 -t1 .*LargeStreamBenchmark.*
[info] # JMH version: 1.19
[info] # VM version: JDK 1.8.0_144, VM 25.144-b01
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/bin/java
[info] # VM options: <none>
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 1 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: benchmarks.LargeStreamBenchmark.commonsIo
[info] # Run progress: 0.00% complete, ETA 00:00:30
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 4.276 s/op
[info] # Warmup Iteration 2: 7.945 s/op
[info] # Warmup Iteration 3: 4.098 s/op
[info] Iteration 1: 3.723 s/op
[info] Iteration 2: 3.753 s/op
[info] Iteration 3: 3.560 s/op
[info] Result "benchmarks.LargeStreamBenchmark.commonsIo":
[info] 3.679 ±(99.9%) 1.901 s/op [Average]
[info] (min, avg, max) = (3.560, 3.679, 3.753), stdev = 0.104
[info] CI (99.9%): [1.778, 5.579] (assumes normal distribution)
[info] # JMH version: 1.19
[info] # VM version: JDK 1.8.0_144, VM 25.144-b01
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/bin/java
[info] # VM options: <none>
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 1 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: benchmarks.LargeStreamBenchmark.fs2Stream
[info] # Run progress: 20.00% complete, ETA 00:01:52
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 37.257 s/op
[info] # Warmup Iteration 2: 34.799 s/op
[info] # Warmup Iteration 3: 34.723 s/op
[info] Iteration 1: 38.435 s/op
[info] Iteration 2: 42.690 s/op
[info] Iteration 3: 39.593 s/op
[info] Result "benchmarks.LargeStreamBenchmark.fs2Stream":
[info] 40.239 ±(99.9%) 40.137 s/op [Average]
[info] (min, avg, max) = (38.435, 40.239, 42.690), stdev = 2.200
[info] CI (99.9%): [0.102, 80.377] (assumes normal distribution)
[info] # JMH version: 1.19
[info] # VM version: JDK 1.8.0_144, VM 25.144-b01
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/bin/java
[info] # VM options: <none>
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 1 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: benchmarks.LargeStreamBenchmark.monixNioBenchmark
[info] # Run progress: 40.00% complete, ETA 00:06:24
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 11.368 s/op
[info] # Warmup Iteration 2: 9.745 s/op
[info] # Warmup Iteration 3: 9.466 s/op
[info] Iteration 1: 8.303 s/op
[info] Iteration 2: 6.995 s/op
[info] Iteration 3: 4.209 s/op
[info] Result "benchmarks.LargeStreamBenchmark.monixNioBenchmark":
[info] 6.502 ±(99.9%) 38.149 s/op [Average]
[info] (min, avg, max) = (4.209, 6.502, 8.303), stdev = 2.091
[info] CI (99.9%): [≈ 0, 44.651] (assumes normal distribution)
[info] # JMH version: 1.19
[info] # VM version: JDK 1.8.0_144, VM 25.144-b01
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/bin/java
[info] # VM options: <none>
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 1 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: benchmarks.LargeStreamBenchmark.monixObservable
[info] # Run progress: 60.00% complete, ETA 00:03:24
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 4.673 s/op
[info] # Warmup Iteration 2: 4.358 s/op
[info] # Warmup Iteration 3: 4.368 s/op
[info] Iteration 1: 4.375 s/op
[info] Iteration 2: 4.136 s/op
[info] Iteration 3: 4.039 s/op
[info] Result "benchmarks.LargeStreamBenchmark.monixObservable":
[info] 4.183 ±(99.9%) 3.154 s/op [Average]
[info] (min, avg, max) = (4.039, 4.183, 4.375), stdev = 0.173
[info] CI (99.9%): [1.029, 7.337] (assumes normal distribution)
[info] # JMH version: 1.19
[info] # VM version: JDK 1.8.0_144, VM 25.144-b01
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/bin/java
[info] # VM options: <none>
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 1 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: benchmarks.LargeStreamBenchmark.monixObservableWithAsyncBoundary
[info] # Run progress: 80.00% complete, ETA 00:01:23
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 3.544 s/op
[info] # Warmup Iteration 2: 3.319 s/op
[info] # Warmup Iteration 3: 3.013 s/op
[info] Iteration 1: 3.149 s/op
[info] Iteration 2: 3.134 s/op
[info] Iteration 3: 3.325 s/op
[info] Result "benchmarks.LargeStreamBenchmark.monixObservableWithAsyncBoundary":
[info] 3.203 ±(99.9%) 1.938 s/op [Average]
[info] (min, avg, max) = (3.134, 3.203, 3.325), stdev = 0.106
[info] CI (99.9%): [1.265, 5.141] (assumes normal distribution)
[info] # Run complete. Total time: 00:05:54
[info] Benchmark Mode Cnt Score Error Units
[info] LargeStreamBenchmark.commonsIo avgt 3 3.679 ± 1.901 s/op
[info] LargeStreamBenchmark.fs2Stream avgt 3 40.239 ± 40.137 s/op
[info] LargeStreamBenchmark.monixNioBenchmark avgt 3 6.502 ± 38.149 s/op
[info] LargeStreamBenchmark.monixObservable avgt 3 4.183 ± 3.154 s/op
[info] LargeStreamBenchmark.monixObservableWithAsyncBoundary avgt 3 3.203 ± 1.938 s/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment