SlideShare a Scribd company logo
Brought to you by
Continuous Performance
Regression Testing with JfrUnit
Gunnar Morling
Principal Software Engineer at
Today’s Objective: Learn About...
■ Implementing performance regression tests with JDK Flight Recorder
and JfrUnit
■ Analyzing performance regressions in JDK Mission Control
■ Emitting JFR events from 3rd party libraries
Gunnar Morling
Principal Software Engineer at Red Hat
■ Debezium
■ Quarkus
■ JfrUnit, ModiTect, kcctl
■ Spec Lead for Bean Validation 2.0
■ Java Champion
■ @gunnarmorling
Challenges of Performance Tests
■ Tests based on throughput or latency are dependent on specifics of the
environment
● Require production-like set-up
● Impacted by unrelated concurrent load (e.g. on CI server)
JfrUnit — Assert Performance Impacting Metrics
■ Assert proxy metrics like memory allocation or IO
● Based on JDK Flight
Recorder events
● Failures may indicate a
performance regression
■ Plain unit tests
■ Analyse in JDK Mission Control
Hello, JfrUnit!
Tools
OpenJDK Flight Recorder
■ “Troubleshooting, monitoring, and profiling framework
embedded into the JVM”
■ 150+ built-in event types; custom ones
■ Open-source since Java 11 (backported to 8)
■ Low overhead, meant for “always-on”
■ Accessible via recording files and streaming
JFR Event Types
https://bestsolution-at.github.io/jfr-doc/
OpenJDK Mission Control
■ Control, visualize, and
analyze JFR recordings
■ And more:
● JMX console
● heap dump analyzer
● etc.
Demo Time!
JfrUnit — Discussion and Limitations
■ Robust tests with very fast feedback cycle
● Independent from environment
● Proactive identification of issues
■ Metrics need solid understanding; e.g. increased allocation may or may not
be a problem
■ Cannot identify all issues, e.g. locks showing up only under load
■ Won’t help with issues elsewhere, e.g. a bad query execution plan
Wrap-Up
Take Aways
■ JfrUnit: a tool in the performance testing box
● Complement - no replacement - for other tests
■ JMC Agent: produce events from code not under your control
■ Move beyond Java 1.8 🚀
Outlook — Keeping Track of Historic Values
https://horreum.hyperfoil.io/
Resources
■ JfrUnit
https://github.com/moditect/jfrunit
■ Introduction to JfrUnit
https://www.morling.dev/blog/towards-continuous-performance-regression-t
esting/
■ Introduction to JMC Agent
https://developers.redhat.com/blog/2020/10/29/collect-jdk-flight-recorder-ev
ents-at-runtime-with-jmc-agent/
■ Profiling Java inside containers with ContainerJFR
https://developers.redhat.com/devnation/tech-talks/containerjfr
Brought to you by
Gunnar Morling
gunnar@hibernate.org
@gunnarmorling

More Related Content

PDF
Data Structures for High Resolution, Real-time Telemetry at Scale
PDF
Using eBPF to Measure the k8s Cluster Health
PDF
Keeping Latency Low and Throughput High with Application-level Priority Manag...
PDF
Get Lower Latency and Higher Throughput for Java Applications
PDF
Crimson: Ceph for the Age of NVMe and Persistent Memory
PDF
Where Did All These Cycles Go?
PDF
Let’s Fix Logging Once and for All
PDF
Vanquishing Latency Outliers in the Lightbits LightOS Software Defined Storag...
Data Structures for High Resolution, Real-time Telemetry at Scale
Using eBPF to Measure the k8s Cluster Health
Keeping Latency Low and Throughput High with Application-level Priority Manag...
Get Lower Latency and Higher Throughput for Java Applications
Crimson: Ceph for the Age of NVMe and Persistent Memory
Where Did All These Cycles Go?
Let’s Fix Logging Once and for All
Vanquishing Latency Outliers in the Lightbits LightOS Software Defined Storag...

What's hot (20)

PDF
Understanding Apache Kafka P99 Latency at Scale
PDF
Whoops! I Rewrote It in Rust
PDF
High-Performance Networking Using eBPF, XDP, and io_uring
PDF
Rust, Wright's Law, and the Future of Low-Latency Systems
PDF
Unikraft: Fast, Specialized Unikernels the Easy Way
PDF
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
PDF
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
PDF
Spying on the Linux kernel for fun and profit
ODP
Realtime
PDF
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
ODP
Rust Primer
PDF
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
PDF
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
PPTX
Java performance monitoring
PPTX
Introduction to GraalVM
PDF
An Introduction to the Formalised Memory Model for Linux Kernel
PDF
gcma: guaranteed contiguous memory allocator
PDF
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
PDF
[POSS 2019] OVirt and Ceph: Perfect Combination.?
PDF
Is It Faster to Go with Redpanda Transactions than Without Them?!
Understanding Apache Kafka P99 Latency at Scale
Whoops! I Rewrote It in Rust
High-Performance Networking Using eBPF, XDP, and io_uring
Rust, Wright's Law, and the Future of Low-Latency Systems
Unikraft: Fast, Specialized Unikernels the Easy Way
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
Spying on the Linux kernel for fun and profit
Realtime
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Rust Primer
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Luca Abeni - Real-Time Virtual Machines with Linux and kvm
Java performance monitoring
Introduction to GraalVM
An Introduction to the Formalised Memory Model for Linux Kernel
gcma: guaranteed contiguous memory allocator
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
[POSS 2019] OVirt and Ceph: Perfect Combination.?
Is It Faster to Go with Redpanda Transactions than Without Them?!
Ad

Similar to Continuous Performance Regression Testing with JfrUnit (20)

