Skip to content

Instantly share code, notes, and snippets.

@lukestephenson
Created November 15, 2017 22:55
Show Gist options
  • Save lukestephenson/e3271972ee12f25976ffef04ef69e54f to your computer and use it in GitHub Desktop.
Save lukestephenson/e3271972ee12f25976ffef04ef69e54f to your computer and use it in GitHub Desktop.
Streaming benchmark execution
➜ stream-benchmarks git:(master) sbt
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/project
[info] Loading settings from build.sbt ...
[info] Set current project to stream-benchmarks (in build file:/Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/)
[info] sbt server started at 127.0.0.1:4112
sbt:stream-benchmarks> jmh:run -i 3 -wi 3 -f1 -t1 .*Benchmark
[info] Packaging /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/target/scala-2.12/stream-benchmarks_2.12-0.1.jar ...
Processing 9 classes from /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/target/scala-2.12/classes with "reflection" generator
Writing out Java source to /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/target/scala-2.12/src_managed/jmh and resources to /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/target/scala-2.12/resource_managed/jmh
[info] Done packaging.
[info] Packaging /Users/luke.stephenson/projects/lukestephenson/stream-benchmarks/target/scala-2.12/stream-benchmarks_2.12-0.1-jmh.jar ...
[info] Done packaging.
[info] Running (fork) org.openjdk.jmh.Main -i 3 -wi 3 -f1 -t1 .*Benchmark
[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:24
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 2.973 s/op
[info] # Warmup Iteration 2: 3.367 s/op
[info] # Warmup Iteration 3: 3.137 s/op
[info] Iteration 1: 2.829 s/op
[info] Iteration 2: 2.866 s/op
[info] Iteration 3: 2.876 s/op
[info] Result "benchmarks.LargeStreamBenchmark.commonsIo":
[info] 2.857 ±(99.9%) 0.454 s/op [Average]
[info] (min, avg, max) = (2.829, 2.857, 2.876), stdev = 0.025
[info] CI (99.9%): [2.403, 3.311] (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: 25.00% complete, ETA 00:00:56
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 14.739 s/op
[info] # Warmup Iteration 2: 13.749 s/op
[info] # Warmup Iteration 3: 13.075 s/op
[info] Iteration 1: 13.827 s/op
[info] Iteration 2: 13.789 s/op
[info] Iteration 3: 14.045 s/op
[info] Result "benchmarks.LargeStreamBenchmark.fs2Stream":
[info] 13.887 ±(99.9%) 2.516 s/op [Average]
[info] (min, avg, max) = (13.789, 13.887, 14.045), stdev = 0.138
[info] CI (99.9%): [11.371, 16.403] (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: 50.00% complete, ETA 00:01:42
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 3.917 s/op
[info] # Warmup Iteration 2: 3.566 s/op
[info] # Warmup Iteration 3: 3.489 s/op
[info] Iteration 1: 3.564 s/op
[info] Iteration 2: 3.515 s/op
[info] Iteration 3: 3.497 s/op
[info] Result "benchmarks.LargeStreamBenchmark.monixObservable":
[info] 3.526 ±(99.9%) 0.632 s/op [Average]
[info] (min, avg, max) = (3.497, 3.526, 3.564), stdev = 0.035
[info] CI (99.9%): [2.893, 4.158] (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: 75.00% complete, ETA 00:00:41
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 2.758 s/op
[info] # Warmup Iteration 2: 2.500 s/op
[info] # Warmup Iteration 3: 2.514 s/op
[info] Iteration 1: 2.454 s/op
[info] Iteration 2: 2.518 s/op
[info] Iteration 3: 2.500 s/op
[info] Result "benchmarks.LargeStreamBenchmark.monixObservableWithAsyncBoundary":
[info] 2.490 ±(99.9%) 0.600 s/op [Average]
[info] (min, avg, max) = (2.454, 2.490, 2.518), stdev = 0.033
[info] CI (99.9%): [1.890, 3.090] (assumes normal distribution)
[info] # Run complete. Total time: 00:02:20
[info] Benchmark Mode Cnt Score Error Units
[info] LargeStreamBenchmark.commonsIo avgt 3 2.857 ± 0.454 s/op
[info] LargeStreamBenchmark.fs2Stream avgt 3 13.887 ± 2.516 s/op
[info] LargeStreamBenchmark.monixObservable avgt 3 3.526 ± 0.632 s/op
[info] LargeStreamBenchmark.monixObservableWithAsyncBoundary avgt 3 2.490 ± 0.600 s/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment