Skip to content

[B4] bench: add absolute p1-FPS / spike / draw-call / vertex / GPU-memory ceilings per preset #875

Description

@MichaelFisher1997

Part of #834 (Production-Readiness Audit) — Batch B4 (make bench/visual actually fail, parallel-safe).
Replaces audit items #4 + #23 (merged because both touch the benchmark harness source). Parallel with: audit-b4 siblings — this issue owns the benchmark harness Zig source.

Problem

Two related gaps in the same source area, so they ship as one PR:

  1. feat: worm cave system with connected underground networks #4 — no frame-time / SLO assertion. Benchmarks report FPS percentiles (p1, p5, p50, p95, p99), CPU ms, GPU ms, draw calls, vertices — but nothing fails. A 50% FPS regression ships green.
  2. Resolve Issue #19: Remaining Audit Fixes #23 — no draw-call / GPU-memory / vertex budget test. Benchmarks log draw_calls_avg, vertices_avg, GPU ms — but never assert a ceiling. A 3× draw-call regression ships green.

Acceptance criteria

  • Absolute SLO thresholds added to the benchmark harness per preset (low/medium/high/ultra/extreme):
    • p1 FPS floor (the worst 1% frame) per preset.
    • Spike guard: no single frame > N ms (e.g. 50 ms).
    • Draw-call ceiling per preset.
    • Vertex ceiling per preset.
    • GPU-memory ceiling per preset.
  • Any breach causes the benchmark run to exit non-zero (so it can gate PRs once B4-1 enables the trigger).
  • Thresholds are separate from the regression-vs-baseline comparison (these are absolute SLOs).
  • Thresholds documented in docs/benchmarks/README.md with rationale.

Files in scope

  • benchmark harness source (find the runner — likely under modules/engine-graphics or src/game benchmark code; identify and edit)
  • docs/benchmarks/README.md (threshold table)

Dependencies

Out of scope

Branch / PR

  • Branch: bench/slo-drawcall-ceilings · Targets: dev

Metadata

Metadata

Labels

audit-b4Audit Batch 4: Make bench/visual actually fail (needs B1)cidocumentationImprovements or additions to documentationhotfixproduction-readinessAudit findings: missing CI/lint/benchmark/regression guardrails for production-grade engine

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions