Skip to content

rahulsh1/property-resolution-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Property Resolution Performance Benchmark

This project provides focused JMH benchmarks to test Spring Framework property resolution performance between versions 6.1 and 6.2, specifically designed to reproduce performance regressions in property placeholder resolution.

Project Structure

property-resolution-benchmark/
├── pom.xml                                    # Maven configuration with Spring 6.1/6.2 profiles
├── run-benchmarks.sh                         # Automated benchmark execution script
├── README.md                                 # This file
└── src/main/java/perf/spring/benchmark/
    └── SpringPropertyResolutionBenchmark.java    # Property resolution benchmarks

Quick Start

Prerequisites

  • Java 17+
  • Maven 3.6+

Running Benchmarks

Default (10,000 properties)

./run-benchmarks.sh

Custom Property Count

./run-benchmarks.sh 5000   # 5K properties
./run-benchmarks.sh 20000  # 20K properties
./run-benchmarks.sh 50000  # 50K properties

Manual Execution

# Test Spring 6.1
mvn clean package -Pspring-6.1
java -jar target/property-resolution-benchmark.jar -p propertyCount=10000

# Test Spring 6.2
mvn clean package -Pspring-6.2
java -jar target/property-resolution-benchmark.jar -p propertyCount=10000

Benchmark Categories

Property Resolution Benchmarks

  • Simple Property Resolution: Basic property value retrieval
  • Nested Property Resolution: Properties with placeholder references
  • Complex Property Resolution: Multi-level nested properties
  • Property Placeholder Helper: Direct placeholder resolution using Spring's PropertyPlaceholderHelper
  • Batch Property Resolution: Multiple property resolution in sequence

Configuration

Property Count Parameter

The propertyCount parameter controls the number of properties used in benchmarks:

  • Default: 10,000 properties
  • Range: 5,000 - 50,000 properties
  • Configurable via command line or script parameter

JVM Settings

  • Heap: 2GB - 4GB
  • Forks: 3 (for statistical significance)
  • Warmup: 3 iterations, 2 seconds each
  • Measurement: 5 iterations, 3 seconds each

Results

Benchmark results are saved to:

  • benchmark-results/results-spring-6.1-{propertyCount}properties.txt
  • benchmark-results/results-spring-6.2-{propertyCount}properties.txt
  • benchmark-results/jmh-spring-6.1-{propertyCount}properties.json
  • benchmark-results/jmh-spring-6.2-{propertyCount}properties.json
  • benchmark-results/performance-comparison-{propertyCount}properties.txt

Performance Regression Analysis

This benchmark suite is specifically designed to identify performance regressions in Spring Framework 6.2 property resolution, particularly:

  1. Property Placeholder Resolution: Tests the new PlaceholderParser implementation
  2. Nested Property Resolution: Measures performance with complex property dependencies
  3. Circular Property Resolution: Tests circular reference handling
  4. Batch Property Resolution: Measures performance with multiple property lookups

Usage for Bug Reports

This project can be used as a reproducer for Spring Framework property resolution performance regression bug reports by:

  1. Running benchmarks with both Spring 6.1 and 6.2
  2. Comparing results to identify regressions
  3. Providing detailed performance metrics and JVM settings
  4. Demonstrating the impact on different property counts and scenarios

About

Performance benchmark for Property resolution in Spring framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published