Skip to content

build(rust): update toolchain to 1.96.0 - #1307

Merged
ryoppippi merged 2 commits into
mainfrom
codex/update-rust-toolchain-1-96
Jun 12, 2026
Merged

build(rust): update toolchain to 1.96.0#1307
ryoppippi merged 2 commits into
mainfrom
codex/update-rust-toolchain-1-96

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Updates the pinned Rust toolchain from 1.85.1 to 1.96.0 and refreshes the rust-overlay flake input so Nix can resolve that stable release.

This keeps the Rust compiler, clippy, rustfmt, and llvm-tools current, and unblocks Rust crates that require 1.95 or newer. This PR is not framed as a runtime performance optimization because local benchmark results were mixed.

Validation

  • Pre-commit hook on commit: treefmt, gitleaks
  • Pre-push hook on push: treefmt, gitleaks; clippy/cargo/vitest hooks skipped because no matching files
  • Built release binaries for Rust 1.85.1 and 1.96.0 in separate target dirs
  • Verified JSON parity for claude daily, claude session, claude blocks, codex daily, and codex session

Local measurements

  • arm64 macOS release binary: 2,812,944 bytes -> 2,730,592 bytes (-82,352 bytes, -2.93%)
  • Claude 129 MiB fixture: daily improved, session/blocks were slightly slower/noisy
  • Codex 1.0 GiB fixture: session improved, daily was slower in the rerun

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


Summary by cubic

Upgrade Rust toolchain to 1.96.0 and refresh the Nix rust-overlay pin so local and CI builds use the current stable compiler. Also fixes new clippy 1.96 lints to keep -D warnings green, keeps rustfmt and llvm-tools-preview in sync, and unblocks crates requiring 1.95+.

  • Dependencies
    • Updated rust-overlay flake input to resolve Rust 1.96.0.

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

Review in cubic

Summary by CodeRabbit

  • Chores

    • Updated Rust toolchain to version 1.96.0
  • Refactor

    • Internal improvements to option sorting and leap-year checks
    • Simplified pricing override handling for more consistent behavior
  • Tests

    • Removed redundant test imports and relied on exported test helpers

Bump the pinned Rust toolchain from 1.85.1 to 1.96.0 and update the rust-overlay input so the Nix dev shell can resolve the newer stable release.

This keeps local and CI Rust builds on a current stable compiler, unblocks crates that require Rust 1.95 or newer, and keeps clippy, rustfmt, and llvm-tools in sync with the compiler.

Local release measurements showed the arm64 macOS ccusage binary shrinking from 2,812,944 bytes to 2,730,592 bytes. Runtime benchmarks were mixed across Claude and Codex large fixtures, so this change is not presented as a performance optimisation.
@pullfrog

pullfrog Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

no API key found — this repo is configured to use deepseek/deepseek-v4-pro, which needs DEEPSEEK_API_KEY, but the runner has no key for it.

