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
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
52
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
62
Dependency Management for Java - Seattle 2025-11-18
sullis
0
49
Dependency Management for Java - Portland - 2025-11-04
sullis
0
35
Dependency management for Java applications 2025-09-11
sullis
0
52
S3 NYC Iceberg meetup 2025-07-10
sullis
0
58
Amazon S3 Chicago 2025-06-04
sullis
0
140
Amazon S3 Boston 2025-05-07
sullis
0
110
Netty ConFoo Montreal 2025-02-27
sullis
0
170
Other Decks in Programming
See All in Programming
Modding RubyKaigi for Myself
yui_knk
0
860
ふつうのFeature Flag実践入門
irof
7
3.5k
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
Inspired By RubyKaigi (EN)
atzzcokek
0
500
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
430
Swiftのレキシカルスコープ管理
kntkymt
0
210
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
11k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
OSもどきOS
arkw
0
380
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
460
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
700
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
220
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
WENDY [Excerpt]
tessaabrams
11
38k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Color Theory Basics | Prateek | Gurzu
gurzu
0
320
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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