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
Dependency Management for Java - Code Remix Summit 2026-05-12
sullis
0
12
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
47
Dependency Management for Java - Seattle 2025-11-18
sullis
0
45
Dependency Management for Java - Portland - 2025-11-04
sullis
0
29
Dependency management for Java applications 2025-09-11
sullis
0
47
S3 NYC Iceberg meetup 2025-07-10
sullis
0
56
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
Other Decks in Programming
See All in Programming
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
330
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.6k
My daily life on Ruby
a_matsuda
3
180
20260514_its_the_context_window_stupid.pdf
heita
0
500
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
380
🦞OpenClaw works with AWS
licux
1
330
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
21
11k
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
760
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.6k
From Formal Specification to Property Based Test
ohbarye
0
720
Featured
See All Featured
Docker and Python
trallard
47
3.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
110
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Designing for Timeless Needs
cassininazir
0
220
30 Presentation Tips
portentint
PRO
1
290
Claude Code のすすめ
schroneko
67
220k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.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