Skip to content

perf(ci): pin crane deps in a Nix profile to persist across runs - #1279

Merged
ryoppippi merged 5 commits into
mainfrom
ci/persist-deps-via-profile
Jun 11, 2026
Merged

ryoppippi merged 5 commits into
mainfrom
ci/persist-deps-via-profile

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 11, 2026 •

Copy link
Copy Markdown
Member

Summary

check, test, and the native build jobs recompiled the entire crate
dependency set
(~3 min on the arm runner) on nearly every run, even though the
deps derivation is deterministic.

Root cause (confirmed by inspection + A/B)

The Blacksmith sticky disk persists the Nix store but trims it to GC roots on
commit
. crane's cargoArtifacts (deps-only) is an unrooted intermediate —
referenced only at build time — so it was dropped on every commit and rebuilt.

I confirmed this by attaching the build-native sticky disk and finding the deps
output path missing on restore while ~7GB of other paths persisted, and the
only surviving GC root was a Nix profile. An A/B on the check job then showed
nix flake check drop from ~184s → ~38s with zero dependency
recompilation once the deps were pinned in a profile.

(Notes from the investigation: the GHA action-cache approach used on macOS does
not help here — even on a cache hit the deps rebuilt, because gc-max-store-size
trims unrooted paths before saving, the same failure mode. A binary cache would
also fix it but needs extra infra; this keeps the fast Blacksmith disk.)

