Skip to content

Overhead

LinShunKang edited this page Sep 1, 2019 · 1 revision

MyPerf4J's overhead is so minimal that it is difficult to measure on most applications.

We have to use super fast method with response times in the nanoseconds in order to reliably detect and measure MyPerf4J's overhead.

The benchmark below is run against a not inline empty method (benchmarking is performed using the JMH).

Benchmark environment

  • JMH version: 1.21
  • VM version: JDK 1.7.0_80, Java HotSpot(TM) 64-Bit Server VM, 24.80-b11
  • OS: macOS Mojave 10.14.6
  • CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz

Benchmark result

Response times Baseline with MyPerf4J Overhead
Average 2.6 ns 56.8 ns 54.2 ns
90th percentile ≈ 0 ns ≈ 0 ns ≈ 0 ns
95th percentile ≈ 0 ns 1000.0 ns 1000.0 ns
99th percentile 1000.0 ns 1000.0 ns 0.0 ns
99.9th percentile 1000.0 ns 1000.0 ns 0.0 ns

Benchmark details can be found at MyPerf4J-Benchmark

Clone this wiki locally