Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a JMH test for Interval encoding
The test compares the previous and the proposed solutions. It confirms the assumptions about the proposed solution: - about twice as fast - removes pressure on GC # JMH version: 1.19 # VM version: JDK 1.8.0_422, VM 25.422-b05 # VM options: -Xms8g -Xmx8g -Xmn7g # Warmup: 20 iterations, 1 s each # Measurement: 10 iterations, 2 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time Benchmark Mode Cnt Score Error Units IntervalBenchmarks.encodeWithDurationAndPeriod thrpt 30 46339.530 ± 389.115 ops/ms IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.alloc.rate thrpt 30 3393.324 ± 28.481 MB/sec IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.alloc.rate.norm thrpt 30 96.000 ± 0.001 B/op IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.churn.PS_Eden_Space thrpt 30 3436.887 ± 778.345 MB/sec IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.churn.PS_Eden_Space.norm thrpt 30 97.302 ± 22.205 B/op IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.churn.PS_Survivor_Space thrpt 30 0.005 ± 0.006 MB/sec IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.churn.PS_Survivor_Space.norm thrpt 30 ≈ 10⁻⁴ B/op IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.count thrpt 30 36.000 counts IntervalBenchmarks.encodeWithDurationAndPeriod:·gc.time thrpt 30 30.000 ms IntervalBenchmarks.encodeWithParts thrpt 30 82322.542 ± 109.306 ops/ms IntervalBenchmarks.encodeWithParts:·gc.alloc.rate thrpt 30 ≈ 10⁻⁴ MB/sec IntervalBenchmarks.encodeWithParts:·gc.alloc.rate.norm thrpt 30 ≈ 10⁻⁶ B/op IntervalBenchmarks.encodeWithParts:·gc.count thrpt 30 ≈ 0 counts Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
- Loading branch information