Skip to content

ci: publish benchmarks in repository Pages - #2268

Merged
cpunion merged 2 commits into
mainfrom
codex/benchmark-same-repo-pages
Aug 2, 2026
Merged

ci: publish benchmarks in repository Pages#2268
cpunion merged 2 commits into
mainfrom
codex/benchmark-same-repo-pages

Conversation

@cpunion

@cpunion cpunion commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • publish benchmark history to the repository pages branch without a separate data repository or dispatch token
  • namespace the site output at benchmark/baseline to avoid collisions with other Pages content

This ports the two commits from cpunion#141. The cpunion source PR is merged and its source branch has been deleted; this PR is the xgo-dev counterpart.

Validation

  • YAML parsing passes for .github/workflows/benchmark-publish.yml and .github/llgo-benchmark.yml
  • git diff --check passes
  • only the benchmark publisher workflow and benchmark site path change

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

This PR switches baseline benchmark publishing to the same-repo GitHub Pages model: it points site-path at benchmark/baseline and drops the external-data-repo wiring (data_repository, data_dispatch_event, secrets.data_token) from benchmark-publish.yml.

The workflow changes themselves are correct and safe. I verified against the reusable workflow xgo-dev/setup-benchmark-go-action/.github/workflows/publish.yml@v1:

  • data_repository defaults to "" → falls back to the source repo (xgo-dev/llgo), matching the intent.
  • data_token is required: false; same-repo commits use the built-in token, so removing the secret is fine.
  • data_dispatch_event defaults to "" (no dispatch), appropriate for same-repo publishing.
  • run_id (the only required input) and config_path are retained.
  • The new site-path: benchmark/baseline matches the source dir ./benchmark/baseline used in .github/workflows/benchmark.yml.

The findings below are all in benchmark/baseline/README.md, which is not part of this diff and so cannot be commented inline.

Findings

1. Stale documentation — benchmark/baseline/README.md:25-28
The README still says the publisher "commits ... to the pages branch of the configured data repository. Every LLGo repository defaults to <owner>/llgo-benchmark-data." After this PR, publishing defaults to the source repo (xgo-dev/llgo) Pages, not a separate <owner>/llgo-benchmark-data repository. This description is now inaccurate.

2. Stale series paths — benchmark/baseline/README.md:30-34
The documented series paths use the old site-path prefix:

llgo/baseline/series/main/main
llgo/baseline/series/branch/<safe branch identifier>
llgo/baseline/series/pull/<number>

Since site-path is now benchmark/baseline, these should read benchmark/baseline/series/....

3. Stale token statement — benchmark/baseline/README.md:36-37
"pull request jobs never receive the benchmark repository token" describes the removed external-data-repo token mechanism, which no longer exists in this flow. Consider rewording to reflect same-repo publishing.

Non-blocking notes

  • Security (low): With data_token removed, same-repo commits now use the default GITHUB_TOKEN, which this workflow grants contents: write, issues: write, pull-requests: write. Consider pinning the reusable workflow to a commit SHA instead of the mutable @v1 tag, and trimming permissions to the minimum the publish flow needs (e.g. drop issues: write if only PR comments are used). Not exploitable on its own; the workflow_run + fork-PR data flow mitigations (trusted config read from default branch, PR-number namespacing, head-SHA re-check) live in the callee and are unchanged by this diff.
  • Behavior: Removing data_dispatch_event means no repository_dispatch is sent after publish. This is expected for same-repo publishing, but confirm no downstream deploy relied on that event.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

126c9be6e54e | workflow run | long-term charts

Program measurements

Platform Workload File size vs main Build vs main Run vs main
Linux cprintf 18544 B new 354.132 ms new 1.364 ms new
Linux fmtprintf 2217600 B new 3.207 s new 2.728 ms new
Linux println 71504 B new 352.275 ms new 1.732 ms new
macOS cprintf 84672 B new 428.033 ms new 3.903 ms new
macOS fmtprintf 2361520 B new 3.537 s new 23.181 ms new
macOS println 125712 B new 394.536 ms new 5.405 ms new
Core language and compiler benchmarks
Platform Benchmark ns/op vs main
Linux BenchmarkLookupPCRandom 12.330 ns/op new
Linux BenchmarkMergeCompilerFlags 143.900 ns/op new
Linux BenchmarkMergeLinkerFlags 93.880 ns/op new
Linux BenchmarkChannelBuffered 36.270 ns/op new
Linux BenchmarkChannelHandoff 23627 ns/op new
Linux BenchmarkDefer 42.810 ns/op new
Linux BenchmarkDirectCall 1.758 ns/op new
Linux BenchmarkGlobalRead 1.758 ns/op new
Linux BenchmarkGlobalWrite 2.804 ns/op new
Linux BenchmarkGoroutine 30801 ns/op new
Linux BenchmarkInterfaceCall 8.793 ns/op new
Linux BenchmarkRuntimeGetG 1.759 ns/op new
macOS BenchmarkLookupPCRandom 18.150 ns/op new
macOS BenchmarkMergeCompilerFlags 164.100 ns/op new
macOS BenchmarkMergeLinkerFlags 116.700 ns/op new
macOS BenchmarkChannelBuffered 47.980 ns/op new
macOS BenchmarkChannelHandoff 12243 ns/op new
macOS BenchmarkDefer 73.820 ns/op new
macOS BenchmarkDirectCall 1.716 ns/op new
macOS BenchmarkGlobalRead 1.808 ns/op new
macOS BenchmarkGlobalWrite 2.326 ns/op new
macOS BenchmarkGoroutine 28691 ns/op new
macOS BenchmarkInterfaceCall 10.230 ns/op new
macOS BenchmarkRuntimeGetG 4.682 ns/op new

No main baseline exists yet; all metrics are marked new.

Warning

  • The rendered benchmark data could not be pushed.

@cpunion
cpunion merged commit 4e1aa4f into main Aug 2, 2026
42 checks passed
@cpunion
cpunion deleted the codex/benchmark-same-repo-pages branch August 2, 2026 17:59
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.

1 participant