# Benchmarks


# Benchmarks

Every savings claim on this site is backed by a fixed benchmark corpus that ships
in the banish repository and gates every release in CI. This page publishes the
raw numbers - including the commands where banish saves little - and the one
command that reproduces them.

## The numbers

The corpus holds 43 command fixtures. Across all of them, banish compacts 24,394
raw tokens down to 6,289 - a 74 percent reduction overall, with a median of 80
percent per command. Most commands land between 60 and 95 percent. Commands whose
output is already structured JSON, like `kubectl get pods` or `gh pr list`, save
less, and those rows are left in below rather than hidden.

The 37 rows here are the representative set. Raw is the token count of the real
command output; compacted is what banish returns to your agent.

| Command | Raw tokens | Compacted | Saved |
| --- | --- | --- | --- |
| git status (clean) | 25 | 5 | 80 percent |
| git status (dirty) | 136 | 41 | 70 percent |
| git diff (2 files) | 279 | 75 | 73 percent |
| git log (8 commits) | 363 | 115 | 68 percent |
| grep -rn (60 matches) | 1071 | 370 | 65 percent |
| go test ./... (1 fail) | 330 | 41 | 88 percent |
| npm install | 95 | 35 | 63 percent |
| cargo build (33 crates) | 265 | 17 | 94 percent |
| make (20 files) | 390 | 5 | 99 percent |
| jest (12 suites pass) | 170 | 37 | 78 percent |
| gh pr checks (1 fail) | 73 | 22 | 70 percent |
| dotnet build (3 projects) | 96 | 23 | 76 percent |
| kubectl get pods (20 pods) | 399 | 305 | 24 percent |
| gh pr list (12 PRs) | 403 | 339 | 16 percent |
| gh run list (10 runs) | 412 | 245 | 41 percent |
| git diff package-lock.json | 503 | 57 | 89 percent |
| git diff Cargo.lock | 289 | 64 | 78 percent |
| git diff yarn.lock | 330 | 60 | 82 percent |
| git diff go.sum | 345 | 68 | 80 percent |
| gcloud compute instances list (5 VMs) | 1178 | 131 | 89 percent |
| gcloud container clusters list (3 GKE) | 752 | 83 | 89 percent |
| gcloud run services list (4 svcs) | 848 | 131 | 85 percent |
| gcloud sql instances list (4 SQL) | 793 | 105 | 87 percent |
| gcloud builds list (5 builds) | 801 | 119 | 85 percent |
| gcloud pubsub topics list --format=json (5 topics) | 273 | 101 | 63 percent |
| az vm list (5 VMs) | 953 | 83 | 91 percent |
| az storage account list (4 accts) | 791 | 80 | 90 percent |
| az webapp list (5 apps) | 692 | 109 | 84 percent |
| az aks list (3 clusters) | 728 | 64 | 91 percent |
| az monitor activity-log list (5 events) | 793 | 160 | 80 percent |
| az keyvault list --output json (4 vaults) | 535 | 211 | 61 percent |
| aws ec2 describe-instances (5 instances) | 2058 | 113 | 95 percent |
| aws lambda list-functions (6 fns) | 1267 | 137 | 89 percent |
| aws cloudformation describe-stack-events | 1056 | 183 | 83 percent |
| aws logs filter-log-events (10 events) | 910 | 432 | 53 percent |
| aws iam list-users (6 users) | 587 | 119 | 80 percent |
| aws eks describe-clusters --output json (4 clusters) | 608 | 162 | 73 percent |

For a walkthrough of individual commands, see the per-command guides:
[git](/docs/guides/compact-git-output), [cargo](/docs/guides/compact-cargo-output),
[npm](/docs/guides/compact-npm-output), [kubectl](/docs/guides/compact-kubectl-output),
and [go test](/docs/guides/compact-go-test-output).

## What we measured

Each fixture is real output from the named command, captured once and stored in the
repository. banish runs it through the same compaction pipeline your agent hits -
the built-in filter packs and defaults, no user extensions - and counts tokens on
both the raw and compacted text with the same tokenizer your agent uses.

These are representative fixtures, not a guarantee. Token counts vary with
repository state, cluster size, and output length, so treat the percentages as
typical rather than exact. The [methodology](/docs/reference/methodology) page
explains how tokens are counted.

## Run it yourself

The corpus is not a marketing artifact - it is the same fixture set the test suite
runs on every change. Reproduce the whole table:

```sh
banish bench
```

Add `--check` to fail if any command drops below its savings threshold. This is the
exact gate that runs in CI, so the published numbers cannot silently drift:

```sh
banish bench --check
```

## Where the savings come from

banish keeps the part of each command's output that carries meaning and drops the
predictable noise. See the [built-in filters](/docs/reference/built-in-filters) for
the commands compacted out of the box, and [the bash proxy](/docs/concepts/bash-proxy)
for how output is intercepted and compacted before it reaches your agent.
