You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrates automated historical performance tracking into the CI pipeline, completing Medium Priority #4 from the performance status report. This enables long-term trend analysis, regression detection across releases, and data-driven optimization decisions.
Goal and Rationale
Performance Engineering Goal: Build historical performance tracking infrastructure for trend analysis and regression detection
Why it matters:
Enables visualization of performance trends over weeks/months/releases
Provides early warning system for performance regressions
Documents performance milestones for release planning
Supports data-driven optimization decisions with historical context
Approach
The historical tracking tools (track-performance.ts, analyze-performance.ts, visualize-performance.ts) already existed but were not integrated with CI. This PR completes the integration by:
CI Automation - Added http-benchmark-on-main job that runs on every main branch push
Data Persistence - Commits performance history to dedicated perf-history branch
Developer Tools - Added npm scripts for easy access to tracking tools
Documentation - Comprehensive usage guide with workflows and best practices
Impact
CI Integration
Main Branch Automation:
Every commit to main automatically runs HTTP benchmarks
Saves results with git metadata (commit SHA, branch, message)
Commits to perf-history branch for permanent storage
bun run perf:track # Save benchmark results to history
bun run perf:analyze # Analyze performance trends
bun run perf:visualize # Generate ASCII charts
bun run perf:html # Create HTML visualizations
Example Workflow - Trend Analysis:
# View last 30 days of performance data
bun run perf:analyze --since=30d
# Visualize trends
bun run perf:visualize --since=30d --metric=overall
# Generate HTML report for release notes
bun run perf:html --output=release-performance.html
Uses [skip ci] in commit messages to prevent infinite loops
Package.json Scripts
{
"scripts": {
"perf:track": "cd benchmarks/http-server && bun run track-performance.ts",
"perf:analyze": "cd benchmarks/http-server && bun run analyze-performance.ts",
"perf:visualize": "cd benchmarks/http-server && bun run visualize-performance.ts",
"perf:html": "cd benchmarks/http-server && bun run visualize-performance.ts --output=performance-chart.html"
}
}
Common workflows (local dev, release planning, regression investigation)
Advanced filtering and output formats
Troubleshooting guide
Best practices
Quick Reference: Updated benchmarks/http-server/README.md with quick start examples
Validation
Testing
Local Testing:
# Verified tracking tools work correctlycd benchmarks/http-server
bun run benchmark.ts
bun run track-performance.ts
bun run analyze-performance.ts
bun run visualize-performance.ts
# Confirmed data structure and git metadata capture
✅ All tools functioncorrectly
✅ Git metadata extracted properly
✅ JSONL format validated
Builds on existing HTTP benchmark infrastructure (statistical analysis, confidence intervals)
Integrates with performance budget validation system
Complements profiling tools and memory tracking
Usage After Merge
For Maintainers:
Merge this PR to main
First main push auto-creates perf-history branch
Every subsequent main push adds performance data
Use bun run perf:analyze to review trends monthly
For Contributors:
# Track local optimization experiments
bun run build
cd benchmarks/http-server
bun run benchmark.ts
bun run perf:track --tag="my-optimization-experiment"
bun run perf:analyze --limit=5
For Releases:
# Tag release milestones
bun run perf:track --tag="v4.10.0-release"# Generate release performance report
bun run perf:analyze --since=30d --format=json > release-perf.json
bun run perf:html --since=30d
The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/githubnext/gh-aw-trial-hono/actions/runs/18583834816# (Use GitHub MCP tools if gh CLI is not available)
gh run download 18583834816 -n aw.patch
# Apply the patch
git am aw.patch
Show patch preview (500 of 600 lines)
From a731dc3dbbb8e2574701063caf15723d2a9c564e Mon Sep 17 00:00:00 2001
From: Daily Perf Improver <github-actions[bot]@users.noreply.github.com>
Date: Fri, 17 Oct 2025 06:00:18 +0000
Subject: [PATCH] feat: integrate historical performance tracking with CI
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add automated performance tracking infrastructure to CI pipeline for
long-term trend analysis and regression detection.
## Changes### CI Integration- Add http-benchmark-on-main job that runs on every main branch push- Automatically tracks performance data with git metadata- Commits historical data to perf-history branch for permanent storage- Zero-overhead on PR workflow (only runs on main)### Package Scripts
Add convenience commands for performance tracking tools:
- bun run perf:track - Save benchmark results to history- bun run perf:analyze - Analyze performance trends- bun run perf:visualize - Generate ASCII charts- bun run perf:html - Create interactive HTML visualizations### Documentation- Comprehensive README-HISTORICAL-TRACKING.md with complete usage guide- Updated main benchmark README with quick start examples- Common workflows for local development and release planning- Troubleshooting guide and best practices## Impact
**For Main Branch:**
Every commit automatically collects performance data enabling:
- Long-term trend visualization across releases- Early regression detection through historical comparison- Performance milestone tracking for release planning- Data-driven optimization decisions
**For Developers:**
Easy access to performance history via npm scripts:
- Quick trend analysis with bun run perf:analyze- Visual charts with bun run perf:visualize- HTML reports for documentation with bun run perf:html## Implementation
Historical tracking tools already exist (track-performance.ts,
analyze-performance.ts, visualize-performance.ts) but were not
integrated with CI. This PR completes th
... (truncated)
Summary
Integrates automated historical performance tracking into the CI pipeline, completing Medium Priority #4 from the performance status report. This enables long-term trend analysis, regression detection across releases, and data-driven optimization decisions.
Goal and Rationale
Performance Engineering Goal: Build historical performance tracking infrastructure for trend analysis and regression detection
Why it matters:
Approach
The historical tracking tools (
track-performance.ts,analyze-performance.ts,visualize-performance.ts) already existed but were not integrated with CI. This PR completes the integration by:http-benchmark-on-mainjob that runs on every main branch pushperf-historybranchImpact
CI Integration
Main Branch Automation:
mainautomatically runs HTTP benchmarksperf-historybranch for permanent storageData Structure:
{"timestamp":"2025-10-17T10:30:00Z","git":{"branch":"main","commit":"abc1234"},"results":{...}}Developer Experience
New Package Scripts:
Example Workflow - Trend Analysis:
Implementation Details
CI Workflow Changes
Added new job in
.github/workflows/ci.yml:Key Features:
mainbranch (not PRs)fetch-depth: 0for full git historyperf-historybranch on first run[skip ci]in commit messages to prevent infinite loopsPackage.json Scripts
{ "scripts": { "perf:track": "cd benchmarks/http-server && bun run track-performance.ts", "perf:analyze": "cd benchmarks/http-server && bun run analyze-performance.ts", "perf:visualize": "cd benchmarks/http-server && bun run visualize-performance.ts", "perf:html": "cd benchmarks/http-server && bun run visualize-performance.ts --output=performance-chart.html" } }Documentation
Comprehensive Guide:
benchmarks/http-server/README-HISTORICAL-TRACKING.md(400+ lines)Covers:
Quick Reference: Updated
benchmarks/http-server/README.mdwith quick start examplesValidation
Testing
Local Testing:
CI Workflow:
contents: write)if: github.ref == 'refs/heads/main')Example Analysis Output
Trade-offs
Pros:
Cons:
perf-historybranch creation needs main pushFuture Enhancements
Potential improvements identified but not implemented:
Related Work
.github/copilot/instructions/performance-status-report.mdUsage After Merge
For Maintainers:
perf-historybranchbun run perf:analyzeto review trends monthlyFor Contributors:
For Releases:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available as an artifact (
aw.patch) in the workflow run linked above.To apply the patch locally:
Show patch preview (500 of 600 lines)