Change

  • New pin-nix-deps composite action: nix-env --set the cargoArtifacts path
    into /nix/var/nix/profiles/ccusage-deps (profiles survive the trim).
  • check + test pin the glibc deps (.#ccusage.cargoArtifacts).
  • The Linux native build pins the musl deps (.#ccusage-static.cargoArtifacts);
    re-exposed via passthru.

Each job has its own sticky disk, so each pins its own deps.

Expected effect

Warm runs: check 184s→38s, Linux native build deps reused (no ~190s rebuild),
test Rust deps reused. First run after merge pins; the run after that benefits.

Summary by CodeRabbit

  • Chores
    • CI now pins and persists Rust/Nix dependency artifacts produced by static builds so cached artifacts are reused across runs.
    • Added a reusable action to record dependency outputs into a persistent Nix profile and invoked it in check and test jobs.
    • Exposed dependency-artifact outputs for CI to reference.
    • Hardened token handling for the pinning step.

Summary by cubic

Pin Rust dependency artifacts from crane into a Nix profile in CI so the Blacksmith sticky disk keeps them across runs, removing repeated recompiles and speeding check, test, and native builds. Native builds are now serialized to protect the pinned cache across overlapping runs; warm nix flake check runs dropped from ~184s to ~38s and the native musl build avoids ~190s of dep rebuilds.

  • Performance
    • Added ./.github/actions/pin-nix-deps to root cargoArtifacts in /nix/var/nix/profiles/ccusage-deps via nix-env --set; first run pins, later runs reuse.
    • Pin .#ccusage.cargoArtifacts in check and test (runs on failure; skips on cancel).
    • Pin .#ccusage-static.cargoArtifacts in the Linux native build; exposed via passthru on .#ccusage-static and hardened on PRs with NIX_CONFIG="access-tokens =" when nix-github-token is false.
    • Serialized build-native-packages per matrix entry with concurrency so overlapping runs don’t overwrite each other’s pinned deps.

Written for commit cd795c8. Summary will update on new commits.

Review in cubic


View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled.

The check, test, and native-build jobs recompiled the entire crate dependency
set (~3 min on the arm runner) on nearly every run, even though the deps
derivation is deterministic. The Blacksmith sticky disk persists the store but
trims it to GC roots on commit, and crane's cargoArtifacts is an unrooted
intermediate (referenced only at build time), so it was dropped and rebuilt.

Pin the deps into a Nix profile after they are built. Profiles are the one root
that survives the trim (confirmed by inspecting a restored disk and a CI A/B:
`nix flake check` dropped from ~184s to ~38s with zero dependency recompilation
on the warm run).

- new `pin-nix-deps` composite action: `nix-env --set` the cargoArtifacts path
  into /nix/var/nix/profiles/ccusage-deps.
- check + test jobs pin the glibc deps (`.#ccusage.cargoArtifacts`).
- the Linux native build pins the musl deps (`.#ccusage-static.cargoArtifacts`);
  re-expose them via passthru.

Each job has its own sticky disk, so each pins its own deps.
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d768625c-2458-4f63-8acf-49705b853f80

📥 Commits

Reviewing files that changed from the base of the PR and between 7776387 and cd795c8.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yaml

📝 Walkthrough

Walkthrough

This PR exposes static package cargoArtifacts, adds a composite pin-nix-deps action that builds and pins a flake attribute into a Nix profile, and invokes that action from the Linux native build action and CI check/test jobs to persist deps-only artifacts.

Changes

Nix dependency pinning for CI caching

Layer / File(s) Summary
Expose cargoArtifacts in static package
nix/static-package.nix
The ccusage-static derivation exports cargoArtifacts via passthru to make deps-only build outputs accessible to CI.
Create pin-nix-deps reusable action
.github/actions/pin-nix-deps/action.yaml
A new composite GitHub Action realizes a flake attribute via nix build and pins its output path into a persistent Nix profile using nix-env, ensuring dependencies persist across runs.
Integrate pin-nix-deps into builds and CI
.github/actions/build-linux-native-package/action.yaml, .github/workflows/ci.yaml
The Linux static native package build and CI check/test jobs now invoke pin-nix-deps before verification/testing steps (guarded on cancellation) using attr: .#ccusage-static.cargoArtifacts and propagate the nix-github-token hardening via NIX_CONFIG.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ccusage/ccusage#1260: Modifies .github/actions/build-linux-native-package/action.yaml to affect the Linux static Nix build execution; these changes are directly connected at the CI action level.

Suggested reviewers

  • pullfrog

Poem

🐰 I hop through flakes and build with glee,
I pin the deps so they stay with me,
No GC storms to sweep them away,
Cached crates calm the CI fray,
I nibble logs and guard the day.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: pinning Nix dependencies in a profile to persist across CI runs for performance optimization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/persist-deps-via-profile

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide cd795c8 Commit Preview URL

Branch Preview URL
Jun 11 2026, 07:07 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yaml:
- Around line 33-35: The pinning steps that use the
./.github/actions/pin-nix-deps action (the steps with `attr:
.#ccusage.cargoArtifacts` and the similar step around lines 68-70) currently run
only on success and are skipped on failures; update those job steps to run
unconditionally by adding `if: always()` (or the equivalent unconditional
condition) so pinning occurs even when prior steps fail, ensuring built Nix
artifacts are rooted and cached for subsequent CI runs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eec8b55c-9858-4bb7-8b84-59dba540e8bb

📥 Commits

Reviewing files that changed from the base of the PR and between f28fa45 and f0b5ba8.

📒 Files selected for processing (4)
  • .github/actions/build-linux-native-package/action.yaml
  • .github/actions/pin-nix-deps/action.yaml
  • .github/workflows/ci.yaml
  • nix/static-package.nix

Comment thread .github/workflows/ci.yaml Outdated

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes — adds a pin-nix-deps composite action that roots crane cargoArtifacts in a Nix profile so the Blacksmith sticky disk's GC trim preserves them across CI runs, and wires it into the check, test, and build-linux-native-package jobs. The root cause is well-investigated (confirmed by inspecting sticky disk state + A/B validation showing 184s→38s on nix flake check), and the fix is minimal and correct.

  • Add .github/actions/pin-nix-deps/action.yaml — new composite action that runs nix build --no-link to verify the path is realized, then nix-env --set into /nix/var/nix/profiles/ccusage-deps to create a GC root that survives the sticky disk trim.
  • Wire pinning into check and test jobs — pin .#ccusage.cargoArtifacts after their respective build steps (nix flake check / nix build .#ccusage-tests).
  • Wire pinning into build-linux-native-package — pin .#ccusage-static.cargoArtifacts after the static binary build.
  • Expose static cargoArtifacts via passthru in nix/static-package.nix — mirrors the existing pattern in package.nix:62-68.

Pullfrog  | View workflow run | Using Big Pickle (free via Pullfrog for OSS) | 𝕏

@pullfrog

pullfrog Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Diagnosis

The build-windows-x64 failure in check suite 73594671014 is pre-existing and unrelated to this PR.

Evidence

  • PR perf(ci): pin crane deps in a Nix profile to persist across runs #1279 only touches 4 files, all Linux/Nix-specific: .github/actions/build-linux-native-package/action.yaml, the new pin-nix-deps action, .github/workflows/ci.yaml (check/test/pin steps), and nix/static-package.nix.
  • The Windows build action (build-windows-native-package), its cache setup, the CI workflow's Windows job, and all Windows config are completely untouched.
  • The job log shows every main step succeeded: cache restored (line 200), cargo build --release completed in 38s (line 225), stage-native-package.mjs ran (line 234), tar archive created (line 236), artifact uploaded (line 265).
  • The failure is in the Post Run cleanup step (actions/cache saving), which is an infrastructure-level cache-write issue, not a code defect.

Conclusion

No fix is needed for the PR. The Windows failure is an environmental/infrastructure issue that has been seen as a pre-existing flake (see learnings L32 — pre-existing Nix packaging/platform issues). The PR's Linux Nix profile pinning is correct and the Windows failure is unrelated to the change.

Task list (3/5 completed)
  • Checkout PR branch and examine the failing CI workflow
  • Diagnose the build-windows-x64 failure (post-run step)
  • Verify failure was introduced by this PR — not the case, abort
  • Fix the issue and verify
  • Commit and push to existing PR

Pullfrog  | View workflow run | via Pullfrog | Using Big Pickle (free via Pullfrog for OSS) | 𝕏

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 4 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread .github/actions/build-linux-native-package/action.yaml
Comment thread .github/workflows/ci.yaml Outdated
If `nix flake check` or `nix build .#ccusage-tests` fails, the default
`success()` condition skipped the pin-nix-deps step, leaving any deps
built during the failing run unrooted. They were then trimmed on commit
and the next run had to recompile them, defeating the warm-cache goal.

Run the pin step with `if: ${{ !cancelled() }}` so failed runs still
root the deps for the next attempt, while skipping on cancel (where
there is nothing useful to pin).

Co-authored-by: Codesmith <[email protected]>
@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

ccusage

npx https://pkg.pr.new/ccusage@1279

@ccusage/ccusage-darwin-arm64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-arm64@1279

@ccusage/ccusage-linux-arm64

npx https://pkg.pr.new/@ccusage/ccusage-linux-arm64@1279

@ccusage/ccusage-linux-x64

npx https://pkg.pr.new/@ccusage/ccusage-linux-x64@1279

@ccusage/ccusage-win32-x64

npx https://pkg.pr.new/@ccusage/ccusage-win32-x64@1279

commit: a93795e

The Linux native build's `pin-nix-deps` step invokes `nix build` and
`nix eval` to root the static-build deps. On PR runs from forks the
preceding build step uses `NIX_CONFIG="access-tokens ="` so Nix
cannot use the GitHub token for fetches; the pin step inherited the
default config and bypassed that hardening.

Forward the same gate via an `env:` on the composite step so the
pin's Nix invocations honor the caller's `nix-github-token` input.

Co-authored-by: Codesmith <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f0b5ba886099
Base SHA: f28fa456f0c8

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 913.0ms 1.079s 72.3ms 3
PR pkg.pr.new f0b5ba8 1.049s 907.8ms 70.9ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: f0b5ba8. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 966.1ms 1.044s 0.93x 733.75 MiB 731.25 MiB 1.00x 1.04 GiB/s 987.86 MiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 211.1ms 217.2ms 0.97x 91.00 MiB 94.75 MiB 1.04x 4.77 GiB/s 4.64 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 991.4ms 1.02 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 943.9ms 1.07 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 192.5ms 5.23 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 143.5ms 7.02 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 54.3ms 6.8ms 7.93x 43.00 MiB 2.75 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
claude session --offline --json 0.00 MiB 48.9ms 6.7ms 7.32x 43.00 MiB 2.75 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
codex daily --offline --json 0.00 MiB 49.5ms 5.8ms 8.47x 43.25 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.15 MiB/s
codex session --offline --json 0.00 MiB 49.9ms 6.7ms 7.39x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.13 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 902.5ms 967.9ms 0.93x 735.25 MiB 743.25 MiB 1.01x 1.12 GiB/s 1.04 GiB/s
codex --offline --json 1.01 GiB 181.4ms 143.6ms 1.26x 89.75 MiB 95.00 MiB 1.06x 5.55 GiB/s 7.01 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.32 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f0b5ba886099
Base SHA: f28fa456f0c8

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.023s 998.2ms 71.4ms 3
PR pkg.pr.new f0b5ba8 1.002s 834.5ms 68.4ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: f0b5ba8. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 1.051s 1.013s 1.04x 738.75 MiB 729.50 MiB 0.99x 980.81 MiB/s 1017.42 MiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 210.3ms 215.1ms 0.98x 92.75 MiB 92.75 MiB 1.00x 4.79 GiB/s 4.68 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 1.035s 995.96 MiB/s 1
claude --offline --json Installed native binary 1.01 GiB 941.6ms 1.07 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 194.0ms 5.19 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 146.2ms 6.89 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 45.1ms 41.5ms 1.09x 43.25 MiB 43.00 MiB 0.99x 0.03 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 43.0ms 47.9ms 0.90x 43.00 MiB 43.00 MiB 1.00x 0.04 MiB/s 0.03 MiB/s
codex daily --offline --json 0.00 MiB 46.3ms 49.0ms 0.94x 42.75 MiB 43.25 MiB 1.01x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 46.5ms 46.3ms 1.00x 43.25 MiB 43.00 MiB 0.99x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 908.7ms 986.9ms 0.92x 729.00 MiB 730.25 MiB 1.00x 1.11 GiB/s 1.02 GiB/s
codex --offline --json 1.01 GiB 180.2ms 178.0ms 1.01x 93.00 MiB 92.25 MiB 0.99x 5.59 GiB/s 5.66 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.32 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes — two incremental commits adding PR token hardening to the linux native pin step and making the check/test pin steps resilient to job failure (but skipped on cancellation).

  • Token-hardened the linux-native pin step — mirrors the existing NIX_CONFIG gate from the build step so pin runs correctly on pull_request events.
  • Pin deps even on build/test failure — the check and test jobs now use if: ${{ !cancelled() }}, replacing the implicit success() default so deps are always rooted after building regardless of outcome (but still skipped on cancellation).

Pullfrog  | View workflow run | Using Big Pickle (free via Pullfrog for OSS) | 𝕏

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 5b7c7730540e
Base SHA: f28fa456f0c8

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.251s 778.2ms 57.1ms 3
PR pkg.pr.new 5b7c773 1.038s 1.257s 56.4ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: 5b7c773. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 916.4ms 877.9ms 1.04x 736.25 MiB 735.00 MiB 1.00x 1.10 GiB/s 1.15 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 193.6ms 199.9ms 0.97x 94.00 MiB 94.50 MiB 1.01x 5.20 GiB/s 5.04 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 881.7ms 1.14 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 833.8ms 1.21 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 170.7ms 5.90 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 132.3ms 7.61 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 40.7ms 5.2ms 7.80x 43.00 MiB 2.75 MiB 0.06x 0.04 MiB/s 0.30 MiB/s
claude session --offline --json 0.00 MiB 36.5ms 5.1ms 7.15x 43.00 MiB 2.75 MiB 0.06x 0.04 MiB/s 0.30 MiB/s
codex daily --offline --json 0.00 MiB 35.3ms 4.7ms 7.47x 43.25 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.18 MiB/s
codex session --offline --json 0.00 MiB 36.5ms 5.0ms 7.26x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.17 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 798.0ms 877.4ms 0.91x 739.00 MiB 731.50 MiB 0.99x 1.26 GiB/s 1.15 GiB/s
codex --offline --json 1.01 GiB 168.6ms 131.2ms 1.28x 92.75 MiB 96.50 MiB 1.04x 5.97 GiB/s 7.67 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 5b7c7730540e
Base SHA: f28fa456f0c8

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.048s 892.7ms 59.8ms 3
PR pkg.pr.new 5b7c773 1.083s 1.104s 59.8ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: 5b7c773. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 984.6ms 970.6ms 1.01x 738.50 MiB 724.75 MiB 0.98x 1.02 GiB/s 1.04 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 185.3ms 180.8ms 1.02x 92.50 MiB 93.25 MiB 1.01x 5.43 GiB/s 5.57 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 854.2ms 1.18 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 807.3ms 1.25 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 160.5ms 6.27 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 120.1ms 8.38 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 53.4ms 40.6ms 1.32x 43.00 MiB 43.00 MiB 1.00x 0.03 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 40.9ms 40.6ms 1.01x 43.00 MiB 43.25 MiB 1.01x 0.04 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 40.6ms 41.1ms 0.99x 43.00 MiB 43.25 MiB 1.01x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 43.2ms 44.4ms 0.97x 43.25 MiB 43.00 MiB 0.99x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 812.4ms 874.7ms 0.93x 741.25 MiB 720.00 MiB 0.97x 1.24 GiB/s 1.15 GiB/s
codex --offline --json 1.01 GiB 161.1ms 173.5ms 0.93x 88.25 MiB 90.25 MiB 1.02x 6.25 GiB/s 5.80 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 7776387ba873
Base SHA: f28fa456f0c8

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 879.6ms 932.9ms 62.3ms 3
PR pkg.pr.new 7776387 1.113s 1.097s 59.0ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: 7776387. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 925.9ms 913.7ms 1.01x 730.50 MiB 725.25 MiB 0.99x 1.09 GiB/s 1.10 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 194.1ms 190.3ms 1.02x 91.50 MiB 88.00 MiB 0.96x 5.19 GiB/s 5.29 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 858.5ms 1.17 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 829.7ms 1.21 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 168.7ms 5.97 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 127.9ms 7.87 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 45.3ms 39.0ms 1.16x 43.00 MiB 43.00 MiB 1.00x 0.03 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 39.8ms 39.2ms 1.01x 43.00 MiB 43.00 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 37.0ms 39.0ms 0.95x 43.00 MiB 43.00 MiB 1.00x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 36.7ms 37.2ms 0.99x 43.00 MiB 43.25 MiB 1.01x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 841.6ms 868.2ms 0.97x 728.75 MiB 731.75 MiB 1.00x 1.20 GiB/s 1.16 GiB/s
codex --offline --json 1.01 GiB 175.2ms 172.4ms 1.02x 91.25 MiB 92.00 MiB 1.01x 5.75 GiB/s 5.84 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 7776387ba873
Base SHA: f28fa456f0c8

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 831.9ms 787.1ms 71.7ms 3
PR pkg.pr.new 7776387 980.7ms 898.8ms 70.6ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: 7776387. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 864.2ms 1.023s 0.85x 739.00 MiB 734.50 MiB 0.99x 1.16 GiB/s 1008.06 MiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 208.4ms 210.4ms 0.99x 91.25 MiB 91.75 MiB 1.01x 4.83 GiB/s 4.78 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 989.1ms 1.02 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 949.4ms 1.06 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 192.7ms 5.22 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 139.6ms 7.21 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 50.7ms 6.4ms 7.94x - 3.00 MiB - 0.03 MiB/s 0.24 MiB/s
claude session --offline --json 0.00 MiB 48.5ms 7.3ms 6.65x 43.00 MiB 2.75 MiB 0.06x 0.03 MiB/s 0.21 MiB/s
codex daily --offline --json 0.00 MiB 48.5ms 6.2ms 7.81x 43.25 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.14 MiB/s
codex session --offline --json 0.00 MiB 47.1ms 6.8ms 6.93x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.13 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 857.4ms 894.4ms 0.96x 731.25 MiB 734.25 MiB 1.00x 1.17 GiB/s 1.13 GiB/s
codex --offline --json 1.01 GiB 180.0ms 136.4ms 1.32x 89.00 MiB 93.75 MiB 1.05x 5.59 GiB/s 7.38 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: a93795ea61a7
Base SHA: f28fa456f0c8

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.097s 871.8ms 62.3ms 3
PR pkg.pr.new a93795e 1.212s 1.082s 62.6ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: a93795e. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 900.9ms 895.0ms 1.01x 734.25 MiB 735.50 MiB 1.00x 1.12 GiB/s 1.12 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 206.2ms 221.1ms 0.93x 92.50 MiB 88.75 MiB 0.96x 4.88 GiB/s 4.55 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 916.9ms 1.10 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 913.6ms 1.10 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 177.0ms 5.69 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 128.6ms 7.83 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 41.8ms 5.5ms 7.54x 43.25 MiB 3.00 MiB 0.07x 0.04 MiB/s 0.28 MiB/s
claude session --offline --json 0.00 MiB 45.4ms 5.5ms 8.22x 43.25 MiB 2.75 MiB 0.06x 0.03 MiB/s 0.28 MiB/s
codex daily --offline --json 0.00 MiB 38.6ms 5.3ms 7.22x 43.25 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.16 MiB/s
codex session --offline --json 0.00 MiB 37.8ms 5.5ms 6.83x 43.25 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.15 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 800.6ms 818.8ms 0.98x 735.50 MiB 749.00 MiB 1.02x 1.26 GiB/s 1.23 GiB/s
codex --offline --json 1.01 GiB 171.5ms 126.9ms 1.35x 91.50 MiB 89.50 MiB 0.98x 5.87 GiB/s 7.93 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.32 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: a93795ea61a7
Base SHA: f28fa456f0c8

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 958.1ms 823.8ms 64.7ms 3
PR pkg.pr.new a93795e 1.030s 751.7ms 62.0ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: a93795e. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 942.2ms 1.011s 0.93x 756.50 MiB 731.75 MiB 0.97x 1.07 GiB/s 1019.95 MiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 202.8ms 198.1ms 1.02x 91.00 MiB 88.00 MiB 0.97x 4.96 GiB/s 5.08 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 919.4ms 1.10 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 957.0ms 1.05 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 171.2ms 5.88 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 130.4ms 7.72 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 48.6ms 42.8ms 1.14x 42.75 MiB 43.00 MiB 1.01x 0.03 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 39.3ms 42.3ms 0.93x 43.25 MiB 43.00 MiB 0.99x 0.04 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 39.4ms 39.0ms 1.01x 43.25 MiB 43.25 MiB 1.00x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 43.5ms 41.6ms 1.05x 43.25 MiB 43.00 MiB 0.99x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 843.2ms 980.0ms 0.86x 723.25 MiB 737.75 MiB 1.02x 1.19 GiB/s 1.03 GiB/s
codex --offline --json 1.01 GiB 175.5ms 173.2ms 1.01x 90.00 MiB 89.00 MiB 0.99x 5.74 GiB/s 5.81 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.32 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@ryoppippi
ryoppippi merged commit 602c901 into main Jun 11, 2026
10 of 13 checks passed
@ryoppippi
ryoppippi deleted the ci/persist-deps-via-profile branch June 11, 2026 19:06
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: cd795c821f56
Base SHA: f28fa456f0c8

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.101s 771.1ms 58.4ms 3
PR pkg.pr.new cd795c8 990.5ms 1.116s 56.6ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: cd795c8. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 785.4ms 856.7ms 0.92x 739.75 MiB 737.00 MiB 1.00x 1.28 GiB/s 1.18 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 178.3ms 173.5ms 1.03x 92.75 MiB 90.25 MiB 0.97x 5.65 GiB/s 5.80 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 832.4ms 1.21 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 714.1ms 1.41 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 159.6ms 6.31 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 117.7ms 8.56 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 37.1ms 4.4ms 8.38x 42.50 MiB 3.00 MiB 0.07x 0.04 MiB/s 0.35 MiB/s
claude session --offline --json 0.00 MiB 39.1ms 4.6ms 8.47x 43.00 MiB 2.75 MiB 0.06x 0.04 MiB/s 0.33 MiB/s
codex daily --offline --json 0.00 MiB 38.7ms 4.2ms 9.27x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.21 MiB/s
codex session --offline --json 0.00 MiB 37.3ms 4.0ms 9.31x 43.00 MiB 2.75 MiB 0.06x 0.02 MiB/s 0.21 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 770.9ms 739.2ms 1.04x 750.50 MiB 739.75 MiB 0.99x 1.31 GiB/s 1.36 GiB/s
codex --offline --json 1.01 GiB 153.1ms 119.3ms 1.28x 89.00 MiB 92.50 MiB 1.04x 6.58 GiB/s 8.44 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: cd795c821f56
Base SHA: f28fa456f0c8

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new f28fa456f0c8 1.059s 1.036s 56.9ms 3
PR pkg.pr.new cd795c8 1.118s 921.7ms 57.3ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: f28fa456f0c8; PR package: cd795c8. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 799.5ms 747.8ms 1.07x 744.50 MiB 731.00 MiB 0.98x 1.26 GiB/s 1.35 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 177.0ms 178.6ms 0.99x 90.50 MiB 91.75 MiB 1.01x 5.69 GiB/s 5.64 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 777.1ms 1.30 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 775.9ms 1.30 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 154.8ms 6.50 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 119.9ms 8.40 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 45.4ms 38.4ms 1.18x 43.00 MiB 43.25 MiB 1.01x 0.03 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 37.5ms 37.5ms 1.00x 42.75 MiB 43.00 MiB 1.01x 0.04 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 37.3ms 37.8ms 0.99x 43.00 MiB 43.25 MiB 1.01x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 37.8ms 37.5ms 1.01x 43.25 MiB 43.00 MiB 0.99x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 822.0ms 781.0ms 1.05x 738.50 MiB 724.00 MiB 0.98x 1.22 GiB/s 1.29 GiB/s
codex --offline --json 1.01 GiB 150.9ms 158.8ms 0.95x 92.50 MiB 96.00 MiB 1.04x 6.67 GiB/s 6.34 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.32 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3324.84 KiB 3324.84 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

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