agent-bom icon indicating copy to clipboard operation
agent-bom copied to clipboard

perf: add API and Postgres graph benchmark evidence

Open msaad00 opened this issue 7 months ago • 3 comments

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

  1. k6 or equivalent API benchmark for:
    • /v1/graph/search
    • graph node detail/path endpoint(s)
    • graph diff endpoint(s)
    • bounded neighborhood traversal via API
  2. Postgres-backed benchmark at 10k / 50k / 100k edges with EXPLAIN ANALYZE artifacts for:
    • node search
    • node detail
    • path/drilldown
    • diff queries
  3. Attack-path drilldown benchmark with realistic vuln/package/tool topology.
  4. 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
  5. 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.

msaad00 avatar Apr 30 '26 21:04 msaad00

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.

msaad00 avatar May 17 '26 03:05 msaad00

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.

msaad00 avatar May 17 '26 04:05 msaad00

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 passed
  • docs/perf/graph-api-postgres-benchmark.md exists with owner issue #2145, commands, measured local API timings, Docker Postgres load evidence, and Postgres EXPLAIN ANALYZE artifacts.
  • 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 ANALYZE plans 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.

msaad00 avatar Jun 15 '26 03:06 msaad00