Captured 30 seconds of second 40 second iteration for each benchmark with:
JMH_PID=$(ps aux | grep -i java | grep org.openjdk.jmh.runner.ForkedMain | awk '{print $2}')
echo $JMH_PID
sudo perf record -F 99 -p $JMH_PID -g -- sleep 30 ; \
java -cp /home/brad/projects/perf-map-agent/code/out/attach-main.jar:/usr/lib/jvm/java-8-openjdk/lib/tools.jar net.virtualvoid.perf.AttachOnce $JMH_PID
In SBT:
> ;bench/jmh:run -i 3 -wi 3 -f1 -t1 -r 40 org.http4s.bench.HeaderStringsBench -jvmArgs -XX:+PreserveFramePointer
[info] Running org.openjdk.jmh.Main -i 3 -wi 3 -f1 -t1 -r 40 org.http4s.bench.HeaderStringsBench -jvmArgs -XX:+PreserveFramePointer
[info] # JMH 1.17.4 (released 15 days ago)
[info] # VM version: JDK 1.8.0_121, VM 25.121-b13
[info] # VM invoker: /usr/lib/jvm/java-8-openjdk/jre/bin/java
[info] # VM options: -XX:+PreserveFramePointer
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 40 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: org.http4s.bench.HeaderStringsBench.string
[info] # Parameters: (size = 16)
[info]
[info] # Run progress: 0.00% complete, ETA 00:04:06
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 0.903 us/op
[info] # Warmup Iteration 2: 0.865 us/op
[info] # Warmup Iteration 3: 0.815 us/op
[info] Iteration 1: 0.818 us/op
[info] Iteration 2: 0.810 us/op
[info] Iteration 3: 0.820 us/op
[info]
[info]
[info] Result "org.http4s.bench.HeaderStringsBench.string":
[info] 0.816 ±(99.9%) 0.103 us/op [Average]
[info] (min, avg, max) = (0.810, 0.816, 0.820), stdev = 0.006
[info] CI (99.9%): [0.713, 0.919] (assumes normal distribution)
[info]
[info]
[info] # JMH 1.17.4 (released 15 days ago)
[info] # VM version: JDK 1.8.0_121, VM 25.121-b13
[info] # VM invoker: /usr/lib/jvm/java-8-openjdk/jre/bin/java
[info] # VM options: -XX:+PreserveFramePointer
[info] # Warmup: 3 iterations, 1 s each
[info] # Measurement: 3 iterations, 40 s each
[info] # Timeout: 10 min per iteration
[info] # Threads: 1 thread, will synchronize iterations
[info] # Benchmark mode: Average time, time/op
[info] # Benchmark: org.http4s.bench.HeaderStringsBench.szb
[info] # Parameters: (size = 16)
[info]
[info] # Run progress: 50.00% complete, ETA 00:02:03
[info] # Fork: 1 of 1
[info] # Warmup Iteration 1: 2.935 us/op
[info] # Warmup Iteration 2: 2.719 us/op
[info] # Warmup Iteration 3: 2.652 us/op
[info] Iteration 1: 2.526 us/op
[info] Iteration 2: 2.476 us/op
[info] Iteration 3: 2.501 us/op
[info]
[info]
[info] Result "org.http4s.bench.HeaderStringsBench.szb":
[info] 2.501 ±(99.9%) 0.450 us/op [Average]
[info] (min, avg, max) = (2.476, 2.501, 2.526), stdev = 0.025
[info] CI (99.9%): [2.051, 2.951] (assumes normal distribution)
[info]
[info]
[info] # Run complete. Total time: 00:04:07
[info]
[info] Benchmark (size) Mode Cnt Score Error Units
[info] HeaderStringsBench.string 16 avgt 3 0.816 ± 0.103 us/op
[info] HeaderStringsBench.szb 16 avgt 3 2.501 ± 0.450 us/op
[success] Total time: 248 s, completed Feb 2, 2017 3:06:06 PM