PDF
Using Java Mission Control & Java Flight Recorder
PDF
Performance testing with jmeter
PDF
PDF
Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406]
PDF
Automation for developers
PPTX
Bots on guard of sdlc
PDF
Gatling - Bordeaux JUG
PPTX
How to jSparrow Jenkins?
PDF
Liferay portals in real projects
PDF
DevDays: Profiling With Java Flight Recorder
PDF
Production profiling what, why and how technical audience (3)
PPT
Inside the JVM - Performance & Garbage Collector Tuning in JAVA
PPTX
Diagnosing HotSpot JVM Memory Leaks with JFR and JMC
PDF
ASML_FlightRecorderMeetsJava.pdf
PDF
Ad109 - XPages Performance and Scalability
PDF
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
PPTX
Testing Django APIs
PDF
Tools in action jdk mission control and flight recorder
PPTX
Perofrmance testing and apache jmeter
PPTX
Using Java Mission Control & Java Flight Recorder
Performance testing with jmeter
Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406]
Automation for developers
Bots on guard of sdlc
Gatling - Bordeaux JUG
How to jSparrow Jenkins?
Liferay portals in real projects
DevDays: Profiling With Java Flight Recorder
Production profiling what, why and how technical audience (3)
Inside the JVM - Performance & Garbage Collector Tuning in JAVA
Diagnosing HotSpot JVM Memory Leaks with JFR and JMC
ASML_FlightRecorderMeetsJava.pdf
Ad109 - XPages Performance and Scalability
Apidays Helsinki & North 2024 - Bridging the Gap Between Backend and Frontend...
Testing Django APIs
Tools in action jdk mission control and flight recorder
Perofrmance testing and apache jmeter
Ad

More from ScyllaDB (20)

PDF
Understanding The True Cost of DynamoDB Webinar
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
PDF
New Ways to Reduce Database Costs with ScyllaDB
PDF
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
PDF
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
PDF
Leading a High-Stakes Database Migration
PDF
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
PDF
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
PDF
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
PDF
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
PDF
ScyllaDB: 10 Years and Beyond by Dor Laor
PDF
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
PDF
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
PDF
Vector Search with ScyllaDB by Szymon Wasik
PDF
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
PDF
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
PDF
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
PDF
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
PDF
Lessons Learned from Building a Serverless Notifications System by Srushith R...
Understanding The True Cost of DynamoDB Webinar
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
New Ways to Reduce Database Costs with ScyllaDB
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
Leading a High-Stakes Database Migration
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
ScyllaDB: 10 Years and Beyond by Dor Laor
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Vector Search with ScyllaDB by Szymon Wasik
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
Lessons Learned from Building a Serverless Notifications System by Srushith R...

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Building Integrated photovoltaic BIPV_UPV.pdf
Electronic commerce courselecture one. Pdf
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Continuous Performance Regression Testing with JfrUnit

  • 1. Brought to you by Continuous Performance Regression Testing with JfrUnit Gunnar Morling Principal Software Engineer at
  • 2. Today’s Objective: Learn About... ■ Implementing performance regression tests with JDK Flight Recorder and JfrUnit ■ Analyzing performance regressions in JDK Mission Control ■ Emitting JFR events from 3rd party libraries
  • 3. Gunnar Morling Principal Software Engineer at Red Hat ■ Debezium ■ Quarkus ■ JfrUnit, ModiTect, kcctl ■ Spec Lead for Bean Validation 2.0 ■ Java Champion ■ @gunnarmorling
  • 4. Challenges of Performance Tests ■ Tests based on throughput or latency are dependent on specifics of the environment ● Require production-like set-up ● Impacted by unrelated concurrent load (e.g. on CI server)
  • 5. JfrUnit — Assert Performance Impacting Metrics ■ Assert proxy metrics like memory allocation or IO ● Based on JDK Flight Recorder events ● Failures may indicate a performance regression ■ Plain unit tests ■ Analyse in JDK Mission Control
  • 8. OpenJDK Flight Recorder ■ “Troubleshooting, monitoring, and profiling framework embedded into the JVM” ■ 150+ built-in event types; custom ones ■ Open-source since Java 11 (backported to 8) ■ Low overhead, meant for “always-on” ■ Accessible via recording files and streaming
  • 10. OpenJDK Mission Control ■ Control, visualize, and analyze JFR recordings ■ And more: ● JMX console ● heap dump analyzer ● etc.
  • 12. JfrUnit — Discussion and Limitations ■ Robust tests with very fast feedback cycle ● Independent from environment ● Proactive identification of issues ■ Metrics need solid understanding; e.g. increased allocation may or may not be a problem ■ Cannot identify all issues, e.g. locks showing up only under load ■ Won’t help with issues elsewhere, e.g. a bad query execution plan
  • 14. Take Aways ■ JfrUnit: a tool in the performance testing box ● Complement - no replacement - for other tests ■ JMC Agent: produce events from code not under your control ■ Move beyond Java 1.8 🚀
  • 15. Outlook — Keeping Track of Historic Values https://horreum.hyperfoil.io/
  • 16. Resources ■ JfrUnit https://github.com/moditect/jfrunit ■ Introduction to JfrUnit https://www.morling.dev/blog/towards-continuous-performance-regression-t esting/ ■ Introduction to JMC Agent https://developers.redhat.com/blog/2020/10/29/collect-jdk-flight-recorder-ev ents-at-runtime-with-jmc-agent/ ■ Profiling Java inside containers with ContainerJFR https://developers.redhat.com/devnation/tech-talks/containerjfr
  • 17. Brought to you by Gunnar Morling gunnar@hibernate.org @gunnarmorling