Skip to content

feat(model): support internal model aliases - #1313

Merged
ryoppippi merged 7 commits into
mainfrom
codex/add-model-alias-env
Jun 13, 2026
Merged

feat(model): support internal model aliases#1313
ryoppippi merged 7 commits into
mainfrom
codex/add-model-alias-env

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 13, 2026

Copy link
Copy Markdown
Member

Adds an internal runtime model alias resolver so local runs can map raw model slugs to canonical model names without exposing a public CLI flag or config schema option.

The alias is applied to pricing/context lookup and report aggregation paths, including Codex grouped model keys, Claude daily aggregation, shared summaries, and blocks output.

Testing:

  • nix develop --command just fmt
  • nix develop --command cargo test --manifest-path rust/Cargo.toml -p ccusage
  • nix develop --command just test

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


Summary by cubic

Adds a runtime model alias resolver so local runs can map provider slugs to canonical model names via CCUSAGE_MODEL_ALIASES (supports a=b,c=d or JSON; honors -fast).
Aliases apply to pricing/context-limit lookup and all report paths (summaries, blocks, Claude daily, Codex groups), resolve before Codex dedupe keys to prevent double-counting, show canonical names in missing-pricing and model lists, and on malformed JSON fall back to delimited parsing while stripping a single outer brace pair; summary aggregation avoids extra allocations when a model already exists.

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

Review in cubic

Summary by CodeRabbit

  • New Features

    • Configurable model aliasing via an environment variable to map model names to canonical names.
  • Bug Fixes

    • Normalized model names across pricing lookups, aggregation, daily summaries, and cost reporting so usage and cost totals consistently group under canonical names.
  • Tests

    • Added unit tests validating alias parsing and that reporting/aggregation use canonical model names.

@pullfrog

pullfrog Bot commented Jun 13, 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 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 468dd5bf-b885-44d4-ac5b-34e451006f49

📥 Commits

Reviewing files that changed from the base of the PR and between 7c25b20 and 7184607.

📒 Files selected for processing (2)
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/model_aliases.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/model_aliases.rs

📝 Walkthrough

Walkthrough

Adds a model-aliases module (env-configured) and applies canonical model-name resolution across pricing lookups, usage aggregation, adapters/blocks, Codex aggregation, and cost reporting, plus tests and a test helper for alias overrides.

Changes

Model alias resolution integration

Layer / File(s) Summary
Model alias infrastructure and module
src/model_aliases.rs, src/main.rs
Adds process-wide cached alias map loaded from CCUSAGE_MODEL_ALIASES, resolve_model_name, parsing (JSON or delimited), -fast handling, test helpers, and module declaration.
Pricing lookup alias resolution
src/pricing.rs
PricingMap::find and PricingMap::context_limit resolve model aliases before primary and fallback lookups; unit test verifies canonical pricing resolution.
Usage aggregation alias integration
src/summary.rs
UsageAccumulator::add_entry resolves models before indexing breakdowns and models, merging aliased variants under canonical names; unit test added.
Adapter, blocks, and Codex aggregation changes
src/adapter/claude/daily.rs, src/adapter/codex/aggregate.rs, src/adapter/codex/mod.rs, src/blocks.rs
Canonicalizes model names for dedupe keys and aggregation in daily accumulators, Codex event grouping (parallel and local paths), and block model lists; tests ensure aliased events/files aggregate under the canonical model.
Cost reporting missing-model normalization
src/cost.rs
Missing-model reporting functions return resolved/aliased model names when pricing entries are absent.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • ccusage/ccusage#1301: Related changes touching PricingMap::find/context_limit and model-to-pricing resolution.

Poem

I hop through names both new and old,
I stitch aliases into gold,
From many models, one I bind,
Reports now group — no strings behind,
A tidy burrowed ledger, bold. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.47% 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 'feat(model): support internal model aliases' directly and clearly describes the main feature added across all modified files—a runtime model alias resolver configured via environment variable.
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/add-model-alias-env

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

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
✅ 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.

@cloudflare-workers-and-pages

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

Branch Preview URL
Jun 13 2026, 10:04 PM

Add a runtime model alias resolver backed by CCUSAGE_MODEL_ALIASES so local runs can map raw provider slugs to canonical model names without adding a public CLI option or config schema field.

Apply the alias during pricing and context-limit lookup, summary/model breakdown aggregation, blocks output, Claude daily fast aggregation, and Codex group aggregation so raw aliases do not leak into reports while costs resolve against the canonical model.

Cover delimited and JSON alias formats, pricing lookup, Codex model key aggregation, and shared summary breakdown merging.
Collapse the nested suffix alias lookup into a let-chain so the model alias resolver passes the repository clippy settings on the rebased Rust toolchain.

Validation: nix develop --command cargo test --manifest-path rust/Cargo.toml -p ccusage model_aliases; nix develop --command just fmt.
@ryoppippi
ryoppippi force-pushed the codex/add-model-alias-env branch from 44384c7 to 0917422 Compare June 13, 2026 21:00
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
✅ 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.

@pkg-pr-new

pkg-pr-new Bot commented Jun 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

ccusage

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

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

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-x64

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

commit: 7184607

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: de228f588a48
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 258.1ms 3.90 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 218.1ms 4.62 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 109.3ms 9.21 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 82.9ms 12.15 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 native ccusage binary 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 25.1ms 3.7ms 6.73x 53.75 MiB 10.21 MiB 0.19x 0.06 MiB/s 0.41 MiB/s
claude session --offline --json 0.00 MiB 27.3ms 2.6ms 10.39x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.59 MiB/s
codex daily --offline --json 0.00 MiB 25.8ms 2.1ms 12.24x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.41 MiB/s
codex session --offline --json 0.00 MiB 22.5ms 2.2ms 10.46x 53.50 MiB 8.19 MiB 0.15x 0.04 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 263.9ms 238.2ms 1.11x 946.51 MiB 946.33 MiB 1.00x 3.82 GiB/s 4.23 GiB/s
codex --offline --json 1.01 GiB 103.3ms 83.4ms 1.24x 431.04 MiB 413.03 MiB 0.96x 9.75 GiB/s 12.06 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.01 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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: de228f588a48
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 238.3ms 4.23 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 228.8ms 4.40 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 106.6ms 9.45 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 83.0ms 12.13 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 24.5ms 24.7ms 0.99x 53.75 MiB 53.50 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 24.7ms 24.4ms 1.01x 53.75 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 25.2ms 24.3ms 1.04x 53.50 MiB 53.50 MiB 1.00x 0.03 MiB/s 0.04 MiB/s
codex session --offline --json 0.00 MiB 23.8ms 23.1ms 1.03x 53.75 MiB 53.75 MiB 1.00x 0.04 MiB/s 0.04 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 258.7ms 265.4ms 0.97x 938.34 MiB 948.34 MiB 1.01x 3.89 GiB/s 3.79 GiB/s
codex --offline --json 1.01 GiB 101.9ms 104.2ms 0.98x 413.03 MiB 417.04 MiB 1.01x 9.88 GiB/s 9.66 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.01 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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: 44384c7c4bf2
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 256.7ms 3.92 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 227.1ms 4.43 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 100.0ms 10.06 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 79.3ms 12.69 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 native ccusage binary 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 26.4ms 3.8ms 6.99x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.41 MiB/s
claude session --offline --json 0.00 MiB 25.0ms 2.6ms 9.75x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.60 MiB/s
codex daily --offline --json 0.00 MiB 25.9ms 2.1ms 12.36x 53.50 MiB 8.20 MiB 0.15x 0.03 MiB/s 0.41 MiB/s
codex session --offline --json 0.00 MiB 22.8ms 2.1ms 10.82x 53.75 MiB 8.19 MiB 0.15x 0.04 MiB/s 0.41 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 268.2ms 230.8ms 1.16x 950.33 MiB 902.32 MiB 0.95x 3.75 GiB/s 4.36 GiB/s
codex --offline --json 1.01 GiB 102.7ms 80.6ms 1.27x 431.04 MiB 427.04 MiB 0.99x 9.80 GiB/s 12.49 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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: 44384c7c4bf2
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 252.7ms 3.98 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 228.2ms 4.41 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 123.1ms 8.18 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 85.5ms 11.77 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 27.6ms 24.1ms 1.15x 53.75 MiB 54.00 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 24.1ms 22.9ms 1.05x 54.00 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.07 MiB/s
codex daily --offline --json 0.00 MiB 22.4ms 23.4ms 0.96x 53.75 MiB 53.75 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
codex session --offline --json 0.00 MiB 22.8ms 22.4ms 1.02x 53.75 MiB 53.50 MiB 1.00x 0.04 MiB/s 0.04 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 261.8ms 261.4ms 1.00x 942.33 MiB 890.32 MiB 0.94x 3.85 GiB/s 3.85 GiB/s
codex --offline --json 1.01 GiB 103.8ms 107.6ms 0.97x 435.04 MiB 409.04 MiB 0.94x 9.70 GiB/s 9.36 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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 commented Jun 13, 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) | 𝕏

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

