Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Microbenchmarking with JMH - Portland 2023-03-14
Search
sullis
March 14, 2023
Programming
0
160
Microbenchmarking with JMH - Portland 2023-03-14
Microbenchmarking with JMH
Portland Java User Group
March 14, 2023
Portland Oregon
sullis
March 14, 2023
Tweet
Share
More Decks by sullis
See All by sullis
Dependency Management for Java - Seattle 2025-11-18
sullis
0
18
Dependency Management for Java - Portland - 2025-11-04
sullis
0
15
Dependency management for Java applications 2025-09-11
sullis
0
24
S3 NYC Iceberg meetup 2025-07-10
sullis
0
49
Amazon S3 Chicago 2025-06-04
sullis
0
120
Amazon S3 Boston 2025-05-07
sullis
0
87
Netty ConFoo Montreal 2025-02-27
sullis
0
130
GitHub Actions ConFoo Montreal 2025-02-26
sullis
0
92
Netty Portland Java User Group 2025-02-18
sullis
0
30
Other Decks in Programming
See All in Programming
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
250
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
190
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
250
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
340
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
150
これならできる!個人開発のすゝめ
tinykitten
PRO
0
150
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2.2k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
660
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.4k
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
360
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
2
170
We Are The Robots
honzajavorek
0
130
Designing for Performance
lara
610
70k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
43
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
180
Designing Experiences People Love
moore
143
24k
Paper Plane (Part 1)
katiecoart
PRO
0
3.1k
We Have a Design System, Now What?
morganepeng
54
8k
Optimizing for Happiness
mojombo
379
70k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
210
How to Think Like a Performance Engineer
csswizardry
28
2.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
60
Transcript
Microbenchmarking with JMH Sean Sullivan Portland Java User Group March
14, 2023
Java Microbenchmark Harness “JMH is a Java harness for building,
running, and analysing nano/micro/milli/macro benchmarks written in Java and other languages targeting the JVM.”
OSS projects that use JMH • Netty • Log4j2 •
Spring Framework • Apache Cassandra • Apache Kafka • Netflix Atlas • Netflix Spectator • Netflix Zuul
NOTE: JMH is not intended to be used in the
same way as a typical testing library such as JUnit. Simply adding the jmh-core jar file to your build is not enough to be able to run benchmarks.
“the key to using JMH is enabling the annotation- or
bytecode-processors to generate the synthetic benchmark code”
“Running benchmarks from the IDE is generally not recommended due
to generally uncontrolled environment in which the benchmarks run.”
Zuul: HeadersBenchmark
Zuul: HeadersBenchmark
Zuul: HeadersBenchmark
Zuul: HeadersBenchmark
Zuul: build.gradle jmh-gradle-plugin
Zuul: HeadersBenchmark ./gradlew --no-daemon clean :zuul-core:jmh
Learning JMH
Learning JMH
Learning JMH
microbenchmarks-java • CompressionBenchmark • CounterBenchmark • HttpHeadersBenchmark • Log4j2ClockBenchmark •
RandomBenchmark • UuidBenchmark
CompressionBenchmark • Goal: measure throughput of Gzip compression • Goal:
measure throughput of Brotli compression • Goal: evaluate Brotli compression parameters
CompressionBenchmark public enum CompressionType • GZIP • BROTLI_0 • BROTLI_4
• BROTLI_11
CompressionBenchmark
CompressionBenchmark
CompressionBenchmark # JMH version: 1.36 # VM version: JDK 17.0.6,
OpenJDK 64-Bit Server VM, 17.0.6+10-LTS # Warmup: 2 iterations, 10 s each # Measurement: 5 iterations, 10 s each # Threads: 1 thread, will synchronize iterations # Benchmark mode: Throughput, ops/time
CompressionBenchmark
The End