{
  "schema_version": "prxy.benchmarks.v1",
  "last_updated": "2026-05-04",
  "source_command": "pnpm --filter @prxy/benchmarks bench",
  "node_version": "v22.22.0",
  "platform": "darwin-arm64",
  "scope": "local_synthetic",
  "caveat": "Local benchmarks use stub embeddings and in-memory storage. They prove module mechanics in deterministic fixtures, not guaranteed production savings. Run prxy bench --remote against your own authenticated endpoint for workload-specific numbers.",
  "results": {
    "mcp_optimizer": {
      "tool_count_before": 120,
      "scenarios": [
        { "id": "github-issue", "tool_count_after": 79, "tokens_before": 13265, "tokens_after": 9194, "reduction_pct": 30.7, "p95_latency_ms": 1.81 },
        { "id": "slack-thread", "tool_count_after": 76, "tokens_before": 13265, "tokens_after": 8575, "reduction_pct": 35.4, "p95_latency_ms": 2.51 },
        { "id": "postgres-explain", "tool_count_after": 52, "tokens_before": 13265, "tokens_after": 6231, "reduction_pct": 53.0, "p95_latency_ms": 1.44 },
        { "id": "filesystem-grep", "tool_count_after": 79, "tokens_before": 13265, "tokens_after": 8751, "reduction_pct": 34.0, "p95_latency_ms": 1.59 },
        { "id": "mixed", "tool_count_after": 103, "tokens_before": 13265, "tokens_after": 11435, "reduction_pct": 13.8, "p95_latency_ms": 1.39 }
      ],
      "aggregate": {
        "avg_reduction_pct": 33.4,
        "avg_tokens_saved": 4428,
        "p50_latency_ms": 1.0,
        "p95_latency_ms": 1.32
      }
    },
    "semantic_cache": {
      "total_queries": 1000,
      "unique_seeds": 10,
      "hits": 985,
      "misses": 15,
      "hit_rate_pct": 98.5,
      "p50_latency_ms": 0.01,
      "p95_latency_ms": 0.03
    },
    "exact_cache": {
      "iterations": 200,
      "simulated_provider_latency_ms": 1800,
      "cache_hit_avg_ms": 0.004,
      "cache_hit_p50_ms": 0.003,
      "cache_hit_p95_ms": 0.011
    },
    "ipc_compression": [
      { "scenario": "50pct-utilization", "utilization_pct": 50, "tokens_before": 100008, "tokens_after": 100008, "reduction_pct": 0, "triggered": false, "p95_latency_ms": 0.56 },
      { "scenario": "75pct-utilization", "utilization_pct": 75, "tokens_before": 150002, "tokens_after": 2418, "reduction_pct": 98.4, "triggered": true, "p95_latency_ms": 0.5 },
      { "scenario": "90pct-utilization", "utilization_pct": 90, "tokens_before": 180005, "tokens_after": 2413, "reduction_pct": 98.7, "triggered": true, "p95_latency_ms": 0.25 }
    ],
    "pattern_injection": [
      { "scenario": "small-store", "patterns_in_store": 50, "patterns_injected_max": 5, "prompt_growth_tokens": 163, "p95_latency_ms": 0.69 },
      { "scenario": "medium-store", "patterns_in_store": 500, "patterns_injected_max": 5, "prompt_growth_tokens": 166, "p95_latency_ms": 0.25 },
      { "scenario": "large-store", "patterns_in_store": 5000, "patterns_injected_max": 5, "prompt_growth_tokens": 168, "p95_latency_ms": 4.53 }
    ],
    "prompt_optimizer": {
      "iterations": 100,
      "prefix_stability_off_pct": 1,
      "prefix_stability_on_pct": 100,
      "cache_hit_improvement_pct": 99,
      "marker_placement_correct_pct": 100,
      "p50_latency_ms": 0.001,
      "p95_latency_ms": 0.016
    }
  },
  "links": {
    "human": "https://prxy.monster/benchmarks/",
    "docs": "https://docs.prxy.monster/concepts/benchmarks",
    "cli": "https://docs.prxy.monster/cli/commands"
  }
}
