Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stevenschlansker/b7769735ce3205f017f2ae5cf398f933 to your computer and use it in GitHub Desktop.
Save stevenschlansker/b7769735ce3205f017f2ae5cf398f933 to your computer and use it in GitHub Desktop.
# JMH version: 1.21
# VM version: JDK 11.0.1, OpenJDK 64-Bit Server VM, 11.0.1+13
# VM invoker: /usr/lib/jvm/java-11-openjdk-11.0.1.13-10.fc29.x86_64/bin/java
# VM options: <none>
# Warmup: 5 iterations, 2 s each
# Measurement: 5 iterations, 5 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseInsensitive
# Run progress: 0.00% complete, ETA 00:01:10
# Fork: 1 of 1
# Warmup Iteration 1: 5179.987 ops/s
# Warmup Iteration 2: 9912.544 ops/s
# Warmup Iteration 3: 10339.744 ops/s
# Warmup Iteration 4: 10372.503 ops/s
# Warmup Iteration 5: 10203.775 ops/s
Iteration 1: 10361.903 ops/s
·stack: <delayed till summary>
Iteration 2: 10437.325 ops/s
·stack: <delayed till summary>
Iteration 3: 10462.695 ops/s
·stack: <delayed till summary>
Iteration 4: 10381.957 ops/s
·stack: <delayed till summary>
Iteration 5: 10180.735 ops/s
·stack: <delayed till summary>
Result "org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseInsensitive":
10364.923 ±(99.9%) 426.301 ops/s [Average]
(min, avg, max) = (10180.735, 10364.923, 10462.695), stdev = 110.709
CI (99.9%): [9938.622, 10791.224] (assumes normal distribution)
Secondary result "org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseInsensitive:·stack":
Stack profiler:
....[Thread state distributions]....................................................................
66.7% TIMED_WAITING
33.3% RUNNABLE
....[Thread state: TIMED_WAITING]...................................................................
33.3% 50.0% java.lang.Object.wait
33.3% 50.0% jdk.internal.misc.Unsafe.park
....[Thread state: RUNNABLE]........................................................................
6.5% 19.5% java.util.concurrent.ConcurrentHashMap.computeIfAbsent
6.5% 19.4% org.jdbi.v3.core.result.ResultSetResultIterator.safeNext
5.2% 15.6% org.h2.jdbc.JdbcResultSet.getString
4.7% 14.2% org.jdbi.v3.core.mapper.EnumMapper$ByName.map
4.0% 12.1% java.util.stream.ReduceOps$3ReducingSink.accept
1.2% 3.6% org.jdbi.v3.core.result.ResultSetResultIterator.next
0.6% 1.9% java.util.HashMap.putVal
0.4% 1.2% org.jdbi.v3.core.mapper.SingleColumnMapper.map
0.4% 1.1% net.jodah.expiringmap.ExpiringMap.getEntry
0.3% 0.9% java.util.Arrays.hashCode
3.5% 10.4% <other>
# JMH version: 1.21
# VM version: JDK 11.0.1, OpenJDK 64-Bit Server VM, 11.0.1+13
# VM invoker: /usr/lib/jvm/java-11-openjdk-11.0.1.13-10.fc29.x86_64/bin/java
# VM options: <none>
# Warmup: 5 iterations, 2 s each
# Measurement: 5 iterations, 5 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseSensitive
# Run progress: 50.00% complete, ETA 00:00:35
# Fork: 1 of 1
# Warmup Iteration 1: 7330.646 ops/s
# Warmup Iteration 2: 13567.103 ops/s
# Warmup Iteration 3: 13632.598 ops/s
# Warmup Iteration 4: 13644.009 ops/s
# Warmup Iteration 5: 13766.921 ops/s
Iteration 1: 14120.707 ops/s
·stack: <delayed till summary>
Iteration 2: 13875.930 ops/s
·stack: <delayed till summary>
Iteration 3: 14087.738 ops/s
·stack: <delayed till summary>
Iteration 4: 13786.650 ops/s
·stack: <delayed till summary>
Iteration 5: 14004.372 ops/s
·stack: <delayed till summary>
Result "org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseSensitive":
13975.079 ±(99.9%) 544.881 ops/s [Average]
(min, avg, max) = (13786.650, 13975.079, 14120.707), stdev = 141.504
CI (99.9%): [13430.198, 14519.960] (assumes normal distribution)
Secondary result "org.jdbi.v3.core.qualifier.EnumBenchmark.mapEnumCaseSensitive:·stack":
Stack profiler:
....[Thread state distributions]....................................................................
66.7% TIMED_WAITING
33.3% RUNNABLE
....[Thread state: TIMED_WAITING]...................................................................
33.3% 50.0% java.lang.Object.wait
33.3% 50.0% jdk.internal.misc.Unsafe.park
....[Thread state: RUNNABLE]........................................................................
6.8% 20.4% org.jdbi.v3.core.result.ResultSetResultIterator.safeNext
5.8% 17.3% java.util.concurrent.ConcurrentHashMap.computeIfAbsent
4.9% 14.8% java.util.Iterator.forEachRemaining
4.6% 13.9% org.h2.jdbc.JdbcResultSet.getString
2.2% 6.7% org.jdbi.v3.core.mapper.EnumMapper$ByName.map
1.8% 5.3% org.h2.message.Trace.isEnabled
1.0% 2.9% org.jdbi.v3.core.result.ResultSetResultIterator.next
0.8% 2.3% java.util.HashMap.putVal
0.5% 1.4% java.util.Arrays.hashCode
0.3% 0.9% org.jdbi.v3.core.mapper.ColumnMappers.<init>
4.7% 14.2% <other>
# Run complete. Total time: 00:01:11
REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on
why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial
experiments, perform baseline and negative tests that provide experimental control, make sure
the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts.
Do not assume the numbers tell you what you want them to tell.
Benchmark Mode Cnt Score Error Units
EnumBenchmark.mapEnumCaseInsensitive thrpt 5 10364.923 ± 426.301 ops/s
EnumBenchmark.mapEnumCaseInsensitive:·stack thrpt NaN ---
EnumBenchmark.mapEnumCaseSensitive thrpt 5 13975.079 ± 544.881 ops/s
EnumBenchmark.mapEnumCaseSensitive:·stack thrpt NaN ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment