Skip to content

feat(ccusage): add --no-cost flag to hide cost in reports#1224

Merged
ryoppippi merged 7 commits into
mainfrom
pullfrog/1167-no-cost-flag
Jun 8, 2026
Merged

feat(ccusage): add --no-cost flag to hide cost in reports#1224
ryoppippi merged 7 commits into
mainfrom
pullfrog/1167-no-cost-flag

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Add --no-cost flag (Option B from #1167) that removes the Cost (USD) column entirely from table output and strips cost fields from JSON output.

Changes

  • CLI: --no-cost flag in SharedArgs, parsed as shared option
  • Config: noCost (camelCase) boolean in config schema and config application
  • Table output: Cost column removed from headers/data/totals/breakdown rows in all renderers:
    • output.rs (print_usage_table — used by claude, opencode, and most agents)
    • all/report.rs (print_table — used by ccusage daily etc.)
    • amp/report.rs (print_table_for_agent — used by amp, goose, codebuff)
    • codex/report.rs (print_table_from_groups)
    • blocks.rs (print_blocks_table, print_active_block_detail)
  • JSON output: strip_cost_json removes totalCost, costUSD, cost keys recursively from all JSON output before printing/jq piping
  • Help texts and snapshots updated

Testing

  • All 205 Rust tests pass
  • Schema snapshot updated to include noCost field
  • CLI help snapshots updated

Closes #1167

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


Summary by cubic

Add a --no-cost flag (config: noCost) to hide cost info across all reports and agents. It removes the “Cost (USD)” column and strips cost fields from JSON recursively, while preserving the date-truncated “Last Activity” display. Closes #1167.

  • New Features
    • CLI: shared flag --no-cost; config supports noCost: true.
    • Tables and text: removes cost column in compact/full layouts (totals, breakdowns, session, blocks, active block detail) and keeps “Last Activity” date formatting.
    • JSON: recursively strips totalCost, costUSD, and cost keys before printing/jq; adds a regression test.
    • Config/docs: schema regenerated to include noCost; CLI help, README, guides, and example config updated.

Written for commit 018e570. Summary will update on new commits.

Review in cubic

pullfrog Bot added 3 commits June 6, 2026 14:03
Add --no-cost CLI flag (noCost in config) that removes the Cost (USD)
column from table output and strips totalCost/costUSD/cost from JSON
output. Supports all agents, all report modes (daily, monthly, weekly,
session, blocks), and both compact and full table layouts.

Closes #1167
@pullfrog pullfrog Bot requested a review from ryoppippi June 6, 2026 14:07
@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 018e570 Commit Preview URL

Branch Preview URL
Jun 08 2026, 10:03 PM

@pullfrog

pullfrog Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Fixed CI failures caused by out-of-date schema files.

Root cause: The config_schema.rs was updated to add noCost fields, but the generated JSON schema files (apps/ccusage/config-schema.json and docs/public/config-schema.json) were not regenerated. This caused both lint-check (treefmt's schema-gen formatter detected unstaged changes) and schema-check (explicit git diff --exit-code on schema files) to fail.

Fix: Ran pnpm run generate:schema to regenerate the schema JSON, adding noCost entries across all agent config sections. Committed the updated apps/ccusage/config-schema.json. Verified with nix flake check — all checks pass now.

Task list (6/6 completed)
  • Checkout PR branch and get check suite logs
  • Verify failure was introduced by this PR
  • Diagnose and fix the CI failure (treefmt + schema-check)
  • Verify fix by running CI command locally
  • Commit and push fix
  • Report final progress

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

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

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

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-arm64

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

@ccusage/ccusage-win32-x64

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

commit: 11fd53a

Bring PR #1224 up to date with origin/main after the statusline modelLabelAliases and workflow pinning changes landed.

Keep the pinned Pullfrog workflow from main, regenerate the config schema with both noCost and modelLabelAliases, and add docs plus a regression test for recursive JSON cost stripping.

Validation: pnpm run format; pnpm run test.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 7d5b63bbe8d8
Base SHA: cf2d7cd93e75

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 cf2d7cd93e75 763.3ms 943.9ms 30.7ms 3
PR pkg.pr.new 7d5b63b 988.1ms 825.0ms 31.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: cf2d7cd93e75; PR package: 7d5b63b. 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 563.2ms 554.7ms 1.02x 300.45 MiB 305.33 MiB 1.02x 1.79 GiB/s 1.82 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 369.6ms 370.3ms 1.00x 83.08 MiB 79.33 MiB 0.95x 2.72 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 549.9ms 1.83 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 522.0ms 1.93 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 368.0ms 2.74 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 339.2ms 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.1ms 29.5ms 1.02x 43.73 MiB 43.48 MiB 0.99x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.3ms 30.1ms 1.01x 43.48 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.7ms 29.5ms 1.01x 43.48 MiB 43.61 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 29.9ms 29.3ms 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 551.2ms 547.6ms 1.01x 311.08 MiB 305.70 MiB 0.98x 1.83 GiB/s 1.84 GiB/s
codex --offline --json 1.01 GiB 362.9ms 363.4ms 1.00x 74.58 MiB 74.45 MiB 1.00x 2.77 GiB/s 2.77 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 14.50 KiB 14.90 KiB +0.40 KiB 0.97x
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 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 7d5b63bbe8d8
Base SHA: cf2d7cd93e75

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 cf2d7cd93e75 987.3ms 574.0ms 33.0ms 3
PR pkg.pr.new 7d5b63b 874.9ms 737.5ms 33.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: cf2d7cd93e75; PR package: 7d5b63b. 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.5ms 563.8ms 1.01x 312.70 MiB 292.33 MiB 0.93x 1.76 GiB/s 1.79 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 368.3ms 370.3ms 0.99x 79.20 MiB 82.33 MiB 1.04x 2.73 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 554.9ms 1.81 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 530.8ms 1.90 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 367.3ms 2.74 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 342.9ms 2.94 GiB/s 1

Committed fixture performance

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

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs 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.3ms 4.1ms 7.37x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.38 MiB/s
claude session --offline --json 0.00 MiB 30.5ms 4.1ms 7.35x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.37 MiB/s
codex daily --offline --json 0.00 MiB 30.4ms 4.0ms 7.69x 43.61 MiB 2.83 MiB 0.06x 0.03 MiB/s 0.22 MiB/s
codex session --offline --json 0.00 MiB 30.5ms 3.8ms 8.02x 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 567.7ms 521.2ms 1.09x 300.20 MiB 313.83 MiB 1.05x 1.77 GiB/s 1.93 GiB/s
codex --offline --json 1.01 GiB 370.8ms 344.7ms 1.08x 80.08 MiB 71.20 MiB 0.89x 2.71 GiB/s 2.92 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 14.50 KiB 14.90 KiB +0.40 KiB 0.97x
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.

Bring the PR branch up to date with the latest main after cache-duration pricing and Codex replay fixes landed.

Resolve the shared config surface by keeping both noCost and pricingOverrides, regenerate the config schema snapshot, and keep the repository example config valid with both options present.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 11fd53a2c859
Base SHA: 22e5944a6754

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 22e5944a6754 446.8ms 534.1ms 31.7ms 3
PR pkg.pr.new 11fd53a 761.8ms 648.1ms 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: 22e5944a6754; PR package: 11fd53a. 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.6ms 575.2ms 0.98x 321.95 MiB 292.20 MiB 0.91x 1.79 GiB/s 1.75 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 419.3ms 381.4ms 1.10x 82.33 MiB 82.08 MiB 1.00x 2.40 GiB/s 2.64 GiB/s

Package runtime diagnostics

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

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

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 580.0ms 1.74 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 552.9ms 1.82 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 395.1ms 2.55 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 348.3ms 2.89 GiB/s 1

Committed fixture performance

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

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

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 30.6ms 30.0ms 1.02x 43.61 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 30.0ms 30.3ms 0.99x 43.48 MiB 43.61 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 29.8ms 29.6ms 1.01x - - - 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 29.7ms 30.1ms 0.99x 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 568.9ms 556.2ms 1.02x - 346.20 MiB - 1.77 GiB/s 1.81 GiB/s
codex --offline --json 1.01 GiB 378.1ms 371.7ms 1.02x 80.08 MiB - - 2.66 GiB/s 2.71 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 16.83 KiB 17.26 KiB +0.43 KiB 0.98x
installed native package binary 3353.74 KiB 3353.74 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 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 11fd53a2c859
Base SHA: 22e5944a6754

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 22e5944a6754 773.5ms 594.9ms 32.2ms 3
PR pkg.pr.new 11fd53a 869.0ms 724.0ms 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: 22e5944a6754; PR package: 11fd53a. 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.6ms 576.5ms 0.97x 322.95 MiB 321.45 MiB 1.00x 1.79 GiB/s 1.75 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 377.3ms 372.2ms 1.01x 80.08 MiB 77.70 MiB 0.97x 2.67 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 562.2ms 1.79 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 526.4ms 1.91 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 372.9ms 2.70 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 345.2ms 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.7ms 4.0ms 7.48x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
claude session --offline --json 0.00 MiB 29.3ms 3.9ms 7.47x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.39 MiB/s
codex daily --offline --json 0.00 MiB 28.9ms 3.6ms 7.98x 43.48 MiB 2.70 MiB 0.06x 0.03 MiB/s 0.24 MiB/s
codex session --offline --json 0.00 MiB 29.2ms 3.8ms 7.65x 43.61 MiB 2.70 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 566.8ms 530.5ms 1.07x 321.83 MiB 320.08 MiB 0.99x 1.78 GiB/s 1.90 GiB/s
codex --offline --json 1.01 GiB 370.4ms 346.7ms 1.07x 79.08 MiB 72.70 MiB 0.92x 2.72 GiB/s 2.90 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 16.83 KiB 17.26 KiB +0.43 KiB 0.98x
installed native package binary 3353.74 KiB 3353.74 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.

Bring in the firstActivity session JSON changes that landed on main while this PR was waiting for CI.

Resolve the output helper conflict by keeping cost-field stripping for --no-cost and the new date truncation helper for last activity table output, then rerun format and the full test suite.
@ryoppippi ryoppippi merged commit a10b897 into main Jun 8, 2026
6 of 7 checks passed
@ryoppippi ryoppippi deleted the pullfrog/1167-no-cost-flag branch June 8, 2026 22:03
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 018e5702a1bb
Base SHA: e36a3c22db70

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 e36a3c22db70 527.2ms 530.2ms 32.1ms 3
PR pkg.pr.new 018e570 973.2ms 709.2ms 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: e36a3c22db70; PR package: 018e570. 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 584.8ms 0.98x 336.58 MiB 327.95 MiB 0.97x 1.75 GiB/s 1.72 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 386.5ms 380.2ms 1.02x 81.20 MiB 72.58 MiB 0.89x 2.60 GiB/s 2.65 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.4ms 1.90 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 371.7ms 2.71 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 345.9ms 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 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 31.4ms 31.3ms 1.00x 43.61 MiB 43.48 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 31.4ms 31.1ms 1.01x 43.61 MiB 43.73 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 31.1ms 30.4ms 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 30.5ms 30.6ms 1.00x 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 570.0ms 555.9ms 1.03x 323.58 MiB 315.33 MiB 0.97x 1.77 GiB/s 1.81 GiB/s
codex --offline --json 1.01 GiB 382.6ms 394.0ms 0.97x 74.45 MiB 76.83 MiB 1.03x 2.63 GiB/s 2.55 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 16.83 KiB 17.26 KiB +0.43 KiB 0.98x
installed native package binary 3353.74 KiB 3353.74 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 8, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 018e5702a1bb
Base SHA: e36a3c22db70

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 e36a3c22db70 397.8ms 531.0ms 31.4ms 3
PR pkg.pr.new 018e570 622.4ms 564.3ms 30.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: e36a3c22db70; PR package: 018e570. 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.4ms 561.9ms 0.99x 330.70 MiB 319.95 MiB 0.97x 1.81 GiB/s 1.79 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 382.3ms 376.5ms 1.02x 73.33 MiB 82.33 MiB 1.12x 2.63 GiB/s 2.67 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 563.9ms 1.79 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 535.2ms 1.88 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 369.0ms 2.73 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 340.4ms 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 28.9ms 3.9ms 7.49x 43.48 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
claude session --offline --json 0.00 MiB 28.7ms 3.9ms 7.36x 43.73 MiB 2.70 MiB 0.06x 0.05 MiB/s 0.40 MiB/s
codex daily --offline --json 0.00 MiB 29.3ms 3.6ms 8.07x 43.48 MiB 2.70 MiB 0.06x 0.03 MiB/s 0.24 MiB/s
codex session --offline --json 0.00 MiB 29.1ms 3.6ms 7.98x 43.48 MiB 2.70 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 558.2ms 538.2ms 1.04x 329.58 MiB 347.83 MiB 1.06x 1.80 GiB/s 1.87 GiB/s
codex --offline --json 1.01 GiB 366.1ms 344.0ms 1.06x 83.20 MiB 78.70 MiB 0.95x 2.75 GiB/s 2.93 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 16.83 KiB 17.26 KiB +0.43 KiB 0.98x
installed native package binary 3353.74 KiB 3353.74 KiB +0.00 KiB 1.00x

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: option to ommit cost from report

1 participant