Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Microbenchmarking with JMH - Portland 2023-03-14
Search
sullis
March 14, 2023
Programming
190
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
87
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
96
Dependency Management for Java - Seattle 2025-11-18
sullis
0
66
Dependency Management for Java - Portland - 2025-11-04
sullis
0
46
Dependency management for Java applications 2025-09-11
sullis
0
65
S3 NYC Iceberg meetup 2025-07-10
sullis
0
67
Amazon S3 Chicago 2025-06-04
sullis
0
160
Amazon S3 Boston 2025-05-07
sullis
0
130
Netty ConFoo Montreal 2025-02-27
sullis
0
190
Other Decks in Programming
See All in Programming
Security issues being discussed on Web Platforms
petamoriken
0
940
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
220
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
アクセシビリティから考える情報設計
high_g_engineer
0
380
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
280
自分的「カンファレンスの楽しみ方」
syumai
0
200
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
460
速習iPhone Duo対応
yuukiw00w
1
490
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
Java 27新機能 / Java 27 new features
kishida
2
140
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
200
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
WCS-LA-2024
lcolladotor
0
830
The SEO Collaboration Effect
kristinabergwall1
1
560
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
The Limits of Empathy - UXLibs8
cassininazir
1
670
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
650
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