A benchmarking suite that measures Claude Code's token consumption under three scenarios, then analyses the results to evaluate the economic impact of Edgee's AI token compressor.
See the
reports/folder for detailed, real-world reports from our latest benchmark runs, including token usage, costs, and scenario breakdowns.
The benchmark works in two phases:
- Run — Launch isolated Claude Code sessions that complete a fixed set of coding instructions. Each session runs in one of three scenarios (compression strategies).
- Analyse — Read the session artefacts and produce cost reports.
- Node.js ≥ 18 with
npm claudeCLI installed and accessible in yourPATH- RTK (Rust Token Killer): required for the
rtkscenario; see https://github.com/rtk-ai/rtk - An
.envfile at the project root (see below)
Install dependencies:
npm installCreate a .env file at the root of the project:
EDGEE_API_TOKEN_NORMAL=<your-token-for-normal-sessions>
EDGEE_API_TOKEN_EDGEE=<your-token-for-edgee-sessions>
EDGEE_API_TOKEN_RTK=<your-token-for-rtk-sessions>Each token is an Edgee API key used to route Claude's requests through the Edgee AI Gateway.
If you want to generate reports, you'll need another variable:
EDGEE_API_TOKEN_REPORT=<your-token-to-generate-reports>./run.sh <scenario>Scenarios:
| Scenario | Description |
|---|---|
normal |
Baseline — Claude requests go through Edgee AI Gateway with no compression |
edgee |
Edgee token compressor is enabled; input tokens are reduced before forwarding to Anthropic |
rtk |
RTK (Rust Token Killer) is enabled as a local bash proxy; Claude's bash tool calls go through RTK before hitting the gateway |
Each run:
- Copies the
cli/source directory into a fresh_<scenario>-<random>/folder - Creates an isolated Claude config directory inside it
- Launches Claude Code with
--dangerously-skip-permissions
Example:
./run.sh edgeeThis creates _edgee-4a2f8c1d/ and starts a Claude session inside it.
Once Claude starts, put it in plan mode, then paste the coding instructions one at a time from instructions.md. For each instruction:
- Paste the instruction
- Let Claude produce a plan
- Approve the plan and let it execute
- Move on to the next instruction
The session records token usage and cost in .claude/.claude.json inside the session directory.
Reads all _normal-*, _edgee-*, and _rtk-* session directories (excluding -full ones), aggregates token and cost metrics, then calls the Edgee LLM API to produce an AI-written analysis.
npm run analyzeOutputs two files in the project root:
report-<ISO-date>.json— raw aggregated metricsreport-<ISO-date>.md— human-readable markdown report with tables and LLM analysis
Reads all _*-full/ session directories and their claude-pro-usage.json files to measure how many instructions each scenario can complete before exhausting a Claude Pro plan.
npm run analyze-fullOutputs:
report-full-<ISO-date>.jsonreport-full-<ISO-date>.md