Skip to content

feat(opencode): pre-filter messages by --since/--until in loader - #1220

Closed
pullfrog[bot] wants to merge 34 commits into
mainfrom
pullfrog/1189-opencode-since-until-filter
Closed

pullfrog[bot] wants to merge 34 commits into
mainfrom
pullfrog/1189-opencode-since-until-filter

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

Previously the opencode loader read all SQLite rows and JSON files regardless of --since/--until, relying solely on post-load filtering. On large installs this caused ccusage opencode --since X --until Y to hang.

This adds pre-filtering directly inside load_entries_from_database and read_message_file by extracting the time.created millis timestamp from the raw JSON string before full deserialization. Entries outside the date range are skipped early, avoiding expensive pricing lookup and parsing.

The existing filter_loaded_entries_by_date call in the adapter mod.rs is kept as a safety net.

Closes #1189

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏


Summary by cubic

Pre-filters opencode messages by --since/--until during load to skip out-of-range SQLite rows and storage/message/*.json before parsing, preventing hangs on large installs. The post-load filter stays as a safety net (closes #1189).

  • New Features

    • Pre-filters both SQLite rows and JSON files by extracting time.created (millis) from raw JSON and skipping entries outside the inclusive range with timezone-aware checks, avoiding full deserialization and pricing lookup.
    • Adds tests for SQLite and JSON inclusion/exclusion, bracketing, and exact boundary matches, plus a fixture-based JSON until exclusion test for symmetry.
  • Bug Fixes

    • Restores read_message_file to return Result<Option<LoadedEntry>> so IO errors propagate.
    • Scopes timestamp extraction to time.created under time to avoid false positives.
    • Removes a duplicate test after merge conflict resolution.

Written for commit 14e4072. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Improvements

    • Enhanced OpenCode message loading with date range filtering, enabling retrieval of messages within specific time boundaries from both database and file sources.
  • Chores

    • Updated CI/CD workflow configuration.

Previously the opencode loader read all SQLite rows and JSON files
regardless of --since/--until, relying solely on post-load filtering.
On large installs this caused the command to hang.

Pre-filter both the SQLite row loop and JSON file loop by extracting
the timestamp from the raw JSON before full deserialization, skipping
entries outside the date range early.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 6, 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 14e4072 Commit Preview URL

Branch Preview URL
Jun 06 2026, 02:59 PM

@ryoppippi

Copy link
Copy Markdown
Member

@pullfrog conflicts

@pullfrog

pullfrog Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Resolved merge conflicts in .github/workflows/pullfrog.yml — merged origin/main into the PR branch. The conflict was pinned action hashes (origin/main had @sha pins with version comments) vs @v refs with # zizmor: ignore[unpinned-uses] annotations on the PR branch. Kept the pinned hash pattern from origin/main for both actions/checkout and pullfrog/pullfrog.

Task list (4/4 completed)
  • Checkout PR branch and fetch base
  • Attempt merge with base branch
  • Resolve merge conflicts if any
  • Finalize: commit, push, report

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@ryoppippi

Copy link
Copy Markdown
Member

@coderabbitai review it

@coderabbitai

coderabbitai Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the PR diff
gh pr view 1220 --repo ryoppippi/ccusage --json title,body,files,additions,deletions

# Get the diff
gh pr diff 1220 --repo ryoppippi/ccusage

Length of output: 13889


🏁 Script executed:

#!/bin/bash
# Check MSRV in Cargo.toml files
fd 'Cargo.toml' --exec grep -H 'rust-version\|edition\|msrv' {}

# Check if there are other "created" fields in the opencode message schema/fixtures
rg '"created"' rust/crates/ccusage/src/adapter/opencode/ -n

# Check how the existing error handling was done for read_message_file callers
rg 'read_message_file' rust/ -n -A3 -B3

# Check format_date_tz signature and return format
rg 'fn format_date_tz' rust/ -n -A5

# Check TimestampMs
rg 'fn from_millis\|TimestampMs' rust/ -n -A3 -B1

# Check if is_none_or is stabilized in the rust version used
rg 'channel\|toolchain\|rust-version' rust-toolchain.toml rust-toolchain 2>/dev/null || true
cat rust-toolchain.toml 2>/dev/null || cat rust-toolchain 2>/dev/null || echo "no toolchain file found"

Length of output: 6477



@ryoppippi Great PR — the pre-filtering approach is a solid fix for the hang on large installs. Here's my review:


rust/crates/ccusage/src/adapter/opencode/loader.rs

🟡 Medium — read_message_file silently swallows I/O errors

Changing the return type from Result<Option<LoadedEntry>> to Option<LoadedEntry> means fs::read_to_string(path).ok()? silently drops file-read errors (permissions, deleted files mid-scan, etc.). Previously these would propagate to the caller. This regresses error visibility and makes debugging harder.

// Before: errors propagated
fn read_message_file(...) -> Result<Option<LoadedEntry>> {
    let content = fs::read_to_string(path)?;  // ? propagates the error

// After: errors silently swallowed
fn read_message_file(...) -> Option<LoadedEntry> {
    let content = std::fs::read_to_string(path).ok()?;  // IO errors become None

Consider keeping Result<Option<LoadedEntry>> and only converting serde_json/parse failures to None, while still propagating IO errors:

fn read_message_file(
    path: &Path,
    tz: Option<&JiffTimeZone>,
    mode: CostMode,
    pricing: Option<&PricingMap>,
    shared: &SharedArgs,
) -> Result<Option<LoadedEntry>> {
    let content = fs::read_to_string(path)?;  // still propagates IO errors
    if let Some(millis) = extract_message_timestamp(&content) {
        if !timestamp_within_range(millis, tz, shared) {
            return Ok(None);
        }
    }
    let Ok(value) = serde_json::from_str::<Value>(&content) else {
        return Ok(None);
    };
    Ok(message_value_to_entry(&value, None, None, tz, mode, pricing))
}

🟡 Medium — extract_message_timestamp could match "created": inside AI response text

The function uses a naive substring search:

fn extract_message_timestamp(data: &str) -> Option<i64> {
    let start = data.find("\"created\":")?;  // matches ANY "created": in the raw string
    ...
}

Real opencode messages likely carry content/parts fields containing AI-generated text. If that text includes the literal string "created": followed by digits (e.g., a code snippet, a JSON example in the AI's answer), this would return a wrong timestamp and incorrectly filter out the entry. Because the code is fail-open (returning None only skips, not crashes), the worst-case is a false exclusion of a valid entry.

A more targeted search anchored to the time context would be more robust:

fn extract_message_timestamp(data: &str) -> Option<i64> {
    // Look for "time":{"created": or "time": { "created": to stay within the time object
    let time_start = data.find("\"time\":")?;
    let after_time = &data[time_start..];
    let start = after_time.find("\"created\":")?;
    let after_key = after_time[start + "\"created\":".len()..].trim_start();
    let end = after_key.find(|c: char| !c.is_ascii_digit())?;
    after_key[..end].parse::<i64>().ok()
}

This won't guarantee JSON-correct parsing but is much less likely to match in the wrong context.


🟢 Low — Missing filters_json_file_entries_by_until test

There are symmetrical tests for the SQLite path (filters_sqlite_entries_by_since + filters_sqlite_entries_by_until) but the JSON file path only has filters_json_file_entries_by_since — the until counterpart is missing.


✅ Positives

  • Fail-open design is correct: if extract_message_timestamp returns None, the entry is not skipped — only positively identified out-of-range entries are dropped. This is the right approach.
  • is_none_or is fine — Rust 1.85.1 is pinned in rust-toolchain.toml and is_none_or was stabilized in 1.82.
  • timestamp_within_range lexicographic comparison on YYYYMMDD strings is correct.
  • Boundary tests (includes_entries_when_since_exact_match, includes_entries_when_until_exact_match) are a nice touch.
  • Keeping the post-load filter_loaded_entries_by_date as a safety net is the right call.

🧠 Learnings used
Learnt from: ryoppippi
Repo: ryoppippi/ccusage PR: 0
File: :0-0
Timestamp: 2026-05-22T14:48:37.050Z
Learning: In `ryoppippi/ccusage`, session timestamps in `rust/crates/ccusage/src/codex_loader.rs` use a dedicated `codex_session_timestamp` helper (introduced in commit 9b83895) that fast-paths string timestamps (returned trimmed as-is, no normalization overhead) and only delegates numeric timestamps to `normalize_codex_timestamp`. This was added to avoid the normalization cost on the common string-timestamp case in the hot session parsing path.

Learnt from: ryoppippi
Repo: ryoppippi/ccusage PR: 0
File: :0-0
Timestamp: 2026-05-22T17:26:33.070Z
Learning: In `ryoppippi/ccusage`, `load_groups_from_directory` in `rust/crates/ccusage/src/adapter/codex.rs` no longer has a worker-local parallel aggregation path. As of commit 695a46e, the parallel branch always uses `create_dedupe_shards()` + `aggregate_files_parallel` (global dedupe in one pass). The previous `aggregate_files_parallel_local` function (with its cross-chunk reread fallback) was removed entirely.
✅ 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.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR addresses the hang in ccusage opencode by implementing --since/--until date-range filtering for both SQLite and JSON message loading. A GitHub Actions workflow receives minor updates for security linting and environment variable formatting.

Changes

Workflow maintenance

Layer / File(s) Summary
Action pins and environment variable formatting
.github/workflows/pullfrog.yml
Zizmor ignore comments suppress unpinned-uses warnings on checkout and Pullfrog actions; GOOGLE_GENERATIVE_AI_API_KEY is reformatted from multiline to single-line YAML expression.

OpenCode date-range filtering

Layer / File(s) Summary
Timestamp filtering foundation
rust/crates/ccusage/src/adapter/opencode/loader.rs
Import TimestampMs and Result types; add helpers to extract the created timestamp from JSON strings and to evaluate whether a millisecond value falls within inclusive since/until bounds in a given timezone.
SQLite row filtering
rust/crates/ccusage/src/adapter/opencode/loader.rs
SQLite loader extracts the created millisecond timestamp from stored JSON strings and skips rows whose derived local date falls outside the since/until window.
JSON file loader update
rust/crates/ccusage/src/adapter/opencode/loader.rs
read_message_file now accepts shared parameter, filters by timestamp range before JSON deserialization, and returns Option to handle read failures or out-of-range entries; call site updated to work with Option-based return.
Filtering test coverage
rust/crates/ccusage/src/adapter/opencode/loader.rs
New unit tests verify SQLite and JSON filtering for excluded-after-since, excluded-before-until, and included bracket/exact-match scenarios.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 A hop through workflows, then timestamps so neat,
Filtering messages by date—no more hanging feet!
SQLite and JSON both know the range true,
From --since to --until, the loader works through! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive The changes include a minor GitHub Actions workflow update (Pullfrog check configuration) unrelated to the core functionality fix; all other changes are in-scope for the OpenCode loader pre-filtering feature. Consider whether the .github/workflows/pullfrog.yml changes are necessary or should be addressed in a separate PR to maintain focused scope.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: pre-filtering OpenCode messages by --since/--until in the loader module, which directly addresses the performance issue.
Linked Issues check ✅ Passed The PR implements pre-filtering in both SQLite and JSON loaders by extracting timestamps before full deserialization, directly addressing issue #1189's requirement to filter by --since/--until.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 pullfrog/1189-opencode-since-until-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 3

🧹 Nitpick comments (1)
rust/crates/ccusage/src/adapter/opencode/loader.rs (1)

397-474: ⚡ Quick win

Add a JSON until exclusion fixture test for symmetry.

You cover JSON since exclusion and until exact-match inclusion, but not the JSON path where until should exclude entries. Add that fixture-backed case to lock regression coverage for this PR’s core behavior.
As per coding guidelines: “Add Rust fixture-backed tests for path discovery, parser behavior, aggregation totals, and important legacy compatibility.”

Suggested test
+    #[test]
+    fn filters_json_file_entries_by_until() {
+        let fixture = fs_fixture!({
+            "storage/message/message.json": r#"{"id":"msg-1","sessionID":"session-a","providerID":"anthropic","modelID":"claude-sonnet-4-20250514","time":{"created":1767312000000},"tokens":{"input":100,"output":50},"cost":0.02}"#,
+        });
+
+        let shared = SharedArgs {
+            mode: CostMode::Display,
+            timezone: Some("UTC".to_string()),
+            until: Some("20260101".to_string()),
+            ..SharedArgs::default()
+        };
+        let entries = load_entries_from_directory(fixture.root(), &shared).unwrap();
+        assert!(
+            entries.is_empty(),
+            "message on 2026-01-02 should be excluded by until=20260101"
+        );
+    }
🤖 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/adapter/opencode/loader.rs` around lines 397 - 474,
Add a fixture-backed test named something like
filters_json_file_entries_by_until that mirrors
filters_json_file_entries_by_since but asserts exclusion via the until boundary:
create the same fs_fixture JSON under "storage/message/message.json", build
SharedArgs with mode = CostMode::Display, timezone = Some("UTC".to_string()),
and until = Some("20260101".to_string()) (no since), call
load_entries_from_directory(...) and assert entries.is_empty with a clear
message that the 2026-01-02 message should be excluded by until=20260101;
reference SharedArgs, load_entries_from_directory, and the existing JSON fixture
for locating where to add the test.

Source: Coding guidelines

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

Inline comments:
In @.github/workflows/pullfrog.yml:
- Line 25: The workflow currently uses mutable tags (actions/checkout@v6 and the
other tag at the second occurrence) and silences the unpinned-uses lint; replace
each tag-pinned action reference (e.g., actions/checkout@v6 and the action at
the other occurrence) with the corresponding full-length commit SHA for that
release, remove the "# zizmor: ignore[unpinned-uses]" suppression, and keep the
lint warning enabled so CI uses immutable SHAs going forward.

In `@rust/crates/ccusage/src/adapter/opencode/loader.rs`:
- Around line 204-208: The timestamp extraction in extract_message_timestamp
currently finds the first "\"created\":" anywhere in the JSON; change it to
first locate the "\"time\"" object and then search for "\"created\":" within
that object so you read time.created rather than any created key. Specifically,
in extract_message_timestamp locate the index of "\"time\"" (or "\"time\":")
then slice after that object start and only then find "\"created\":" and parse
the subsequent digits into i64, preserving the Option return behavior and
failing gracefully if either the time object or its created field is missing.
- Around line 74-76: The call site around read_message_file currently treats
IO/read errors as None which hides IO failures; change the API and handling so
read_message_file returns Result<Option<T>, E> (preserving IO errors) and update
the call in loader.rs (the if let Some(entry) = read_message_file(&file,
tz.as_ref(), shared.mode, pricing.as_ref(), shared) block) to match on Err ->
propagate/log the IO error and Ok(Some) -> process entry and Ok(None) -> treat
as filtered/skip; adjust other usages similarly (lines ~181-198) to preserve and
surface IO errors instead of converting them to None. Ensure the unique symbol
read_message_file, its return type, and the loader.rs match/if-let sites are
updated to handle Result<Option<_>, _>.

---

Nitpick comments:
In `@rust/crates/ccusage/src/adapter/opencode/loader.rs`:
- Around line 397-474: Add a fixture-backed test named something like
filters_json_file_entries_by_until that mirrors
filters_json_file_entries_by_since but asserts exclusion via the until boundary:
create the same fs_fixture JSON under "storage/message/message.json", build
SharedArgs with mode = CostMode::Display, timezone = Some("UTC".to_string()),
and until = Some("20260101".to_string()) (no since), call
load_entries_from_directory(...) and assert entries.is_empty with a clear
message that the 2026-01-02 message should be excluded by until=20260101;
reference SharedArgs, load_entries_from_directory, and the existing JSON fixture
for locating where to add the test.
🪄 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

Run ID: ec09bc89-8ac5-4ee1-b3f0-41f533a4b008

📥 Commits

Reviewing files that changed from the base of the PR and between bee4a26 and 70fb34e.

📒 Files selected for processing (2)
  • .github/workflows/pullfrog.yml
  • rust/crates/ccusage/src/adapter/opencode/loader.rs

Comment thread .github/workflows/pullfrog.yml Outdated
Comment thread rust/crates/ccusage/src/adapter/opencode/loader.rs
Comment thread rust/crates/ccusage/src/adapter/opencode/loader.rs
@pullfrog

pullfrog Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed all 3 review threads:

  1. pullfrog.yml SHA pinning — false positive; file is not in the PR diff and already uses full-length commit SHAs. Replied with explanation.
  2. read_message_file return type — restored Result<Option<LoadedEntry>> with ? error propagation at the call site so IO failures surface as Err instead of being silently converted to None.
  3. extract_message_timestamp scoping — anchored extraction to "time" before searching for "created":, so it reads time.created instead of matching any "created" key.

All 10 loader tests pass. Commit pushed as b4c17ae.

Task list (8/8 completed)
  • Checkout PR branch via pullfrog_checkout_pr
  • Fetch review comments via pullfrog_get_review_comments
  • Thread 1: pullfrog.yml - verify not in PR diff, reply and resolve
  • Thread 2: read_message_file return type change (Result -> Option)
  • Thread 3: scope extract_message_timestamp to time.created
  • Quality check: test, review diff, ensure cleanliness
  • Commit changes
  • Push, reply to threads, resolve threads

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

- Restore read_message_file to return Result<Option<LoadedEntry>> so IO
  errors are propagated instead of silently converted to None.
- Scope extract_message_timestamp to time.created by finding the
  "time" key first before searching for "created": to avoid false
  positives from other created keys in the JSON.
@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

ccusage

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

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

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-arm64

npx https://pkg.pr.new/@ccusage/ccusage-win32-arm64@1220

@ccusage/ccusage-win32-x64

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

commit: 216bd98

@pullfrog

pullfrog Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor Author

The check suite failure (ID 72694261781) was on the older commit 16f1db65. The current tip 14e4072 passes all checks:

  • All 212 Rust tests pass (including 19 opencode loader tests)
  • clippy passes with no warnings
  • rustfmt passes with no formatting needed

The original CI failure was likely from an intermediate commit and has been fixed by subsequent commits (b4c17ae restored Result<Option<>> return type and scoped extract_message_timestamp, 14e4072 removed a duplicate test from merge). Pushed to retrigger CI on the current branch tip.

Task list (5/5 completed)

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog

pullfrog Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

The 3 inline review threads were resolved by previous commits (b4c17ae restored Result<Option<>> for IO error propagation and scoped extract_message_timestamp to "time" → "created"; CI workflow pins were fixed during merge conflict resolution).

Added the missing filters_json_file_entries_by_until test for symmetry with the existing JSON since exclusion test. All 11 loader tests pass.

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 2274d563e201
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 684.8ms 522.6ms 29.8ms 3
PR pkg.pr.new 2274d56 734.7ms 557.5ms 31.1ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 541.9ms 549.1ms 0.99x 327.70 MiB 315.70 MiB 0.96x 1.86 GiB/s 1.83 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 362.3ms 363.8ms 1.00x 81.45 MiB 79.45 MiB 0.98x 2.78 GiB/s 2.77 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 533.6ms 1.89 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 513.0ms 1.96 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 358.9ms 2.81 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 340.0ms 2.96 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 28.0ms 28.7ms 0.98x 43.61 MiB 43.48 MiB 1.00x 0.06 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 28.2ms 28.3ms 1.00x 43.61 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 27.8ms 27.8ms 1.00x 43.61 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.3ms 27.6ms 1.02x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 529.7ms 529.6ms 1.00x 320.58 MiB 316.33 MiB 0.99x 1.90 GiB/s 1.90 GiB/s
codex --offline --json 1.01 GiB 355.7ms 352.1ms 1.01x 69.70 MiB 71.83 MiB 1.03x 2.83 GiB/s 2.86 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 16f1db652722
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 493.9ms 569.9ms 30.0ms 3
PR pkg.pr.new 16f1db6 579.2ms 736.7ms 32.4ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 550.4ms 565.0ms 0.97x 297.70 MiB 332.70 MiB 1.12x 1.83 GiB/s 1.78 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 360.8ms 363.6ms 0.99x 81.58 MiB 69.58 MiB 0.85x 2.79 GiB/s 2.77 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 536.2ms 1.88 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 520.8ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 361.6ms 2.78 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 336.0ms 3.00 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 29.3ms 29.0ms 1.01x 43.61 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 29.7ms 29.3ms 1.01x 43.73 MiB 43.73 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 28.5ms 27.9ms 1.02x 43.61 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 27.7ms 27.9ms 0.99x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 595.7ms 532.8ms 1.12x 320.95 MiB 293.83 MiB 0.92x 1.69 GiB/s 1.89 GiB/s
codex --offline --json 1.01 GiB 359.1ms 354.2ms 1.01x 79.33 MiB 82.70 MiB 1.04x 2.80 GiB/s 2.84 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 16f1db652722
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 655.5ms 698.6ms 31.9ms 3
PR pkg.pr.new 16f1db6 573.5ms 891.6ms 32.3ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 541.7ms 534.2ms 1.01x 323.95 MiB 319.58 MiB 0.99x 1.86 GiB/s 1.88 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 365.1ms 367.8ms 0.99x 72.33 MiB 68.45 MiB 0.95x 2.76 GiB/s 2.74 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 537.0ms 1.87 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 511.1ms 1.97 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 364.5ms 2.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 344.4ms 2.92 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.9ms 3.9ms 7.64x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 29.7ms 4.0ms 7.42x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
codex daily --offline --json 0.00 MiB 29.4ms 3.6ms 8.07x - 2.83 MiB - 0.03 MiB/s 0.24 MiB/s
codex session --offline --json 0.00 MiB 29.3ms 3.6ms 8.04x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.24 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 548.8ms 511.3ms 1.07x 306.83 MiB 295.20 MiB 0.96x 1.83 GiB/s 1.97 GiB/s
codex --offline --json 1.01 GiB 364.1ms 332.3ms 1.10x 81.70 MiB 69.70 MiB 0.85x 2.76 GiB/s 3.03 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f5de8e07e95f
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 489.6ms 603.4ms 31.1ms 3
PR pkg.pr.new f5de8e0 642.1ms 590.7ms 31.2ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 546.4ms 536.8ms 1.02x 292.70 MiB 305.58 MiB 1.04x 1.84 GiB/s 1.88 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 366.9ms 367.7ms 1.00x 77.20 MiB 73.70 MiB 0.95x 2.74 GiB/s 2.74 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 534.2ms 1.88 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 511.7ms 1.97 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 378.5ms 2.66 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 330.5ms 3.05 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 28.9ms 28.3ms 1.02x 43.61 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 27.9ms 28.2ms 0.99x 43.48 MiB 43.73 MiB 1.01x 0.06 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 27.6ms 27.7ms 1.00x 43.61 MiB 43.48 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.6ms 28.1ms 1.02x 43.61 MiB 43.61 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 553.2ms 530.5ms 1.04x 331.95 MiB 331.08 MiB 1.00x 1.82 GiB/s 1.90 GiB/s
codex --offline --json 1.01 GiB 365.4ms 361.9ms 1.01x 78.70 MiB 77.20 MiB 0.98x 2.76 GiB/s 2.78 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f5de8e07e95f
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 528.6ms 405.6ms 32.8ms 3
PR pkg.pr.new f5de8e0 446.0ms 515.2ms 31.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 558.5ms 572.9ms 0.97x 305.20 MiB 325.20 MiB 1.07x 1.80 GiB/s 1.76 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 374.0ms 373.1ms 1.00x 82.83 MiB 73.70 MiB 0.89x 2.69 GiB/s 2.70 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 554.9ms 1.81 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 522.5ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 370.9ms 2.71 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 339.0ms 2.97 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.1ms 4.1ms 7.27x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.37 MiB/s
claude session --offline --json 0.00 MiB 30.2ms 4.1ms 7.37x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
codex daily --offline --json 0.00 MiB 29.9ms 3.8ms 7.79x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.22 MiB/s
codex session --offline --json 0.00 MiB 29.8ms 3.8ms 7.78x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.22 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 548.8ms 517.2ms 1.06x 294.95 MiB 296.45 MiB 1.01x 1.83 GiB/s 1.95 GiB/s
codex --offline --json 1.01 GiB 367.4ms 339.2ms 1.08x 78.58 MiB 76.70 MiB 0.98x 2.74 GiB/s 2.97 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: e1c60cff0228
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 787.5ms 695.8ms 31.3ms 3
PR pkg.pr.new e1c60cf 609.4ms 759.7ms 30.5ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 554.7ms 551.5ms 1.01x 299.95 MiB 320.08 MiB 1.07x 1.81 GiB/s 1.83 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 369.8ms 360.5ms 1.03x 67.95 MiB 76.83 MiB 1.13x 2.72 GiB/s 2.79 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 532.1ms 1.89 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 495.7ms 2.03 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 363.6ms 2.77 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 335.8ms 3.00 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.3ms 3.8ms 7.66x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
claude session --offline --json 0.00 MiB 29.3ms 3.8ms 7.66x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
codex daily --offline --json 0.00 MiB 29.2ms 3.7ms 7.90x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 28.9ms 3.6ms 8.10x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.24 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 538.0ms 505.6ms 1.06x 295.58 MiB 326.45 MiB 1.10x 1.87 GiB/s 1.99 GiB/s
codex --offline --json 1.01 GiB 363.8ms 331.0ms 1.10x 74.95 MiB 78.83 MiB 1.05x 2.77 GiB/s 3.04 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: a6ab8d464872
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 675.6ms 484.8ms 34.0ms 3
PR pkg.pr.new a6ab8d4 569.9ms 529.9ms 32.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 570.4ms 547.8ms 1.04x 300.95 MiB 306.70 MiB 1.02x 1.77 GiB/s 1.84 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 374.3ms 369.1ms 1.01x 78.95 MiB 81.70 MiB 1.03x 2.69 GiB/s 2.73 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 560.7ms 1.80 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 523.9ms 1.92 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 369.4ms 2.73 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 395.8ms 2.54 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.7ms 4.1ms 7.32x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 30.2ms 4.1ms 7.44x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
codex daily --offline --json 0.00 MiB 30.0ms 3.8ms 7.98x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 29.6ms 3.8ms 7.79x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 558.5ms 517.9ms 1.08x 309.70 MiB 306.70 MiB 0.99x 1.80 GiB/s 1.94 GiB/s
codex --offline --json 1.01 GiB 365.6ms 343.7ms 1.06x 76.58 MiB 78.70 MiB 1.03x 2.75 GiB/s 2.93 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 803a08d7bd4c
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 501.4ms 498.3ms 30.1ms 3
PR pkg.pr.new 803a08d 638.1ms 645.1ms 30.0ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 549.5ms 535.8ms 1.03x 305.83 MiB 301.45 MiB 0.99x 1.83 GiB/s 1.88 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 364.3ms 363.5ms 1.00x 77.58 MiB 79.70 MiB 1.03x 2.76 GiB/s 2.77 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 531.2ms 1.90 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 504.7ms 1.99 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 366.1ms 2.75 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 339.1ms 2.97 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 28.5ms 3.9ms 7.33x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
claude session --offline --json 0.00 MiB 28.3ms 3.8ms 7.40x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
codex daily --offline --json 0.00 MiB 28.5ms 3.6ms 7.83x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.24 MiB/s
codex session --offline --json 0.00 MiB 28.3ms 3.5ms 8.05x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.24 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 545.3ms 513.2ms 1.06x 318.58 MiB 296.70 MiB 0.93x 1.85 GiB/s 1.96 GiB/s
codex --offline --json 1.01 GiB 361.8ms 331.4ms 1.09x 79.58 MiB 73.83 MiB 0.93x 2.78 GiB/s 3.04 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1a4c24f265c2
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 380.3ms 389.2ms 32.0ms 3
PR pkg.pr.new 1a4c24f 454.8ms 445.0ms 31.6ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 552.1ms 565.6ms 0.98x 322.33 MiB 302.70 MiB 0.94x 1.82 GiB/s 1.78 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 372.8ms 369.0ms 1.01x 81.70 MiB 73.70 MiB 0.90x 2.70 GiB/s 2.73 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 546.2ms 1.84 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 514.2ms 1.96 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 369.1ms 2.73 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 338.7ms 2.97 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 29.3ms 29.1ms 1.01x 43.61 MiB 43.73 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 29.6ms 29.4ms 1.01x 43.61 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.0ms 29.0ms 1.00x 43.61 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.8ms 29.2ms 0.99x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 543.4ms 543.8ms 1.00x 318.95 MiB 277.20 MiB 0.87x 1.85 GiB/s 1.85 GiB/s
codex --offline --json 1.01 GiB 383.4ms 361.4ms 1.06x 79.20 MiB 74.08 MiB 0.94x 2.63 GiB/s 2.79 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: a6ab8d464872
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 481.7ms 652.6ms 32.1ms 3
PR pkg.pr.new a6ab8d4 542.3ms 529.3ms 33.2ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 571.5ms 559.5ms 1.02x 289.58 MiB 299.58 MiB 1.03x 1.76 GiB/s 1.80 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 380.1ms 372.0ms 1.02x 80.83 MiB 80.45 MiB 1.00x 2.65 GiB/s 2.71 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 560.3ms 1.80 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 537.7ms 1.87 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 373.0ms 2.70 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 343.6ms 2.93 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.1ms 30.2ms 1.00x 43.48 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.5ms 30.4ms 1.00x 43.48 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 30.2ms 29.5ms 1.02x 43.73 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 29.9ms 30.1ms 0.99x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 555.7ms 548.7ms 1.01x 286.70 MiB 309.58 MiB 1.08x 1.81 GiB/s 1.83 GiB/s
codex --offline --json 1.01 GiB 373.0ms 365.7ms 1.02x 79.58 MiB 81.08 MiB 1.02x 2.70 GiB/s 2.75 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 803a08d7bd4c
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 644.5ms 786.4ms 31.7ms 3
PR pkg.pr.new 803a08d 786.5ms 873.4ms 31.5ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 546.2ms 541.9ms 1.01x 308.20 MiB 319.45 MiB 1.04x 1.84 GiB/s 1.86 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 366.0ms 356.3ms 1.03x 79.45 MiB 79.45 MiB 1.00x 2.75 GiB/s 2.83 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 541.7ms 1.86 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 522.1ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 362.2ms 2.78 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 336.1ms 3.00 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 28.4ms 28.5ms 1.00x 43.73 MiB 43.48 MiB 0.99x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 28.4ms 28.0ms 1.01x 43.73 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 29.2ms 28.0ms 1.04x 43.73 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.1ms 29.0ms 0.97x 43.48 MiB 43.61 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 532.1ms 538.1ms 0.99x 328.08 MiB 317.08 MiB 0.97x 1.89 GiB/s 1.87 GiB/s
codex --offline --json 1.01 GiB 377.6ms 363.5ms 1.04x 83.08 MiB 77.20 MiB 0.93x 2.67 GiB/s 2.77 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 87ad1d306c76
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 636.5ms 1.809s 31.1ms 3
PR pkg.pr.new 87ad1d3 725.3ms 670.6ms 32.5ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 557.2ms 541.5ms 1.03x 311.83 MiB 285.08 MiB 0.91x 1.81 GiB/s 1.86 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 365.8ms 364.7ms 1.00x 79.45 MiB 79.70 MiB 1.00x 2.75 GiB/s 2.76 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 550.9ms 1.83 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 505.5ms 1.99 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 363.5ms 2.77 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 335.5ms 3.00 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 29.0ms 28.8ms 1.00x 43.73 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 29.3ms 29.8ms 0.98x 43.61 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.2ms 28.5ms 1.03x 43.48 MiB - - 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 29.0ms 29.2ms 0.99x 43.48 MiB 43.61 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 541.7ms 537.9ms 1.01x 314.33 MiB 315.95 MiB 1.01x 1.86 GiB/s 1.87 GiB/s
codex --offline --json 1.01 GiB 367.4ms 357.4ms 1.03x 80.83 MiB 79.33 MiB 0.98x 2.74 GiB/s 2.82 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 5118c6dad8c2
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 569.6ms 574.5ms 31.1ms 3
PR pkg.pr.new 5118c6d 627.3ms 583.7ms 30.9ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 573.9ms 552.7ms 1.04x 311.33 MiB 303.45 MiB 0.97x 1.75 GiB/s 1.82 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 365.8ms 365.2ms 1.00x 81.70 MiB 76.95 MiB 0.94x 2.75 GiB/s 2.76 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 535.5ms 1.88 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 508.9ms 1.98 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 361.4ms 2.79 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 336.2ms 2.99 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 31.3ms 4.4ms 7.19x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.35 MiB/s
claude session --offline --json 0.00 MiB 31.5ms 4.4ms 7.08x - 2.70 MiB - 0.05 MiB/s 0.35 MiB/s
codex daily --offline --json 0.00 MiB 31.1ms 4.0ms 7.71x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.21 MiB/s
codex session --offline --json 0.00 MiB 31.3ms 4.1ms 7.64x 43.73 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.21 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 573.6ms 540.6ms 1.06x - 298.95 MiB - 1.76 GiB/s 1.86 GiB/s
codex --offline --json 1.01 GiB 370.1ms 338.8ms 1.09x 76.83 MiB 78.45 MiB 1.02x 2.72 GiB/s 2.97 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 87ad1d306c76
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 349.5ms 548.0ms 30.8ms 3
PR pkg.pr.new 87ad1d3 382.7ms 659.5ms 31.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 569.4ms 550.8ms 1.03x 295.45 MiB 307.58 MiB 1.04x 1.77 GiB/s 1.83 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 373.1ms 372.2ms 1.00x 76.95 MiB 81.45 MiB 1.06x 2.70 GiB/s 2.70 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 574.3ms 1.75 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 519.8ms 1.94 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 364.4ms 2.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 340.3ms 2.96 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.9ms 3.9ms 7.64x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 30.0ms 3.9ms 7.66x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
codex daily --offline --json 0.00 MiB 29.1ms 3.8ms 7.73x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 28.9ms 3.6ms 8.00x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.24 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 555.1ms 519.5ms 1.07x 326.70 MiB 312.45 MiB 0.96x 1.81 GiB/s 1.94 GiB/s
codex --offline --json 1.01 GiB 366.7ms 333.9ms 1.10x 69.83 MiB 78.58 MiB 1.13x 2.75 GiB/s 3.02 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 5118c6dad8c2
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 575.3ms 546.5ms 30.1ms 3
PR pkg.pr.new 5118c6d 550.4ms 572.6ms 29.7ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 536.1ms 543.7ms 0.99x 322.70 MiB 329.95 MiB 1.02x 1.88 GiB/s 1.85 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 368.1ms 365.8ms 1.01x 81.70 MiB 79.33 MiB 0.97x 2.73 GiB/s 2.75 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 533.0ms 1.89 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 493.9ms 2.04 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 355.0ms 2.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 341.4ms 2.95 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 28.0ms 27.8ms 1.01x 43.73 MiB 43.61 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 28.1ms 28.2ms 0.99x 43.48 MiB 43.48 MiB 1.00x 0.06 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 28.0ms 27.9ms 1.00x 43.61 MiB 43.48 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 27.6ms 27.6ms 1.00x 43.48 MiB 43.61 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 533.1ms 524.9ms 1.02x 301.83 MiB 307.58 MiB 1.02x 1.89 GiB/s 1.92 GiB/s
codex --offline --json 1.01 GiB 358.1ms 358.2ms 1.00x 80.83 MiB 79.45 MiB 0.98x 2.81 GiB/s 2.81 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1a4c24f265c2
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 467.2ms 529.8ms 31.9ms 3
PR pkg.pr.new 1a4c24f 519.4ms 577.8ms 31.9ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 585.8ms 551.7ms 1.06x 326.95 MiB 328.58 MiB 1.00x 1.72 GiB/s 1.82 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 374.5ms 369.5ms 1.01x 77.08 MiB 80.58 MiB 1.05x 2.69 GiB/s 2.72 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 565.1ms 1.78 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 529.8ms 1.90 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 366.1ms 2.75 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 345.5ms 2.91 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.4ms 4.1ms 7.38x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 30.3ms 4.1ms 7.42x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
codex daily --offline --json 0.00 MiB 30.2ms 3.8ms 7.99x 43.73 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 30.0ms 3.9ms 7.72x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.22 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 551.8ms 537.4ms 1.03x 320.83 MiB 305.95 MiB 0.95x 1.82 GiB/s 1.87 GiB/s
codex --offline --json 1.01 GiB 367.2ms 334.4ms 1.10x 81.58 MiB 81.58 MiB 1.00x 2.74 GiB/s 3.01 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 309e545ac1f0
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 470.4ms 620.9ms 33.0ms 3
PR pkg.pr.new 309e545 573.0ms 586.8ms 33.4ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 557.2ms 560.7ms 0.99x 297.95 MiB 305.95 MiB 1.03x 1.81 GiB/s 1.80 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 364.1ms 371.7ms 0.98x 79.58 MiB 73.58 MiB 0.92x 2.76 GiB/s 2.71 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 554.9ms 1.81 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 521.4ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 365.4ms 2.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 344.2ms 2.93 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.1ms 4.0ms 7.53x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 30.1ms 4.0ms 7.49x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
codex daily --offline --json 0.00 MiB 29.8ms 3.7ms 8.05x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 29.6ms 3.8ms 7.88x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 570.5ms 514.6ms 1.11x 316.33 MiB 287.95 MiB 0.91x 1.76 GiB/s 1.96 GiB/s
codex --offline --json 1.01 GiB 366.7ms 337.6ms 1.09x 81.58 MiB 76.83 MiB 0.94x 2.75 GiB/s 2.98 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 309e545ac1f0
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 677.5ms 602.9ms 30.5ms 3
PR pkg.pr.new 309e545 955.8ms 954.4ms 30.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 547.1ms 541.0ms 1.01x 284.33 MiB 299.58 MiB 1.05x 1.84 GiB/s 1.86 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 365.7ms 365.8ms 1.00x 71.70 MiB 72.20 MiB 1.01x 2.75 GiB/s 2.75 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 546.1ms 1.84 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 539.3ms 1.87 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 377.7ms 2.67 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 338.2ms 2.98 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 29.3ms 29.7ms 0.99x 43.73 MiB 43.48 MiB 0.99x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 28.8ms 29.1ms 0.99x 43.48 MiB 43.73 MiB 1.01x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.1ms 29.3ms 0.99x 43.61 MiB - - 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.6ms 28.4ms 1.01x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 541.5ms 544.2ms 1.00x - - - 1.86 GiB/s 1.85 GiB/s
codex --offline --json 1.01 GiB 362.8ms 358.8ms 1.01x 80.83 MiB 78.83 MiB 0.98x 2.78 GiB/s 2.81 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1583f83a51a1
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 430.5ms 439.5ms 30.7ms 3
PR pkg.pr.new 1583f83 665.5ms 482.0ms 31.9ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 556.9ms 559.4ms 1.00x 314.20 MiB 324.70 MiB 1.03x 1.81 GiB/s 1.80 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 363.5ms 368.6ms 0.99x 76.95 MiB 81.58 MiB 1.06x 2.77 GiB/s 2.73 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 539.0ms 1.87 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 507.5ms 1.98 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 364.8ms 2.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 330.0ms 3.05 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 29.7ms 4.0ms 7.49x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 29.5ms 4.1ms 7.24x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
codex daily --offline --json 0.00 MiB 29.4ms 3.8ms 7.79x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 29.8ms 3.7ms 8.01x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 535.8ms 512.5ms 1.05x 332.83 MiB 313.58 MiB 0.94x 1.88 GiB/s 1.96 GiB/s
codex --offline --json 1.01 GiB 364.3ms 329.4ms 1.11x 76.70 MiB 76.83 MiB 1.00x 2.76 GiB/s 3.06 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 1583f83a51a1
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 594.8ms 538.7ms 31.2ms 3
PR pkg.pr.new 1583f83 664.2ms 546.5ms 30.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 551.1ms 541.3ms 1.02x 324.58 MiB 283.83 MiB 0.87x 1.83 GiB/s 1.86 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 367.4ms 368.8ms 1.00x 82.70 MiB 69.83 MiB 0.84x 2.74 GiB/s 2.73 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 547.6ms 1.84 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 517.7ms 1.94 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 370.0ms 2.72 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 354.9ms 2.84 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 29.5ms 29.1ms 1.01x - 43.48 MiB - 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 29.0ms 29.6ms 0.98x 43.48 MiB - - 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.0ms 28.9ms 1.00x 43.73 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.7ms 28.8ms 1.00x 43.61 MiB 43.73 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 546.9ms 536.5ms 1.02x 325.95 MiB 344.08 MiB 1.06x 1.84 GiB/s 1.88 GiB/s
codex --offline --json 1.01 GiB 360.5ms 361.6ms 1.00x 78.58 MiB 78.83 MiB 1.00x 2.79 GiB/s 2.78 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 4ee8ec2281ec
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 473.2ms 539.5ms 32.6ms 3
PR pkg.pr.new 4ee8ec2 664.6ms 583.1ms 32.7ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 570.0ms 548.9ms 1.04x 295.58 MiB 301.08 MiB 1.02x 1.77 GiB/s 1.83 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 364.0ms 374.3ms 0.97x 65.95 MiB 79.58 MiB 1.21x 2.77 GiB/s 2.69 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 547.6ms 1.84 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 528.3ms 1.91 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 368.1ms 2.74 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 346.1ms 2.91 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.2ms 4.1ms 7.33x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 29.7ms 4.0ms 7.45x - 2.70 MiB - 0.05 MiB/s 0.39 MiB/s
codex daily --offline --json 0.00 MiB 29.6ms 3.7ms 7.91x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 29.7ms 3.8ms 7.81x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 548.7ms 538.0ms 1.02x 324.58 MiB 321.58 MiB 0.99x 1.83 GiB/s 1.87 GiB/s
codex --offline --json 1.01 GiB 366.7ms 337.4ms 1.09x 76.70 MiB 77.08 MiB 1.00x 2.75 GiB/s 2.98 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 4ee8ec2281ec
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 475.2ms 531.0ms 33.6ms 3
PR pkg.pr.new 4ee8ec2 390.0ms 506.4ms 33.8ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 575.9ms 564.9ms 1.02x 313.58 MiB 296.45 MiB 0.95x 1.75 GiB/s 1.78 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 377.7ms 388.3ms 0.97x 77.33 MiB 73.70 MiB 0.95x 2.67 GiB/s 2.59 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 559.2ms 1.80 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 524.6ms 1.92 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 365.7ms 2.75 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 338.6ms 2.97 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.7ms 30.2ms 1.02x 43.48 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.8ms 31.0ms 0.99x 43.73 MiB 43.48 MiB 0.99x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.8ms 30.9ms 0.97x 43.48 MiB 43.48 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 30.5ms 30.2ms 1.01x 43.48 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 559.1ms 558.0ms 1.00x 304.45 MiB 296.20 MiB 0.97x 1.80 GiB/s 1.80 GiB/s
codex --offline --json 1.01 GiB 371.2ms 365.4ms 1.02x 78.70 MiB 80.58 MiB 1.02x 2.71 GiB/s 2.75 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 216bd98866d9
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 521.7ms 492.5ms 30.9ms 3
PR pkg.pr.new 216bd98 683.9ms 697.6ms 32.1ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 561.7ms 620.4ms 0.91x 297.45 MiB 306.20 MiB 1.03x 1.79 GiB/s 1.62 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 367.8ms 367.4ms 1.00x 78.83 MiB 75.58 MiB 0.96x 2.74 GiB/s 2.74 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 544.5ms 1.85 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 520.1ms 1.94 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 365.1ms 2.76 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 343.3ms 2.93 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.0ms 4.0ms 7.50x 43.61 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 29.9ms 4.0ms 7.42x 43.48 MiB 2.83 MiB 0.07x 0.05 MiB/s 0.38 MiB/s
codex daily --offline --json 0.00 MiB 29.6ms 3.7ms 8.03x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s
codex session --offline --json 0.00 MiB 29.4ms 3.8ms 7.83x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 546.3ms 511.2ms 1.07x 281.45 MiB 293.58 MiB 1.04x 1.84 GiB/s 1.97 GiB/s
codex --offline --json 1.01 GiB 363.2ms 337.6ms 1.08x 79.33 MiB 78.70 MiB 0.99x 2.77 GiB/s 2.98 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 216bd98866d9
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 438.3ms 479.8ms 31.9ms 3
PR pkg.pr.new 216bd98 729.1ms 777.6ms 31.6ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 549.9ms 544.0ms 1.01x 314.83 MiB 320.58 MiB 1.02x 1.83 GiB/s 1.85 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 366.5ms 370.7ms 0.99x 78.70 MiB 79.95 MiB 1.02x 2.75 GiB/s 2.72 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 540.8ms 1.86 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 520.4ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 367.1ms 2.74 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 341.5ms 2.95 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 28.8ms 29.2ms 0.99x 43.73 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 28.5ms 28.4ms 1.00x 43.73 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 28.7ms 28.5ms 1.01x 43.73 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.3ms 27.7ms 1.02x 43.48 MiB 43.61 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 557.9ms 530.5ms 1.05x 320.70 MiB 311.83 MiB 0.97x 1.80 GiB/s 1.90 GiB/s
codex --offline --json 1.01 GiB 357.9ms 355.6ms 1.01x 79.70 MiB 79.33 MiB 1.00x 2.81 GiB/s 2.83 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 14e4072e8a2d
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 513.0ms 525.3ms 31.1ms 3
PR pkg.pr.new 14e4072 598.6ms 528.4ms 30.4ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 554.9ms 549.4ms 1.01x 328.08 MiB 321.20 MiB 0.98x 1.81 GiB/s 1.83 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 361.6ms 359.9ms 1.00x 81.70 MiB 67.08 MiB 0.82x 2.78 GiB/s 2.80 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 523.5ms 1.92 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 505.2ms 1.99 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 361.2ms 2.79 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 334.3ms 3.01 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 27.8ms 3.7ms 7.47x 43.48 MiB 2.70 MiB 0.06x 0.06 MiB/s 0.42 MiB/s
claude session --offline --json 0.00 MiB 28.2ms 3.8ms 7.41x 43.54 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.41 MiB/s
codex daily --offline --json 0.00 MiB 28.2ms 3.5ms 7.96x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.24 MiB/s
codex session --offline --json 0.00 MiB 27.8ms 3.7ms 7.62x 43.48 MiB 2.83 MiB 0.07x 0.03 MiB/s 0.23 MiB/s

Large real-world-shaped fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 540.1ms 509.0ms 1.06x 315.33 MiB 294.70 MiB 0.93x 1.86 GiB/s 1.98 GiB/s
codex --offline --json 1.01 GiB 357.2ms 335.4ms 1.06x 71.70 MiB 67.45 MiB 0.94x 2.82 GiB/s 3.00 GiB/s

Artifact size

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

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 14e4072e8a2d
Base SHA: bee4a26e6cf5

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

Package runner startup

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

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new bee4a26e6cf5 765.8ms 731.9ms 29.6ms 3
PR pkg.pr.new 14e4072 720.1ms 612.5ms 30.3ms 3

Cached bunx execution performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 555.6ms 620.5ms 0.90x 328.20 MiB 297.83 MiB 0.91x 1.81 GiB/s 1.62 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 359.6ms 363.5ms 0.99x 79.58 MiB 80.58 MiB 1.01x 2.80 GiB/s 2.77 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 535.3ms 1.88 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 521.1ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 374.9ms 2.69 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 333.5ms 3.02 GiB/s 1

Committed fixture performance

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

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs 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 26.8ms 1.03x 43.61 MiB 43.48 MiB 1.00x 0.06 MiB/s 0.06 MiB/s
claude session --offline --json 0.00 MiB 28.4ms 27.2ms 1.04x 43.48 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.06 MiB/s
codex daily --offline --json 0.00 MiB 27.6ms 27.2ms 1.01x 43.48 MiB 43.48 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.5ms 27.8ms 1.03x 43.61 MiB 43.48 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, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 559.1ms 520.0ms 1.08x 315.83 MiB 308.83 MiB 0.98x 1.80 GiB/s 1.94 GiB/s
codex --offline --json 1.01 GiB 364.1ms 356.4ms 1.02x 78.95 MiB 72.83 MiB 0.92x 2.76 GiB/s 2.82 GiB/s

Artifact size

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

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

@ryoppippi

Copy link
Copy Markdown
Member

Thanks for this — the approach here (filtering on the actual time.created value with the same format_date_tz logic as the authoritative filter_loaded_entries_by_date) is the correct basis for pre-filtering: it's exact, needs no slack, and fails open, so it can never drop a row the authoritative filter would keep.

That said, we already have #1188 open for the same issue, and it carries the part this PR is missing: pushing the predicate into the SQLite query so it rides the existing message_session_time_created_id_idx index. This PR still does a full SELECT ... FROM message and reads every data blob (and reads every JSON file before skipping), so on the large installs that motivated this (33 GB DB / 118k JSON files) it wouldn't actually resolve the hang — the dominant cost is the row/file I/O, which it doesn't avoid.

Rather than maintain two competing PRs, I'm going to consolidate on #1188 and ask there to adopt the exact time.created-based check from this PR for the JSON path (replacing its file-mtime heuristic, which can silently under-count). Closing this in favor of that — but the core idea here is the right one and is being carried over. Thank you!

@ryoppippi ryoppippi closed this Jun 8, 2026
justi added a commit to justi/ccusage that referenced this pull request Jun 22, 2026
Push date bounds into the OpenCode loader instead of reading every DB
row and JSON file on each invocation, which hangs on large installs.

- SQLite: indexed `WHERE time_created` push-down with -1d/+2d slack,
  falling back to an unfiltered scan when the schema lacks the column
  (the in-loop date check still applies, so no row is silently dropped).
- JSON files: extract `time.created` from the raw payload and apply the
  same `format_date_tz` check as the authoritative
  `filter_loaded_entries_by_date`, failing open to a full parse so no
  in-range row is ever dropped.

Combines the indexed SQL push-down from ccusage#1188 with the content-based
JSON extraction from ccusage#1220, per maintainer guidance.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.

ccusage opencode hangs on long-lived installs because --since/--until are ignored

1 participant