perf: add API and Postgres graph benchmark evidence
Problem
The current graph scale evidence is useful but explicitly local/CPU-only. docs/perf/p95-p99-graph-query.md and the raw result artifact both exclude the deployment paths an enterprise pilot will ask about:
- HTTP/API latency under auth, tenant, and network overhead
- Postgres graph-store persistence/query plans
- graph diff API latency
- materialized attack-path drilldown latency
- browser/UI interaction timing for large estates
- skewed enterprise-like degree distribution
Issue #1806 is closed, so these residual gaps need a follow-up owner rather than living only in the docs.
Required benchmark lanes
- k6 or equivalent API benchmark for:
/v1/graph/search- graph node detail/path endpoint(s)
- graph diff endpoint(s)
- bounded neighborhood traversal via API
- Postgres-backed benchmark at 10k / 50k / 100k edges with
EXPLAIN ANALYZEartifacts for:- node search
- node detail
- path/drilldown
- diff queries
- Attack-path drilldown benchmark with realistic vuln/package/tool topology.
- Realistic synthetic estate generator:
- skewed degree distribution
- some agents with many MCP servers/tools, most with few
- realistic vulnerable package rate
- mixed local, cloud, fleet, and operator-pushed sources
- Docs update with raw commands, environment, p50/p95/p99, and explicit SLOs.
Acceptance
- Raw artifacts checked in under
docs/perf/results/. - CI or scheduled workflow validates the lightweight benchmark scaffold.
- Product docs distinguish local CPU graph timings from API/Postgres/operator deployment timings.
- Claims for Snowflake/enterprise pilots reference measured evidence only.
Progress: about 70%. Current main has measured graph benchmark docs, Postgres explain artifacts, and CI/scheduled benchmark scaffolding. Keep open for the remaining acceptance scope: 50k/100k lanes, auth/API p50/p95/p99, graph diff, attack-path drilldown, and UI timing evidence.
Blueprint mapping update:
Existing benchmark artifacts and graph hot-path work cover part of this issue, but this should remain open. The remaining release-quality proof is repeated Postgres p95/p99 under auth/tenant paths, larger 50k/100k-edge evidence where feasible, and browser/graph interaction timing tied to the current Sigma/React Flow split.
Status check from main (9555dc4b, 2026-06-15): most of this issue is now covered by shipped benchmark evidence.
Verified locally:
uv run pytest -q tests/test_graph_benchmark_scaffold.py->5 passeddocs/perf/graph-api-postgres-benchmark.mdexists with owner issue#2145, commands, measured local API timings, Docker Postgres load evidence, and PostgresEXPLAIN ANALYZEartifacts.- Checked-in artifacts include
graph-api-benchmark-live-2026-05-13.json,graph-benchmark-postgres-load-live-2026-05-13.json,postgres-graph-explain-live-2026-05-13.json, SQL files, and plan text files.
Remaining work before closing:
- authenticated remote API latency run, not only loopback unauthenticated local API
- repeated Postgres p50/p95/p99 latency artifacts, not only single
EXPLAIN ANALYZEplans plus dry-run latency scaffold - 50k / 100k edge Postgres artifacts
- optional browser interaction timing if UI scale claims are going to cite this issue
Recommendation: keep this issue open but narrow it to the remaining measured-evidence gaps above; do not build another harness unless one of those runs needs a missing script capability.