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
140
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
S3 NYC Iceberg meetup 2025-07-10
sullis
0
17
Amazon S3 Chicago 2025-06-04
sullis
0
88
Amazon S3 Boston 2025-05-07
sullis
0
43
Netty ConFoo Montreal 2025-02-27
sullis
0
74
GitHub Actions ConFoo Montreal 2025-02-26
sullis
0
46
Netty Portland Java User Group 2025-02-18
sullis
0
8
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
170
Amazon S3 - Portland Java User Group 2024-09-17
sullis
0
97
Netty - Montreal Java User Group 2024-05-21
sullis
0
170
Other Decks in Programming
See All in Programming
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
290
Team operations that are not burdened by SRE
kazatohiei
1
320
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.4k
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
93
31k
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
440
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
110
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1k
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
240
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
280
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
210
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
690
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
4k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
A Modern Web Designer's Workflow
chriscoyier
695
190k
How to train your dragon (web standard)
notwaldorf
96
6.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Practical Orchestrator
shlominoach
189
11k
Making Projects Easy
brettharned
116
6.3k
Fireside Chat
paigeccino
37
3.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Scaling GitHub
holman
460
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The World Runs on Bad Software
bkeepers
PRO
69
11k
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