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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
81
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
87
Dependency Management for Java - Seattle 2025-11-18
sullis
0
59
Dependency Management for Java - Portland - 2025-11-04
sullis
0
39
Dependency management for Java applications 2025-09-11
sullis
0
62
S3 NYC Iceberg meetup 2025-07-10
sullis
0
64
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
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
300
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
730
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
200
Go 1.27 における memory allocation の高速化
andpad
0
300
Oxlintはいいぞ(続)
yug1224
1
410
プロポーザルを書いてもらう
pvcresin
0
580
Cloudflare is Agents
chimame
0
180
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
290
Dockerfile CMD for Node.js
grazie1999
0
120
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.8k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
240
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
220
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Test your architecture with Archunit
thirion
2
2.4k
The Curious Case for Waylosing
cassininazir
1
480
Designing Powerful Visuals for Engaging Learning
tmiket
1
510
Designing Experiences People Love
moore
143
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
810
Paper Plane
katiecoart
PRO
2
53k
Evolving SEO for Evolving Search Engines
ryanjones
0
260
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
GraphQLとの向き合い方2022年版
quramy
50
15k
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