Skip to content

feat(reporting): add generate-index command to create HTML index of reports#630

Closed
kaihowl wants to merge 15 commits intomasterfrom
claude/fix-report-link-AMQ2o
Closed

feat(reporting): add generate-index command to create HTML index of reports#630
kaihowl wants to merge 15 commits intomasterfrom
claude/fix-report-link-AMQ2o

Conversation

@kaihowl
Copy link
Copy Markdown
Owner

@kaihowl kaihowl commented Feb 2, 2026

  • Add generate-index subcommand to git-perf CLI with options for output path, subdirectory, title, template, and branch
  • Implement logic to scan gh-pages branch (or specified branch) for report HTML files
  • Categorize reports into branch reports, commit reports, and custom reports with metadata lookup
  • Generate a comprehensive HTML index page with sections for each report category
  • Integrate index generation step into GitHub Actions report workflow with new inputs
  • Add detailed GitHub Pages integration guide and report templating documentation
  • Update manpages to document the new generate-index command

This allows automatic generation of an index page listing all available performance reports to improve discoverability and integration with static sites like GitHub Pages.

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>

kaihowl and others added 6 commits December 31, 2025 17:40
…eports

- Add `generate-index` subcommand to git-perf CLI with options for output path, subdirectory, title, template, and branch
- Implement logic to scan gh-pages branch (or specified branch) for report HTML files
- Categorize reports into branch reports, commit reports, and custom reports with metadata lookup
- Generate a comprehensive HTML index page with sections for each report category
- Integrate index generation step into GitHub Actions report workflow with new inputs
- Add detailed GitHub Pages integration guide and report templating documentation
- Update manpages to document the new generate-index command

This allows automatic generation of an index page listing all available performance reports to improve discoverability and integration with static sites like GitHub Pages.

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Add support for an "All Reports" navigation link in generated HTML
reports that links to the index page listing all reports.

Changes:
- Add {{ALL_REPORTS_URL}} template placeholder for customization
- Update default HTML template to include header with "All Reports" link
- Add --all-reports-url CLI argument to specify the index URL
- Update GitHub Action to automatically set the URL when generate-index is enabled
- Update documentation with the new placeholder
- Regenerate manpages

When the GitHub Action generates an index page (generate-index: true),
reports will automatically include a navigation link to that index.
The URL is configurable via the --all-reports-url CLI flag, defaulting
to "index.html" if not specified.
Update the dashboard-example.html template to use the {{ALL_REPORTS_URL}}
placeholder instead of a hardcoded /perf/ path. This ensures the
"All Reports" link correctly points to the index page location.

Also enable generate-index in the CI workflow so the index page is
actually created, making the navigation link functional.
Fix git ls-tree error when no subdirectory is specified by not passing
an empty path argument. Previously, an empty string was passed which
caused "empty string is not a valid pathspec" error.

Also remove the silent fallback on index generation failure so errors
are properly surfaced.
Merged generate-index feature with concurrency control comment from master.
Both changes are now present in the action.yml file.

https://claude.ai/code/session_01V76ZFToJQRuwEvkKEETazt
- Add index-url output when generate-index is enabled
- Include "All Reports" link in PR comments for direct navigation
- Fix double-slash URL bug by removing trailing slash before path construction
- Update action README with new inputs and outputs

https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 2, 2026

Performance Report

Performance Results | All Reports

Audit Results

✅ 'add-benchmark'
Aggregation: median
z-score (mad): ↓ 2.26
Head: μ: 20.2ms σ: N/A MAD: 0ns n: 1
Tail: μ: 20.7ms σ: 560.7µs MAD: 232.2µs n: 12
 [-1.62% – +8.31%] █▁▃▃▂▂▂▄▁▄▂▂▁
✅ 'release-binary-size'
Aggregation: min
z-score (stddev): ↑ 0.96
Head: μ: 8.1MB σ: N/A MAD: 0B n: 1
Tail: μ: 8MB σ: 37.1kB MAD: 5.5kB n: 38
 [-2.03% – +0.69%] ▄▄▄▄▄▁███▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▇
✅ 'report'
Aggregation: min
z-score (stddev): ↓ 1.45
Head: μ: 24ms σ: N/A MAD: 0ns n: 1
Tail: μ: 26.9ms σ: 2ms MAD: 1.2ms n: 38
 [-19.03% – +10.53%] ▅▂▃▃▃▃▃▄▃▃▃▃▇▆▇▆▇▆▁▆▆▆█▆█▇▇▇▅▅▅▆▅▅▆▆▆▅▃
✅ 'report-benchmark'
Aggregation: median
z-score (stddev): ↓ 0.81
Head: μ: 24.5ms σ: N/A MAD: 0ns n: 1
Tail: μ: 25.1ms σ: 724.9µs MAD: 348.5µs n: 12
 [-2.42% – +8.17%] █▁▃▃▃▂▂▅▂▅▃▂▂
✅ 'report-size'
Aggregation: min
z-score (stddev): ↑ 0.89
Head: μ: 13.4kB σ: N/A MAD: 0B n: 1
Tail: μ: 9.4kB σ: 4.5kB MAD: 970B n: 38
 [-83.76% – +15.46%] ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▁▁▁▁▁▁▁▁▁▁█
✅ 'report-size-benchmark'
Aggregation: median
z-score (stddev): ↑ 2.82
Head: μ: 13.4kB σ: N/A MAD: 0B n: 1
Tail: μ: 12kB σ: 488B MAD: 0B n: 28
 [+0.00% – +15.46%] ▅▅▅▅▅▅▅▅▅▅▅▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█

Measurement Storage Size

Live Measurement Size Report
============================

⚠️  Shallow clone detected - measurement counts may be incomplete (see FAQ)

Number of commits with measurements: 277
Total measurement data size (on-disk (compressed)): 333.8kB

Repository Statistics (for context):
-------------------------------------
  Loose objects: 0 (0B)
  Packed objects: 4543 (1.3MB)
  Total repository size: 1.3MB

Created by git-perf

claude and others added 9 commits February 2, 2026 08:29
The git log command was using `--` before the commit SHA, which tells
git to treat it as a path rather than a revision. This caused all
commit lookups to fail, resulting in N/A for date and author fields
in the generated index page.

https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
When generating the index page in a shallow clone, commit SHAs from
report filenames may not exist in the local history. This change:

- First tries to get commit metadata from local git history
- If not found, fetches the specific commit from origin (depth=1)
- Retries metadata retrieval after fetching

This ensures Date and Author columns in the index are populated even
when running in CI with shallow clones.

https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
Instead of fetching commits individually (which would be slow with many
reports), fetch full history with `git fetch --unshallow` before
generating the index. This ensures all commit metadata is available.

Also simplified the Rust code by removing per-commit fetching logic -
the action now handles ensuring commits are available.

https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
@kaihowl kaihowl closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants