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
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Microbenchmarking with JMH - Portland 2023-03-14
Microbenchmarking with JMH
Portland Java User Group
March 14, 2023
Portland Oregon
sullis
March 14, 2023
More Decks by sullis
See All by sullis
Dependency Management for Java - Code Remix Summit 2026-05-12
sullis
0
83
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
90
Dependency Management for Java - Seattle 2025-11-18
sullis
0
60
Dependency Management for Java - Portland - 2025-11-04
sullis
0
40
Dependency management for Java applications 2025-09-11
sullis
0
62
S3 NYC Iceberg meetup 2025-07-10
sullis
0
65
Amazon S3 Chicago 2025-06-04
sullis
0
150
Amazon S3 Boston 2025-05-07
sullis
0
120
Netty ConFoo Montreal 2025-02-27
sullis
0
190
Other Decks in Programming
See All in Programming
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
250
Oxlintはいいぞ(続)
yug1224
1
470
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
630
リアルな遅延を測る仕様
kota_yata
1
130
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
540
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
170
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
160
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
450
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.3k
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
110
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
270
Cloudflare is Agents
chimame
0
180
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
280
Designing for humans not robots
tammielis
254
26k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
380
HDC tutorial
michielstock
2
820
The SEO Collaboration Effect
kristinabergwall1
1
530
Thoughts on Productivity
jonyablonski
76
5.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
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