-
Notifications
You must be signed in to change notification settings - Fork 430
feat: Introduce FastExcel Benchmark Performance Testing Module #575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Introduce FastExcel Benchmark Performance Testing Module #575
Conversation
CI Benchmark Run Completed Successfully: https://github.com/GOODBOY008/fastexcel/actions/runs/17709908635 To view the benchmark reports:
There are a few issues to address:
|
I'm really excited about this PR. However, it's quite large, so the code review will take some time. Also, no offense intended, but I'd like to ask: Did you use AI-generated code in this PR? |
@psxjoy Yes, some parts (like the comparison report, memory profiler logic, and quickstart scripts) were AI-assisted.AI is quite effective in these scenarios, I’ve verified them to make sure they work correctly. I noticed the artifact wasn’t accessible, so I’ve uploaded the results for your review. |
Hi, @GOODBOY008 Regarding this PR, I still have some questions:
Please refer to the above suggestions and make appropriate modifications to the PR content. After that, we will vote on this PR together with other reviewers ASAP. |
Hi @delei For the first point, I understand the concern about the PR size — my intention was to split the work into stages, so this submission might look a bit large. Regarding the second and third points: I’m fine with keeping only the JMH core classes for now, but I’d like to highlight the above considerations. |
5a95c2d
to
1be72cb
Compare
@delei PTAL |
- Create new GitHub Actions workflow for running benchmark
- Add JavaScript code for sorting table columns in HTML report- Update table headers to include sort indicators and make them clickable - Remove generation
…aths for benchmark results
…nchmark runner execution
…nd additional data fields
- Group results by operation, dataset size, and file format - Increase measurement iterations for more reliable results - Update JVM arguments to improve performance
1be72cb
to
1824158
Compare
Overview
This PR introduces a comprehensive benchmark performance testing module for FastExcel, implementing the proposal outlined in #572.
Benchmark Results Available
CI Benchmark Run Completed Successfully: https://github.com/GOODBOY008/fastexcel/actions/runs/17709908635
Benchmark Artifacts: The workflow generated comprehensive benchmark reports available in the artifacts:
To view the benchmark reports:
benchmark-results
artifact from: https://github.com/GOODBOY008/fastexcel/actions/runs/17709908635benchmark-reports/benchmark-comparison.html
in your browserWhat's Changed
New Module: fastexcel-benchmark
• JMH Integration: Complete Maven configuration with industry-standard Java microbenchmarking framework
• Comprehensive Test Suites:
◦ Comparison benchmarks (FastExcel vs Apache POI)
◦ Memory efficiency specialized tests
◦ Streaming operation performance tests
◦ Microbenchmarks for core components
• Automated Execution: Multi-profile support with configurable dataset sizes and memory settings
• Advanced Features:
◦ Interactive CLI with scenario management
◦ Real-time memory profiling with GC tracking
◦ HTML visualization reports and JSON data export
◦ Performance trend analysis and regression detection
Key Components
Core Framework (
cn.idev.excel.benchmark.core
)◦ Abstract benchmark base classes
◦ Configuration management
◦ Memory profiler integration
Test Scenarios (
cn.idev.excel.benchmark.*
)◦ Read/Write operation benchmarks
◦ Fill operation performance tests
◦ Streaming benchmarks for large datasets
◦ Memory efficiency analysis
Comparison Benchmarks (
cn.idev.excel.benchmark.comparison
)◦ Direct FastExcel vs Apache POI performance comparison
◦ Multi-dimensional analysis (throughput, latency, memory)
Utilities (
cn.idev.excel.benchmark.utils
)◦ Test data generation
◦ File management utilities
◦ Reporting and visualization
Automated Scripts (
scripts/benchmark-runner.sh
)◦ Profile-based execution (quick/standard/comprehensive)
◦ Configurable parameters and output formats
◦ Regression analysis automation
GitHub Actions Integration
• Workflow (
.github/workflows/benchmark.yml
)◦ Manual trigger with
workflow_dispatch
for on-demand benchmarking◦ Java 11 setup with proper classpath resolution
◦ Automated artifact upload for benchmark results
◦ Fixed JMH forking issues for reliable results
Test Scenarios Coverage
• Data Scales: SMALL(1K) → MEDIUM(10K) → LARGE(100K) → EXTRA_LARGE(1M+)
• File Formats: XLSX
• Operation Types: Read, Write, Fill, Streaming
• Memory Analysis: Real-time monitoring, GC pressure analysis, allocation patterns
Benefits
Closes #572