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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sullis
March 14, 2023
Programming
170
0
Share
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
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
30
Dependency Management for Java - Seattle 2025-11-18
sullis
0
42
Dependency Management for Java - Portland - 2025-11-04
sullis
0
26
Dependency management for Java applications 2025-09-11
sullis
0
35
S3 NYC Iceberg meetup 2025-07-10
sullis
0
54
Amazon S3 Chicago 2025-06-04
sullis
0
130
Amazon S3 Boston 2025-05-07
sullis
0
100
Netty ConFoo Montreal 2025-02-27
sullis
0
160
GitHub Actions ConFoo Montreal 2025-02-26
sullis
0
100
Other Decks in Programming
See All in Programming
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
190
事業会社でのセキュリティ長期インターンについて
masachikaura
0
240
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
200
KagglerがMixSeekを触ってみた
morim
0
370
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
ファインチューニングせずメインコンペを解く方法
pokutuna
0
300
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
1k
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
460
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
300
Java 21/25 Virtual Threads 소개
debop
0
340
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
390
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Unsuck your backbone
ammeep
672
58k
Building Applications with DynamoDB
mza
96
7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
260
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
360
Statistics for Hackers
jakevdp
799
230k
The Limits of Empathy - UXLibs8
cassininazir
1
290
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
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