3 issues found and verified against the latest diff

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

Fix all with cubic | Re-trigger cubic

Comment thread rust/crates/ccusage/src/adapter/codex/aggregate.rs Outdated
Comment thread rust/crates/ccusage/src/summary.rs Outdated
Comment thread rust/crates/ccusage/src/model_aliases.rs Outdated

@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

🧹 Nitpick comments (1)
rust/crates/ccusage/src/model_aliases.rs (1)

14-26: ⚡ Quick win

Consider adding a doc comment to resolve_model_name.

The -fast suffix handling is clever but undocumented. A brief doc comment would help future maintainers understand that aliasing "gpt-5" automatically applies to "gpt-5-fast" as well.

📝 Suggested doc comment
+/// Resolves a model name to its canonical alias, if configured.
+///
+/// Returns the aliased model name from `CCUSAGE_MODEL_ALIASES`, or the original
+/// model name if no alias is configured. Also handles `-fast` variants: if
+/// `model` ends with `-fast` and the base model has an alias, returns
+/// `"{alias}-fast"`.
 pub(crate) fn resolve_model_name(model: &str) -> Cow<'_, str> {
🤖 Prompt for 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.

In `@rust/crates/ccusage/src/model_aliases.rs` around lines 14 - 26, Add a doc
comment to the resolve_model_name function describing its behavior: explain that
it looks up a model name in the model_aliases map and returns an owned alias
when present, and that it also treats names ending with "-fast" specially by
resolving the base model (e.g., "gpt-5-fast") and appending "-fast" to the
aliased base (so an alias for "gpt-5" will also apply to "gpt-5-fast"); mention
that it returns a borrowed model name when no alias is found and note the use of
Cow<'_, str> as the return type. Reference the resolve_model_name function (and
optionally model_aliases) in the comment so maintainers can find the related
code.
🤖 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 `@apps/ccusage/package.json`:
- Line 18: The docs still reference the removed entrypoint string "node
apps/ccusage/dist/cli.js"; search for that exact string in the profiling docs
and update each occurrence to "node apps/ccusage/src/cli.js" so it matches the
package.json bin entry ("ccusage": "./src/cli.js"); ensure all instances are
replaced (the commands and any examples) so the docs invoke the new entrypoint.

---

Nitpick comments:
In `@rust/crates/ccusage/src/model_aliases.rs`:
- Around line 14-26: Add a doc comment to the resolve_model_name function
describing its behavior: explain that it looks up a model name in the
model_aliases map and returns an owned alias when present, and that it also
treats names ending with "-fast" specially by resolving the base model (e.g.,
"gpt-5-fast") and appending "-fast" to the aliased base (so an alias for "gpt-5"
will also apply to "gpt-5-fast"); mention that it returns a borrowed model name
when no alias is found and note the use of Cow<'_, str> as the return type.
Reference the resolve_model_name function (and optionally model_aliases) in the
comment so maintainers can find the related code.
🪄 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: a70f2164-8b26-49bb-8562-5567e33fc8fa

📥 Commits

Reviewing files that changed from the base of the PR and between 5816e64 and bfc4f56.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • .github/workflows/ci.yaml
  • apps/ccusage/AGENTS.md
  • apps/ccusage/justfile
  • apps/ccusage/package.json
  • apps/ccusage/src/cli.js
  • apps/ccusage/src/cli.test.ts
  • apps/ccusage/tsdown.config.ts
  • justfile
  • pnpm-workspace.yaml
  • rust/crates/ccusage/src/adapter/claude/daily.rs
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/adapter/codex/mod.rs
  • rust/crates/ccusage/src/blocks.rs
  • rust/crates/ccusage/src/cost.rs
  • rust/crates/ccusage/src/main.rs
  • rust/crates/ccusage/src/model_aliases.rs
  • rust/crates/ccusage/src/pricing.rs
  • rust/crates/ccusage/src/summary.rs
💤 Files with no reviewable changes (2)
  • pnpm-workspace.yaml
  • apps/ccusage/tsdown.config.ts

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🧹 Nitpick comments (1)
rust/crates/ccusage/src/model_aliases.rs (1)

14-26: ⚡ Quick win

Consider adding a doc comment to resolve_model_name.

The -fast suffix handling is clever but undocumented. A brief doc comment would help future maintainers understand that aliasing "gpt-5" automatically applies to "gpt-5-fast" as well.

