Skip to content

meta: frozen linker-object benchmark assets — benchmark-assets branch(es) + manifest.json (compile once, link every iteration) #57

Closed

Description

@zackees

Meta: frozen linker-object benchmark assets — storage, publishing, and consumption

Umbrella issue coordinating the "compile once, link every iteration" benchmark corpus work. The corpora from #55 (frozen Bevy link corpus) and #56 (quick-link / thin-LTO / full-LTO sections) are large, per-platform, per-configuration blobs. This issue defines where they live, how they're published, and how each platform pulls them so the benchmark only ever times linking.

Sub-issues

Related surfaces: benchmark-stats presentation (#53 verbose stats, #54 vertical stacking); caching/toolchain plumbing (forge-ci/setup-soldr#463 glob side-cache, forge-ci/soldr#2335 published toolchain).

Storage design

Recommended: one orphan benchmark-assets branch that doubles as the assets folder + static www site (same pattern as the existing benchmark-stats branch), with a canonical manifest.json at its root and one archive per platform per configuration beneath it:

benchmark-assets/            # orphan branch, .nojekyll, served as the www/assets site
  manifest.json              # canonical index (single source of truth)
  x86_64-linux/
    quick/archive.tar.zst
    thin-lto/archive.tar.zst
    full-lto/archive.tar.zst
  x86_64-pc-windows-msvc/
    quick/archive.tar.zst
    ...
  aarch64-apple-darwin/
    ...

Canonical manifest URL (raw), e.g.:
https://raw.githubusercontent.com/zackees/reld/benchmark-assets/manifest.json

manifest.json shape (sketch)

{
  "schema_version": 1,
  "generated_at": "<ISO8601>",
  "bevy_version": "<pinned>",
  "assets": [
    {
      "platform": "x86_64-linux",
      "configuration": "quick",         // quick | thin-lto | full-lto
      "archive_url": "https://raw.githubusercontent.com/zackees/reld/benchmark-assets/x86_64-linux/quick/archive.tar.zst",
      "sha256": "<digest>",
      "bytes": 123456789,
      "link_command": "link-command.sh",  // path inside the archive
      "toolchain": { "rustc": "1.94.1", "profile": "linkbench-quick" }
    }
    // ... one entry per (platform x configuration)
  ]
}

Each archive contains the frozen linker inputs (.o, .rlib, native libs) plus the normalized final link command (paths rewritten relative to the archive root) captured via rustc --print link-args.

Alternative: per-platform benchmark-assets-<platform> branches

One branch per platform (benchmark-assets-x86_64-linux, -windows-msvc, -darwin), each publishing its own archives, with a small top-level manifest.json (on the main assets branch or the repo) pointing at each. Trade-offs to decide:

  • Pro: each platform's publish job force-pushes only its own branch (no contention), smaller per-branch history, easier partial refresh.
  • Con: more branches to manage; the www/site story fragments; manifest.json must aggregate across branches.

Pick one in this issue before #55/#56 wire up publishing. Default recommendation: single benchmark-assets branch + manifest.json (simplest consumer story, one www site); split to per-platform branches only if blob size / force-push contention forces it.

Publishing flow

  1. Per platform, the benchmark prep (from bench: frozen Bevy link corpus — compile once per platform, replay the link every iteration #55/bench: quick-link / thin-LTO / full-LTO sections over the frozen corpus (link only, no compile in the loop) #56) builds each configuration once and freezes inputs + link command.
  2. Archive each (platform, configuration) with zstd high compression (soldr's fast zstd where available — ties to setup-soldr#463), checksum it.
  3. Push archives to the assets branch and regenerate manifest.json atomically (checksums, sizes, bevy/toolchain versions, generated_at).
  4. Refresh is explicit (bump Bevy version / configuration change), verbose about what branch + archives are published (consistent with ci(bench): print per-OS performance stats in the job + verbose benchmark-stats branch publish #53).

Consumption flow

  1. reld-bench reads manifest.json, selects the entries for the current platform + requested configuration(s).
  2. Downloads + verifies sha256, extracts the archive, rewrites the link command to the local extraction dir.
  3. Replays the link N times per linker — no compilation in the loop — and reports per-configuration, per-linker medians.
  4. Caches the extracted corpus locally (setup-soldr side-cache #463) so repeat runs skip the download.

Acceptance criteria

Decisions (proposed defaults — refine here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions