claude-code-router/benchmarks
musi 86a383f647 Merge branch 'main' into dev/compact
# Conflicts:
#	packages/core/src/config/config.ts
#	packages/core/src/contracts/app.ts
#	packages/core/src/gateway/service.ts
#	packages/core/src/profiles/service.ts
#	packages/core/test/unit/agents/context-archive.test.mjs
#	packages/core/test/unit/gateway/codex-patch-bridge.test.mjs
#	packages/ui/src/pages/home/components/profiles.tsx
#	packages/ui/src/pages/home/shared/profiles.ts
#	tests/main/profile-service.test.mjs
#	tests/main/router-builtins.test.mjs
2026-07-23 09:24:28 +08:00
..
native-vs-text-ccr-compressed-agent-results/2026-07-22T14-51-47-947Z_DeepSeek-deepseek-v4-flash Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-compressed-agent-results-pilot Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-gateway-agent-results/2026-07-22T15-32-16-025Z_DeepSeek-deepseek-v4-flash Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-gateway-agent-results-no-tool-choice/2026-07-22T22-47-13-438Z_DeepSeek-deepseek-v4-flash Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-gateway-agent-results-pilot Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-results Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results/2026-07-22T13-08-28-108Z_AI---Coding-Plan-glm-5.2 Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results-deepseek/2026-07-22T14-24-36-943Z_DeepSeek-deepseek-v4-flash Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results-deepseek-pilot Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results-pilot Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results-unlimited/2026-07-22T13-29-23-469Z_AI---Coding-Plan-glm-5.2 Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-results-unlimited-pilot/2026-07-22T13-28-26-455Z_AI---Coding-Plan-glm-5.2 Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
results Refactor request routing and provider coordination 2026-07-15 13:32:14 +08:00
claude-code-context-archive-tool-smoke.mjs Support context archive tool continuation for Anthropic Messages 2026-07-23 09:02:31 +08:00
claude-code-real-compact.mjs Add Claude compact archive support 2026-07-09 21:56:45 +08:00
context-archive-benchmark.ts Refactor routing architecture and streamline provider handling 2026-07-21 12:37:11 +08:00
context-archive-real-agent-benchmark.ts Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
context-archive-task-cases.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-compressed-agent.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-gateway-agent.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-gateway.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-original.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
native-vs-text-ccr-tool-retrieval.mjs Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
README.md Refactor request routing and provider coordination 2026-07-15 13:32:14 +08:00
run-context-archive-benchmark.mjs Refactor routing architecture and streamline provider handling 2026-07-21 12:37:11 +08:00
run-context-archive-real-agent-benchmark.mjs Refactor routing architecture and streamline provider handling 2026-07-21 12:37:11 +08:00

Request log benchmarks

Run the request-log benchmark with the same Electron/Node native runtime selection used by the test runner:

npm run benchmark:request-logs -- --label local

To persist a machine-readable result:

npm run benchmark:request-logs -- --label local --output benchmarks/results/request-log-local.json

The benchmark has two layers:

  • A request-log microbenchmark covering small records without a route trace, small records with a 10-hop route trace, 2 MB request bodies with a 10-hop trace, and 8 MB Base64 image requests.
  • A real loopback HTTP service benchmark comparing no logging, synchronous main-thread SQLite logging, and the asynchronous worker logger.

The HTTP benchmark uses a separate load-generator process so client work does not share the server event loop. It reports QPS, durable QPS, p50/p95/p99/max latency, HTTP errors, rejected log events, event-loop p99/max delay, CPU, heap, and RSS changes.

The default web load is 10,000 requests with concurrency 64 and a 1 KB request body. It can be adjusted without editing code:

npm run benchmark:request-logs -- \
  --web-requests 20000 \
  --web-concurrency 128 \
  --web-body-bytes 4096 \
  --label web-load

Use --skip-web when only the storage microbenchmark is needed, or --skip-storage when iterating only on HTTP performance. Both layers report request-path time separately from durable flush time so moving work off the request thread cannot hide storage regressions.