📝 Suggested doc comment
+/// Resolves a model name to its canonical alias, if configured.
+///
+/// Returns the aliased model name from `CCUSAGE_MODEL_ALIASES`, or the original
+/// model name if no alias is configured. Also handles `-fast` variants: if
+/// `model` ends with `-fast` and the base model has an alias, returns
+/// `"{alias}-fast"`.
 pub(crate) fn resolve_model_name(model: &str) -> Cow<'_, str> {
🤖 Prompt for 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.

In `@rust/crates/ccusage/src/model_aliases.rs` around lines 14 - 26, Add a doc
comment to the resolve_model_name function describing its behavior: explain that
it looks up a model name in the model_aliases map and returns an owned alias
when present, and that it also treats names ending with "-fast" specially by
resolving the base model (e.g., "gpt-5-fast") and appending "-fast" to the
aliased base (so an alias for "gpt-5" will also apply to "gpt-5-fast"); mention
that it returns a borrowed model name when no alias is found and note the use of
Cow<'_, str> as the return type. Reference the resolve_model_name function (and
optionally model_aliases) in the comment so maintainers can find the related
code.
🤖 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 `@apps/ccusage/package.json`:
- Line 18: The docs still reference the removed entrypoint string "node
apps/ccusage/dist/cli.js"; search for that exact string in the profiling docs
and update each occurrence to "node apps/ccusage/src/cli.js" so it matches the
package.json bin entry ("ccusage": "./src/cli.js"); ensure all instances are
replaced (the commands and any examples) so the docs invoke the new entrypoint.

---

Nitpick comments:
In `@rust/crates/ccusage/src/model_aliases.rs`:
- Around line 14-26: Add a doc comment to the resolve_model_name function
describing its behavior: explain that it looks up a model name in the
model_aliases map and returns an owned alias when present, and that it also
treats names ending with "-fast" specially by resolving the base model (e.g.,
"gpt-5-fast") and appending "-fast" to the aliased base (so an alias for "gpt-5"
will also apply to "gpt-5-fast"); mention that it returns a borrowed model name
when no alias is found and note the use of Cow<'_, str> as the return type.
Reference the resolve_model_name function (and optionally model_aliases) in the
comment so maintainers can find the related code.
🪄 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: a70f2164-8b26-49bb-8562-5567e33fc8fa

📥 Commits

Reviewing files that changed from the base of the PR and between 5816e64 and bfc4f56.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • .github/workflows/ci.yaml
  • apps/ccusage/AGENTS.md
  • apps/ccusage/justfile
  • apps/ccusage/package.json
  • apps/ccusage/src/cli.js
  • apps/ccusage/src/cli.test.ts
  • apps/ccusage/tsdown.config.ts
  • justfile
  • pnpm-workspace.yaml
  • rust/crates/ccusage/src/adapter/claude/daily.rs
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/adapter/codex/mod.rs
  • rust/crates/ccusage/src/blocks.rs
  • rust/crates/ccusage/src/cost.rs
  • rust/crates/ccusage/src/main.rs
  • rust/crates/ccusage/src/model_aliases.rs
  • rust/crates/ccusage/src/pricing.rs
  • rust/crates/ccusage/src/summary.rs
💤 Files with no reviewable changes (2)
  • pnpm-workspace.yaml
  • apps/ccusage/tsdown.config.ts
🛑 Comments failed to post (1)
apps/ccusage/package.json (1)

18-18: ⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find references to the old dist/cli.js entry point

rg -n --type=md --type=sh 'apps/ccusage/dist/cli\.js' 
rg -n --type=md --type=sh 'ccusage/dist/cli\.js'

Repository: ccusage/ccusage

Length of output: 41


🏁 Script executed:

#!/bin/bash
# Find references to the old dist/cli.js entry point (all file types)
rg -n --hidden 'apps/ccusage/dist/cli\.js|ccusage/dist/cli\.js' .
# Check whether the old file exists in the repo
test -f apps/ccusage/dist/cli.js && echo "FOUND: apps/ccusage/dist/cli.js" || echo "NOT FOUND: apps/ccusage/dist/cli.js"

Repository: ccusage/ccusage

Length of output: 1051


Fix outdated profiling docs referencing the removed apps/ccusage/dist/cli.js entrypoint

.agents/skills/profile/references/typescript.md still invokes node apps/ccusage/dist/cli.js (e.g., lines 14, 26, 48-49, 59-60, 67). apps/ccusage/dist/cli.js does not exist in this repo, so update those commands to point at the new entry apps/ccusage/src/cli.js (matching apps/ccusage/package.json’s ./src/cli.js).

🤖 Prompt for 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.

In `@apps/ccusage/package.json` at line 18, The docs still reference the removed
entrypoint string "node apps/ccusage/dist/cli.js"; search for that exact string
in the profiling docs and update each occurrence to "node
apps/ccusage/src/cli.js" so it matches the package.json bin entry ("ccusage":
"./src/cli.js"); ensure all instances are replaced (the commands and any
examples) so the docs invoke the new entrypoint.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 0917422fa1a5
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 242.1ms 4.16 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 217.2ms 4.63 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 100.4ms 10.02 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 82.3ms 12.24 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 native ccusage binary 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 29.9ms 4.0ms 7.49x 54.00 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 30.7ms 2.4ms 12.99x 53.75 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.65 MiB/s
codex daily --offline --json 0.00 MiB 22.4ms 3.1ms 7.18x 53.75 MiB 8.19 MiB 0.15x 0.04 MiB/s 0.27 MiB/s
codex session --offline --json 0.00 MiB 22.0ms 2.1ms 10.42x 53.75 MiB 8.19 MiB 0.15x 0.04 MiB/s 0.41 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 274.9ms 255.0ms 1.08x 950.34 MiB 942.33 MiB 0.99x 3.66 GiB/s 3.95 GiB/s
codex --offline --json 1.01 GiB 102.1ms 81.8ms 1.25x 421.04 MiB 405.04 MiB 0.96x 9.86 GiB/s 12.31 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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: 0917422fa1a5
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 242.7ms 4.15 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 206.8ms 4.87 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 141.1ms 7.14 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 96.6ms 10.42 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 33.9ms 26.8ms 1.26x 53.50 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 29.6ms 28.1ms 1.05x 53.75 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 30.2ms 26.2ms 1.15x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 25.3ms 29.2ms 0.87x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 247.0ms 250.0ms 0.99x 942.33 MiB 898.32 MiB 0.95x 4.08 GiB/s 4.03 GiB/s
codex --offline --json 1.01 GiB 107.2ms 113.2ms 0.95x 427.05 MiB 427.03 MiB 1.00x 9.40 GiB/s 8.89 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3849.88 KiB +12.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 and others added 2 commits June 13, 2026 21:09
… allocation

- Resolve model aliases before building the Codex dedupe key so an event recorded
  under both the alias and canonical name dedupes to a single entry instead of
  passing the seen-set twice and double-counting.
- In summary aggregation, look up the breakdown index with the borrowed Cow and
  only call into_owned() on the insert path, avoiding a per-entry heap allocation
  when the model already exists.

Co-authored-by: Codesmith <[email protected]>
Previously an env value starting with '{' that failed JSON parsing returned an
empty map, silently clearing every configured alias. Try delimited parsing
instead so partial misconfiguration is recoverable.

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

@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 `@rust/crates/ccusage/src/model_aliases.rs`:
- Around line 12-25: The test-only global lock TEST_MODEL_ALIASES_LOCK doesn't
prevent concurrent readers, so make it an std::sync::RwLock<()> and use it to
block readers while tests override aliases: change TEST_MODEL_ALIASES_LOCK's
type to RwLock<()>, acquire a write lock inside
set_model_aliases_for_tests()/ModelAliasesGuard creation to hold exclusive
access while aliases are overridden, and acquire a read lock in
resolve_model_name() (held for the duration of the function) so readers are
blocked until the test guard is dropped; update ModelAliasesGuard to store the
write lock guard so dropping it releases the lock, and ensure
resolve_model_name() obtains the read guard before accessing MODEL_ALIASES and
before calling model_aliases().
🪄 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: e3bf15ec-9b40-4c3c-bc6b-8a8855bb625c

📥 Commits

Reviewing files that changed from the base of the PR and between bfc4f56 and 0917422.

📒 Files selected for processing (9)
  • rust/crates/ccusage/src/adapter/claude/daily.rs
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/adapter/codex/mod.rs
  • rust/crates/ccusage/src/blocks.rs
  • rust/crates/ccusage/src/cost.rs
  • rust/crates/ccusage/src/main.rs
  • rust/crates/ccusage/src/model_aliases.rs
  • rust/crates/ccusage/src/pricing.rs
  • rust/crates/ccusage/src/summary.rs
✅ Files skipped from review due to trivial changes (1)
  • rust/crates/ccusage/src/adapter/claude/daily.rs
