A system for tracking and comparing compiler performance benchmarks across different commits.
- Automatic benchmark data collection from GitHub commits
- Performance score calculation based on best recorded times
- Visual comparison between any two commits
- Color-coded performance changes (green for improvements, red for regressions)
- GitHub integration for viewing commit details
- Responsive web interface with GitHub-style design
-
Data Processing Script (
scripts/process-benchmark.js)- Fetches commit information from GitHub API
- Processes TSV benchmark files
- Calculates performance scores
- Generates JSON data for frontend
-
React Frontend (
src/)- Displays benchmark comparison interface
- Allows selection of two commits for comparison
- Shows performance metrics and changes
- Color-coded visualization of improvements/regressions
-
GitHub Actions Workflows
process-and-deploy.yml: Processes data and deploys to GitHub Pagesbenchmark-on-commit.yml: Runs benchmarks for new commits
Each test case score is calculated as:
Score = 100 / (Runtime / Best Time)
The final score is the average of all test case scores.
Note: If a best time is recorded as 0.00 in best.csv, it's treated as 0.001 seconds to avoid division by zero.
- Install dependencies:
# Install pnpm if not already installed
npm install -g pnpm
# Install Node.js dependencies
pnpm install- Process benchmark data:
pnpm run process
# or
node scripts/process-benchmark.js- Run development server:
pnpm run devThe site is automatically deployed to GitHub Pages when:
- New TSV files are added to the
results/directory - The
best.csvfile is updated - Manual workflow dispatch is triggered
.
├── results/ # Benchmark data
│ ├── best.csv # Best times for each test case
│ └── *.tsv # Benchmark results per commit
├── src/ # React frontend source
├── scripts/ # Processing scripts
│ └── process-benchmark.js # Data processing script
├── .github/workflows/ # GitHub Actions workflows
└── package.json # Project dependencies
- Visit the deployed site at:
https://[username].github.io/benchmark-comparison/ - Select a base commit (earlier) from the left dropdown
- Select a compare commit (later) from the right dropdown
- View the performance comparison and detailed benchmark results
- Green: Performance improvement or score increase
- Red: Performance regression or score decrease
- Gray: Changes within ±2% threshold (considered neutral)
The system uses the GitHub API to fetch commit information:
- Commit messages
- Author information
- Timestamps
- GitHub URLs
Set GITHUB_TOKEN environment variable to avoid API rate limits.
- Add new benchmark results as TSV files in the
results/directory - Update
best.csvwhen new best times are achieved - The CI/CD pipeline will automatically process and deploy changes