To fix: add the key as a GitHub Actions secret (referenced from your workflow's env: block) or as a Pullfrog secret in the console — or switch this repo to a different model (free models need no key).

Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Jun 12, 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: 0d458a3a-b957-4a50-9a0a-794f72aac247

📥 Commits

Reviewing files that changed from the base of the PR and between 3670758 and d7e76ba.

📒 Files selected for processing (4)
  • rust/crates/ccusage-cli/src/help_codegen.rs
  • rust/crates/ccusage-test-support/src/lib.rs
  • rust/crates/ccusage/src/adapter/codex/parser.rs
  • rust/crates/ccusage/src/pricing.rs
💤 Files with no reviewable changes (1)
  • rust/crates/ccusage-test-support/src/lib.rs
✅ Files skipped from review due to trivial changes (1)
  • rust/crates/ccusage/src/adapter/codex/parser.rs

📝 Walkthrough

Walkthrough

Bumps Rust toolchain channel in rust-toolchain.toml to 1.96.0 and applies small refactors: replaces manual sorts with sort_by_key in codegen, removes a local test macro import, refactors leap-year logic to is_multiple_of, and simplifies PricingMap::apply_override pattern matching.

Changes

Rust Toolchain Configuration

Layer / File(s) Summary
Toolchain version update
rust-toolchain.toml
Rust channel is bumped from 1.85.1 to 1.96.0; components remain unchanged.

Code refactors and tests

Layer / File(s) Summary
Help codegen sorting improvements
rust/crates/ccusage-cli/src/help_codegen.rs
generate_option_functions now uses sort_by_key for option_sets and combined_options instead of sort_by with explicit comparators.
Test macro import removal
rust/crates/ccusage-test-support/src/lib.rs
Removed local use crate::fs_fixture; from the tests module; tests rely on the exported fs_fixture! macro.
Codex parser leap-year refactor
rust/crates/ccusage/src/adapter/codex/parser.rs
codex_is_leap_year rewritten to use is_multiple_of calls in place of modulus arithmetic.
Pricing override pattern simplification
rust/crates/ccusage/src/pricing.rs
PricingMap::apply_override now uses if let Some(...) to select explicit cache_create/cache_read overrides while keeping existing scaling fallbacks.

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pullfrog

Poem

🐰 A tidy hop from old to new,
The toolchain climbs, the code prunes through,
Sorts made kinder, tests stay bright,
Leap years counted just right,
Cache rules simplified — carrot-approved delight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'build(rust): update toolchain to 1.96.0' directly and accurately summarizes the main change: updating the Rust toolchain version.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/update-rust-toolchain-1-96

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 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 d7e76ba Commit Preview URL

Branch Preview URL
Jun 12 2026, 07:41 PM

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

@ryoppippi Sure, I'll review the changes in this PR!

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

No issues found across 2 files

Re-trigger cubic

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

ccusage

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-x64@1307

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-x64

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

commit: d7e76ba

Rust 1.96 added new clippy lints that broke the workspace with `-D warnings`:

- `unnecessary_sort_by` on the CLI help codegen `sort_by` calls: switched to `sort_by_key`.
- `manual_is_multiple_of` on the Codex leap-year helper: switched to `u16::is_multiple_of`.
- `unnecessary_unwrap` on the pricing override branches: switched to `if let Some(value) = …`.
- `unused_imports` on the `ccusage-test-support` tests module: dropped the redundant `use crate::fs_fixture` since the macro is `#[macro_export]` and is referenced via the macro_rules name directly.

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

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 3670758c12d0
Base SHA: 54d318f2a917

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 54d318f2a917 669.3ms 885.4ms 21.4ms 3
PR pkg.pr.new 3670758 662.2ms 1.131s 22.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: 54d318f2a917; PR package: 3670758. 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 261.2ms 248.7ms 1.05x 702.25 MiB 746.75 MiB 1.06x 3.85 GiB/s 4.05 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 87.9ms 90.3ms 0.97x 93.50 MiB 92.00 MiB 0.98x 11.45 GiB/s 11.15 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 232.5ms 4.33 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 226.8ms 4.44 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 77.0ms 13.08 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 62.9ms 16.01 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 17.0ms 14.9ms 1.14x 43.00 MiB 42.75 MiB 0.99x 0.09 MiB/s 0.10 MiB/s
claude session --offline --json 0.00 MiB 16.4ms 14.1ms 1.16x 43.25 MiB 43.00 MiB 0.99x 0.09 MiB/s 0.11 MiB/s
codex daily --offline --json 0.00 MiB 14.6ms 14.1ms 1.04x 42.75 MiB 43.25 MiB 1.01x 0.06 MiB/s 0.06 MiB/s
codex session --offline --json 0.00 MiB 14.2ms 14.4ms 0.99x 42.75 MiB 43.00 MiB 1.01x 0.06 MiB/s 0.06 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 259.8ms 238.4ms 1.09x 739.00 MiB 721.50 MiB 0.98x 3.87 GiB/s 4.22 GiB/s
codex --offline --json 1.01 GiB 75.7ms 81.5ms 0.93x 94.00 MiB 91.25 MiB 0.97x 13.30 GiB/s 12.35 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3968.69 KiB 3837.94 KiB -130.75 KiB 1.03x

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: 3670758c12d0
Base SHA: 54d318f2a917

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 54d318f2a917 745.6ms 576.4ms 22.5ms 3
PR pkg.pr.new 3670758 713.9ms 1.031s 21.2ms 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: 54d318f2a917; PR package: 3670758. 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 270.3ms 251.4ms 1.07x 739.50 MiB 727.50 MiB 0.98x 3.73 GiB/s 4.00 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 87.0ms 91.3ms 0.95x 92.00 MiB 93.75 MiB 1.02x 11.57 GiB/s 11.03 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 244.0ms 4.13 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 226.9ms 4.44 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 78.9ms 12.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 64.5ms 15.62 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 17.9ms 2.1ms 8.61x 43.00 MiB 2.75 MiB 0.06x 0.09 MiB/s 0.75 MiB/s
claude session --offline --json 0.00 MiB 18.0ms 2.2ms 8.29x 43.00 MiB 2.75 MiB 0.06x 0.09 MiB/s 0.71 MiB/s
codex daily --offline --json 0.00 MiB 14.6ms 1.8ms 7.96x 42.75 MiB 3.00 MiB 0.07x 0.06 MiB/s 0.47 MiB/s
codex session --offline --json 0.00 MiB 14.5ms 1.9ms 7.49x 42.75 MiB 3.00 MiB 0.07x 0.06 MiB/s 0.44 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 293.8ms 284.3ms 1.03x 732.25 MiB 729.25 MiB 1.00x 3.43 GiB/s 3.54 GiB/s
codex --offline --json 1.01 GiB 77.3ms 65.4ms 1.18x 89.25 MiB 94.50 MiB 1.06x 13.03 GiB/s 15.39 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3968.69 KiB 3837.94 KiB -130.75 KiB 1.03x

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 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

no API key found — this repo is configured to use deepseek/deepseek-v4-pro, which needs DEEPSEEK_API_KEY, but the runner has no key for it.

To fix: add the key as a GitHub Actions secret (referenced from your workflow's env: block) or as a Pullfrog secret in the console — or switch this repo to a different model (free models need no key).

Open repo secrets → · Configure model → · Setup docs → · Ask in Discord →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: d7e76ba7bbdd
Base SHA: 54d318f2a917

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 54d318f2a917 835.7ms 747.1ms 24.1ms 3
PR pkg.pr.new d7e76ba 953.3ms 879.5ms 31.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: 54d318f2a917; PR package: d7e76ba. 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 258.3ms 251.5ms 1.03x 723.00 MiB 732.75 MiB 1.01x 3.90 GiB/s 4.00 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 102.8ms 114.4ms 0.90x 90.50 MiB 95.00 MiB 1.05x 9.79 GiB/s 8.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 223.3ms 4.51 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 219.5ms 4.59 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 95.9ms 10.50 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 76.8ms 13.10 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 19.1ms 20.2ms 0.95x 42.75 MiB 43.00 MiB 1.01x 0.08 MiB/s 0.08 MiB/s
claude session --offline --json 0.00 MiB 17.9ms 18.5ms 0.96x 43.00 MiB 42.75 MiB 0.99x 0.09 MiB/s 0.08 MiB/s
codex daily --offline --json 0.00 MiB 20.9ms 18.1ms 1.15x 43.25 MiB 43.25 MiB 1.00x 0.04 MiB/s 0.05 MiB/s
codex session --offline --json 0.00 MiB 16.8ms 18.5ms 0.91x 42.75 MiB 42.75 MiB 1.00x 0.05 MiB/s 0.05 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 241.2ms 228.3ms 1.06x 741.75 MiB 752.00 MiB 1.01x 4.17 GiB/s 4.41 GiB/s
codex --offline --json 1.01 GiB 94.5ms 93.4ms 1.01x 89.00 MiB 91.75 MiB 1.03x 10.65 GiB/s 10.78 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3968.69 KiB 3837.94 KiB -130.75 KiB 1.03x

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: d7e76ba7bbdd
Base SHA: 54d318f2a917

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 54d318f2a917 571.4ms 586.1ms 25.0ms 3
PR pkg.pr.new d7e76ba 776.0ms 686.5ms 25.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: 54d318f2a917; PR package: d7e76ba. 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 263.8ms 236.2ms 1.12x 730.75 MiB 738.75 MiB 1.01x 3.82 GiB/s 4.26 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 111.6ms 103.4ms 1.08x 88.25 MiB 90.25 MiB 1.02x 9.02 GiB/s 9.74 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 239.3ms 4.21 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 220.6ms 4.56 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 96.4ms 10.45 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 73.5ms 13.70 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 16.7ms 2.6ms 6.40x 43.00 MiB 2.75 MiB 0.06x 0.09 MiB/s 0.59 MiB/s
claude session --offline --json 0.00 MiB 20.8ms 2.5ms 8.31x - 2.75 MiB - 0.07 MiB/s 0.62 MiB/s
codex daily --offline --json 0.00 MiB 18.1ms 2.9ms 6.32x 43.00 MiB 3.00 MiB 0.07x 0.05 MiB/s 0.30 MiB/s
codex session --offline --json 0.00 MiB 16.4ms 2.2ms 7.63x 43.25 MiB 3.00 MiB 0.07x 0.05 MiB/s 0.40 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 262.0ms 224.1ms 1.17x 719.00 MiB 728.75 MiB 1.01x 3.84 GiB/s 4.49 GiB/s
codex --offline --json 1.01 GiB 94.4ms 75.9ms 1.24x 92.00 MiB 92.75 MiB 1.01x 10.67 GiB/s 13.26 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 17.33 KiB 17.33 KiB +0.00 KiB 1.00x
installed native package binary 3968.69 KiB 3837.94 KiB -130.75 KiB 1.03x

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

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

CI follow-up commit d7e76ba addresses the Rust 1.96 Clippy failures. Local validation: nix flake check --print-build-logs.

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

CI follow-up commit d7e76ba addresses the Rust 1.96 Clippy failures. Local validation: nix flake check --print-build-logs.

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

@ryoppippi Sure, I'll review the changes including the follow-up commit d7e76ba7 that addresses the Rust 1.96 Clippy failures!

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

No issues found across 6 files

Re-trigger cubic

@ryoppippi
ryoppippi merged commit 7a550ca into main Jun 12, 2026
38 checks passed
@ryoppippi
ryoppippi deleted the codex/update-rust-toolchain-1-96 branch June 12, 2026 19: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