🚧 Files skipped from review as they are similar to previous changes (6)
  • rust/crates/ccusage/src/main.rs
  • rust/crates/ccusage/src/blocks.rs
  • rust/crates/ccusage/src/cost.rs
  • rust/crates/ccusage/src/summary.rs
  • rust/crates/ccusage/src/adapter/codex/mod.rs
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs

Comment thread rust/crates/ccusage/src/model_aliases.rs
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 912dd3e6409b
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 247.4ms 4.07 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 219.0ms 4.60 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 106.7ms 9.44 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 92.0ms 10.94 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 27.0ms 24.7ms 1.09x 53.50 MiB 54.00 MiB 1.01x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 24.7ms 23.8ms 1.04x 53.50 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 24.5ms 22.3ms 1.10x 53.75 MiB 53.50 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
codex session --offline --json 0.00 MiB 22.4ms 24.2ms 0.93x 53.50 MiB 53.25 MiB 1.00x 0.04 MiB/s 0.04 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 266.9ms 250.6ms 1.07x 946.33 MiB 904.32 MiB 0.96x 3.77 GiB/s 4.02 GiB/s
codex --offline --json 1.01 GiB 103.7ms 99.9ms 1.04x 423.04 MiB 423.04 MiB 1.00x 9.71 GiB/s 10.07 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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: 912dd3e6409b
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 250.8ms 4.01 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 218.7ms 4.60 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 113.9ms 8.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 105.6ms 9.53 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 native ccusage binary 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 31.5ms 5.6ms 5.63x 53.75 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.28 MiB/s
claude session --offline --json 0.00 MiB 27.5ms 3.4ms 8.11x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.46 MiB/s
codex daily --offline --json 0.00 MiB 25.9ms 3.2ms 8.14x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.27 MiB/s
codex session --offline --json 0.00 MiB 27.7ms 3.4ms 8.15x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.25 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 251.5ms 221.7ms 1.13x 946.33 MiB 930.33 MiB 0.98x 4.00 GiB/s 4.54 GiB/s
codex --offline --json 1.01 GiB 111.5ms 87.5ms 1.27x 417.04 MiB 405.04 MiB 0.97x 9.03 GiB/s 11.51 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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.

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

1 issue found across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread rust/crates/ccusage/src/model_aliases.rs
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: bc43ece451d9
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 264.4ms 3.81 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 232.3ms 4.33 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 105.2ms 9.57 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 82.0ms 12.28 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 native ccusage binary 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 27.2ms 4.0ms 6.75x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 25.6ms 2.6ms 9.93x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.60 MiB/s
codex daily --offline --json 0.00 MiB 23.3ms 2.2ms 10.57x 53.75 MiB 8.19 MiB 0.15x 0.04 MiB/s 0.39 MiB/s
codex session --offline --json 0.00 MiB 24.8ms 2.1ms 12.05x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.42 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 257.5ms 243.4ms 1.06x 934.33 MiB 968.33 MiB 1.04x 3.91 GiB/s 4.14 GiB/s
codex --offline --json 1.01 GiB 104.6ms 83.2ms 1.26x 423.04 MiB 433.04 MiB 1.02x 9.62 GiB/s 12.10 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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: bc43ece451d9
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 231.7ms 4.34 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 208.7ms 4.82 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 145.9ms 6.90 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 98.7ms 10.20 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 30.6ms 27.6ms 1.11x 53.75 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 28.8ms 28.1ms 1.03x 54.00 MiB 53.50 MiB 0.99x 0.05 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 27.7ms 27.8ms 1.00x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.0ms 28.5ms 0.98x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 263.8ms 249.5ms 1.06x 940.33 MiB 942.34 MiB 1.00x 3.82 GiB/s 4.04 GiB/s
codex --offline --json 1.01 GiB 113.9ms 112.2ms 1.02x 399.04 MiB 425.04 MiB 1.07x 8.84 GiB/s 8.97 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
rust/crates/ccusage/src/model_aliases.rs (1)

41-55: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fallback delimited parsing still keeps wrapper braces in aliases.

