bench-tracker-0.1.1 is not a library.
bench-tracker
A comprehensive benchmark regression tracking tool for TensorLogic.
Features
- Save Baselines: Capture current benchmark results as a baseline for future comparisons
- Compare Results: Compare current benchmarks against saved baselines with configurable thresholds
- Detect Regressions: Automatically identify performance regressions and improvements
- Multiple Report Formats: Generate reports in text, JSON, or HTML format
- Detailed Statistics: View comprehensive statistics for individual benchmarks
- Git Integration: Automatically tracks git commit hashes with baselines
Installation
The tool is part of the TensorLogic workspace. Build it with:
Usage
Save Current Benchmarks as Baseline
Options:
--criterion-dir: Path to criterion output directory (default:target/criterion)--output: Output path for baseline file (default:benchmarks/baseline.json)--name: Baseline name/tag (optional)
List Saved Baselines
Compare Against Baseline
Options:
--criterion-dir: Path to criterion output directory (default:target/criterion)--baseline: Path to baseline file (default:benchmarks/baseline.json)--threshold: Regression threshold in percentage (default:5.0)--format: Output format:text,json, orhtml(default:text)
The compare command will:
- Show a detailed comparison table
- Highlight regressions in red
- Highlight improvements in green
- Mark stable benchmarks in blue
- Exit with error code if regressions are detected
View Detailed Statistics
Shows detailed statistical information including:
- Mean with confidence intervals
- Median with confidence intervals
- Standard deviation with confidence intervals
- All measurements for each parameter variant
Example Workflow
# 1. Run benchmarks and save baseline
# 2. Make code changes
# ... edit code ...
# 3. Run benchmarks again
# 4. Compare against baseline
# 5. View detailed stats for specific benchmark
CI Integration
The tool is designed to be used in CI pipelines:
# In CI script
# Exit code is non-zero if regressions detected
Output Format
Text Report
Default format with colored output and formatted table showing:
- Benchmark name
- Baseline and current measurements
- Percentage change
- Status (REGRESSION/IMPROVEMENT/STABLE)
- Summary statistics
JSON Report
Machine-readable format suitable for CI/CD integration:
HTML Report
Formatted HTML report with:
- Color-coded status indicators
- Sortable tables
- Summary statistics
- Responsive design
Baseline File Format
Baselines are stored as JSON with complete statistical information:
License
Licensed under Apache-2.0.
Authors
COOLJAPAN OU (Team Kitasan)