1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
| # JMH version: 1.23 # VM version: JDK 1.8.0_171, Java HotSpot(TM) 64-Bit Server VM, 25.171-b11 # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java # VM options: -Dfile.encoding=UTF-8 # Warmup: 3 iterations, 10 s each # Measurement: 10 iterations, 10 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatString
# Run progress: 0.00% complete, ETA 00:10:50 # Fork: 1 of 1 # Warmup Iteration 1: 698627.190 ops/s # Warmup Iteration 2: 873835.360 ops/s # Warmup Iteration 3: 870972.646 ops/s Iteration 1: 875650.632 ops/s Iteration 2: 872407.599 ops/s Iteration 3: 864390.061 ops/s Iteration 4: 872456.756 ops/s Iteration 5: 870538.248 ops/s Iteration 6: 861600.599 ops/s Iteration 7: 868469.312 ops/s Iteration 8: 868930.572 ops/s Iteration 9: 864686.616 ops/s Iteration 10: 854205.911 ops/s
Result "com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatString": 867333.631 ±(99.9%) 9510.553 ops/s [Average] (min, avg, max) = (854205.911, 867333.631, 875650.632), stdev = 6290.642 CI (99.9%): [857823.077, 876844.184] (assumes normal distribution)
# JMH version: 1.23 # VM version: JDK 1.8.0_171, Java HotSpot(TM) 64-Bit Server VM, 25.171-b11 # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java # VM options: -Dfile.encoding=UTF-8 # Warmup: 3 iterations, 10 s each # Measurement: 10 iterations, 10 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringApache
# Run progress: 20.00% complete, ETA 00:08:42 # Fork: 1 of 1 # Warmup Iteration 1: 1922497.366 ops/s # Warmup Iteration 2: 2121425.254 ops/s # Warmup Iteration 3: 2142439.041 ops/s Iteration 1: 2174791.808 ops/s Iteration 2: 2101868.007 ops/s Iteration 3: 2174003.026 ops/s Iteration 4: 2202522.277 ops/s Iteration 5: 2039234.570 ops/s Iteration 6: 2105338.449 ops/s Iteration 7: 2205933.974 ops/s Iteration 8: 2175865.041 ops/s Iteration 9: 2167544.736 ops/s Iteration 10: 2235077.658 ops/s
Result "com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringApache": 2158217.955 ±(99.9%) 89012.866 ops/s [Average] (min, avg, max) = (2039234.570, 2158217.955, 2235077.658), stdev = 58876.499 CI (99.9%): [2069205.089, 2247230.821] (assumes normal distribution)
# JMH version: 1.23 # VM version: JDK 1.8.0_171, Java HotSpot(TM) 64-Bit Server VM, 25.171-b11 # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java # VM options: -Dfile.encoding=UTF-8 # Warmup: 3 iterations, 10 s each # Measurement: 10 iterations, 10 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringApacheStaticPattern
# Run progress: 40.00% complete, ETA 00:06:31 # Fork: 1 of 1 # Warmup Iteration 1: 1964208.975 ops/s # Warmup Iteration 2: 2138997.654 ops/s # Warmup Iteration 3: 2164194.409 ops/s Iteration 1: 2221565.433 ops/s Iteration 2: 2231776.725 ops/s Iteration 3: 2210494.794 ops/s Iteration 4: 2057487.199 ops/s Iteration 5: 2111366.133 ops/s Iteration 6: 2150355.985 ops/s Iteration 7: 2116673.562 ops/s Iteration 8: 2140376.847 ops/s Iteration 9: 2099801.246 ops/s Iteration 10: 2071777.579 ops/s
Result "com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringApacheStaticPattern": 2141167.550 ±(99.9%) 93715.889 ops/s [Average] (min, avg, max) = (2057487.199, 2141167.550, 2231776.725), stdev = 61987.258 CI (99.9%): [2047451.661, 2234883.440] (assumes normal distribution)
# JMH version: 1.23 # VM version: JDK 1.8.0_171, Java HotSpot(TM) 64-Bit Server VM, 25.171-b11 # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java # VM options: -Dfile.encoding=UTF-8 # Warmup: 3 iterations, 10 s each # Measurement: 10 iterations, 10 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringJoda
# Run progress: 60.00% complete, ETA 00:04:21 # Fork: 1 of 1 # Warmup Iteration 1: 2767967.530 ops/s # Warmup Iteration 2: 2839342.269 ops/s # Warmup Iteration 3: 2824726.959 ops/s Iteration 1: 2859527.645 ops/s Iteration 2: 2799624.402 ops/s Iteration 3: 2876558.678 ops/s Iteration 4: 2862478.579 ops/s Iteration 5: 2882872.177 ops/s Iteration 6: 2860788.081 ops/s Iteration 7: 2742885.180 ops/s Iteration 8: 2779727.212 ops/s Iteration 9: 2719266.181 ops/s Iteration 10: 2644311.112 ops/s
Result "com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringJoda": 2802803.925 ±(99.9%) 121600.833 ops/s [Average] (min, avg, max) = (2644311.112, 2802803.925, 2882872.177), stdev = 80431.422 CI (99.9%): [2681203.092, 2924404.757] (assumes normal distribution)
# JMH version: 1.23 # VM version: JDK 1.8.0_171, Java HotSpot(TM) 64-Bit Server VM, 25.171-b11 # VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java # VM options: -Dfile.encoding=UTF-8 # Warmup: 3 iterations, 10 s each # Measurement: 10 iterations, 10 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time # Benchmark: com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringJodaStaticPattern
# Run progress: 80.00% complete, ETA 00:02:10 # Fork: 1 of 1 # Warmup Iteration 1: 2711358.480 ops/s # Warmup Iteration 2: 2823432.725 ops/s # Warmup Iteration 3: 2745545.759 ops/s Iteration 1: 2752446.099 ops/s Iteration 2: 2792047.450 ops/s Iteration 3: 2828389.094 ops/s Iteration 4: 2799921.909 ops/s Iteration 5: 2670924.332 ops/s Iteration 6: 2533779.871 ops/s Iteration 7: 2733321.639 ops/s Iteration 8: 2738839.592 ops/s Iteration 9: 2802775.869 ops/s Iteration 10: 2796738.055 ops/s
Result "com.jd.finance.jrpaypassword.performance.DateConvertTest.dateFormatStringJodaStaticPattern": 2744918.391 ±(99.9%) 131925.235 ops/s [Average] (min, avg, max) = (2533779.871, 2744918.391, 2828389.094), stdev = 87260.375 CI (99.9%): [2612993.156, 2876843.626] (assumes normal distribution)
# Run complete. Total time: 00:10:52
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 DateConvertTest.dateFormatString thrpt 10 867333.631 ± 9510.553 ops/s DateConvertTest.dateFormatStringApache thrpt 10 2158217.955 ± 89012.866 ops/s DateConvertTest.dateFormatStringApacheStaticPattern thrpt 10 2141167.550 ± 93715.889 ops/s DateConvertTest.dateFormatStringJoda thrpt 10 2802803.925 ± 121600.833 ops/s DateConvertTest.dateFormatStringJodaStaticPattern thrpt 10 2744918.391 ± 131925.235 ops/s
|