On Line 41 fallback parsing runs on the raw {... text when JSON decode fails, so common malformed values can produce unusable keys (for example, {private-alpha), reducing real recoverability.

Suggested patch
 fn parse_model_aliases(raw: &str) -> BTreeMap<String, String> {
     let trimmed = raw.trim();
     if trimmed.starts_with('{')
         && let Ok(parsed) = serde_json::from_str::<BTreeMap<String, String>>(trimmed)
     {
         return parsed;
     }

-    trimmed
+    let delimited = if trimmed.starts_with('{') {
+        trimmed.trim_start_matches('{').trim_end_matches('}')
+    } else {
+        trimmed
+    };
+
+    delimited
         .split([',', ';', '\n'])
         .filter_map(|pair| {
             let (from, to) = pair.split_once('=')?;
             let from = from.trim();
             let to = to.trim();
             (!from.is_empty() && !to.is_empty()).then(|| (from.to_string(), to.to_string()))
         })
         .collect()
 }
-        assert_eq!(
-            aliases.get("{private-alpha").map(String::as_str),
-            Some("gpt-5.5")
-        );
+        assert_eq!(
+            aliases.get("private-alpha").map(String::as_str),
+            Some("gpt-5.5")
+        );
🤖 Prompt for 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.

In `@rust/crates/ccusage/src/model_aliases.rs` around lines 41 - 55, The fallback
delimited parser is run on the original trimmed string (which may still include
leading '{' or trailing '}') when JSON decoding fails; strip surrounding braces
before splitting so keys like "{private-alpha" aren't produced. Update the block
after the serde_json::from_str::<BTreeMap<String, String>>(trimmed) check to
create a cleaned string (e.g., use strip_prefix('{')/strip_suffix('}') or
trim_matches('{').trim_matches('}') carefully) from trimmed, then run the
split/filter_map/collect chain on that cleaned value instead of trimmed; keep
the existing split([',',';','\n']) and the pair.split_once('=') logic unchanged.
🤖 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.

Outside diff comments:
In `@rust/crates/ccusage/src/model_aliases.rs`:
- Around line 41-55: The fallback delimited parser is run on the original
trimmed string (which may still include leading '{' or trailing '}') when JSON
decoding fails; strip surrounding braces before splitting so keys like
"{private-alpha" aren't produced. Update the block after the
serde_json::from_str::<BTreeMap<String, String>>(trimmed) check to create a
cleaned string (e.g., use strip_prefix('{')/strip_suffix('}') or
trim_matches('{').trim_matches('}') carefully) from trimmed, then run the
split/filter_map/collect chain on that cleaned value instead of trimmed; keep
the existing split([',',';','\n']) and the pair.split_once('=') logic unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4712191-b75e-4ee4-b79f-e99541dd3c15

📥 Commits

Reviewing files that changed from the base of the PR and between 0917422 and bc43ece.

📒 Files selected for processing (3)
  • rust/crates/ccusage/src/adapter/codex/aggregate.rs
  • rust/crates/ccusage/src/model_aliases.rs
  • rust/crates/ccusage/src/summary.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • rust/crates/ccusage/src/summary.rs

…allback

rustfmt wants the multi-line call form for the now-longer add_deduped_event_to_groups
call. Also strip the outer { } before falling back to delimited parsing so a
malformed JSON value like {a=b} resolves to a sensible alias instead of leaving
braces embedded in the keys.

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

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

1 issue found across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread rust/crates/ccusage/src/model_aliases.rs Outdated
Use strip_prefix('{') + strip_suffix('}') so a malformed-JSON-shaped value loses
exactly one outer { } pair, instead of trim_*_matches eating every leading or
trailing brace. Aliases that legitimately start or end with { or } now survive
the delimited fallback unchanged.

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

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 7c25b209b817
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 249.4ms 4.04 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 222.3ms 4.53 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 107.7ms 9.35 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 82.4ms 12.22 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 27.2ms 25.1ms 1.08x 53.50 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 26.5ms 25.2ms 1.05x 53.75 MiB 54.00 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 23.5ms 24.0ms 0.98x 53.50 MiB 53.50 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
codex session --offline --json 0.00 MiB 23.3ms 25.4ms 0.92x 53.75 MiB 53.50 MiB 1.00x 0.04 MiB/s 0.03 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 271.2ms 248.8ms 1.09x 954.33 MiB 952.33 MiB 1.00x 3.71 GiB/s 4.05 GiB/s
codex --offline --json 1.01 GiB 105.6ms 111.5ms 0.95x 415.04 MiB 435.04 MiB 1.05x 9.53 GiB/s 9.03 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3854.19 KiB +16.31 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: 7c25b209b817
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 238.8ms 4.22 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 209.4ms 4.81 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 113.8ms 8.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 86.0ms 11.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 the published native ccusage binary 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 30.6ms 4.3ms 7.09x 54.25 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.36 MiB/s
claude session --offline --json 0.00 MiB 29.4ms 3.8ms 7.75x 53.75 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.41 MiB/s
codex daily --offline --json 0.00 MiB 25.4ms 2.8ms 9.21x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.31 MiB/s
codex session --offline --json 0.00 MiB 26.8ms 2.7ms 9.80x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.31 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 251.9ms 229.4ms 1.10x 948.34 MiB 952.33 MiB 1.00x 4.00 GiB/s 4.39 GiB/s
codex --offline --json 1.01 GiB 111.0ms 90.1ms 1.23x 407.04 MiB 431.05 MiB 1.06x 9.07 GiB/s 11.18 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3854.19 KiB +16.31 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: b068e4eb1818
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 254.9ms 3.95 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 220.1ms 4.57 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 103.6ms 9.72 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 79.4ms 12.68 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 native ccusage binary 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 27.5ms 4.2ms 6.58x 53.50 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.37 MiB/s
claude session --offline --json 0.00 MiB 25.8ms 3.5ms 7.41x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.44 MiB/s
codex daily --offline --json 0.00 MiB 24.8ms 2.1ms 11.81x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.41 MiB/s
codex session --offline --json 0.00 MiB 24.6ms 2.1ms 11.90x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.42 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 256.9ms 226.0ms 1.14x 952.34 MiB 920.33 MiB 0.97x 3.92 GiB/s 4.46 GiB/s
codex --offline --json 1.01 GiB 103.7ms 82.8ms 1.25x 419.04 MiB 421.04 MiB 1.00x 9.71 GiB/s 12.16 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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: b068e4eb1818
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 254.9ms 3.95 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 238.6ms 4.22 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 112.2ms 8.98 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 92.8ms 10.85 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 30.5ms 28.8ms 1.06x 53.50 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.9ms 28.8ms 1.08x 54.00 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 26.2ms 28.3ms 0.93x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 27.8ms 27.0ms 1.03x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 262.2ms 260.4ms 1.01x 952.34 MiB 946.34 MiB 0.99x 3.84 GiB/s 3.87 GiB/s
codex --offline --json 1.01 GiB 109.4ms 112.6ms 0.97x 419.05 MiB 387.03 MiB 0.92x 9.20 GiB/s 8.94 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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.

Normalize Codex model names before dedupe key generation so private slugs and their canonical aliases cannot double-count copied token events.

Fall back to delimited alias parsing when JSON-shaped env input is malformed, and avoid unnecessary summary aggregation allocation for existing model breakdowns.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
✅ 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.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 71846074e1d4
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 256.6ms 3.92 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 215.5ms 4.67 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 115.4ms 8.73 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 93.0ms 10.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 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 30.0ms 29.1ms 1.03x 53.75 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 27.4ms 27.7ms 0.99x 54.00 MiB 53.75 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 26.4ms 26.2ms 1.01x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 25.6ms 25.6ms 1.00x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 250.8ms 240.5ms 1.04x 950.34 MiB 928.33 MiB 0.98x 4.01 GiB/s 4.19 GiB/s
codex --offline --json 1.01 GiB 116.0ms 114.4ms 1.01x 413.04 MiB 407.04 MiB 0.99x 8.68 GiB/s 8.80 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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: 71846074e1d4
Base SHA: 5816e640e882

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

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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 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 330.4ms 3.05 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 273.8ms 3.68 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 115.8ms 8.69 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 80.7ms 12.47 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 native ccusage binary 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 25.3ms 3.6ms 7.02x 53.75 MiB 10.20 MiB 0.19x 0.06 MiB/s 0.43 MiB/s
claude session --offline --json 0.00 MiB 39.5ms 3.9ms 10.17x 53.75 MiB 10.21 MiB 0.19x 0.04 MiB/s 0.40 MiB/s
codex daily --offline --json 0.00 MiB 31.8ms 2.8ms 11.51x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.31 MiB/s
codex session --offline --json 0.00 MiB 30.5ms 3.0ms 10.25x 53.50 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.29 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, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary 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 297.4ms 300.0ms 0.99x 960.34 MiB 960.33 MiB 1.00x 3.39 GiB/s 3.36 GiB/s
codex --offline --json 1.01 GiB 117.3ms 99.3ms 1.18x 431.04 MiB 417.04 MiB 0.97x 8.58 GiB/s 10.14 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.08 KiB 18.08 KiB +0.00 KiB 1.00x
installed native package binary 3837.88 KiB 3850.00 KiB +12.12 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 43836bc into main Jun 13, 2026
32 checks passed
@ryoppippi
ryoppippi deleted the codex/add-model-alias-env branch June 13, 2026 22:12
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