Tracks per-detector alloc optimization toward NORTHSTAR (2 allocs/event) for
xid_correlation. Current ceiling in scripts/bench-registry.sh::allocs_gate
is 13 allocs/event (measured 12.40 ev, 12699 allocs/op @ window=1024).
The target is ≤2 to converge on NORTHSTAR alongside the other detectors.
What the bench measures
./bench/detectors/BenchmarkXidCorrelationDetector — 64 Xid records × 1024
pod-eviction events, joined by node + time. One verdict per evicted pod
(most-recent Xid wins). See bench/detectors/detectors_bench_test.go.
Hot-path candidates (pre-investigation)
- One verdict allocated per evicted pod (~819 pods); verdict structs +
evidence trail dominate the allocation count.
- Per-pod string formatting for evidence strings.
ObjectRef Pod-kind allocation per event.
Definition of done
- Lower the ceiling in
scripts/bench-registry.sh::allocs_gate to the new
floor (the absolute gate prevents creep back upward).
- Update
bench/detectors/baselines.json for the soft-gate trend tracking.
- Profile-driven (
go test -bench=BenchmarkXidCorrelationDetector -memprofile)
— fix the largest contributor, re-measure, repeat.
Why now (priority signal)
Above NORTHSTAR by ~6×. Highest leverage of the remaining gap (along with
pod_evicted, which is tracked separately).
Rolls up to #302.
Tracks per-detector alloc optimization toward NORTHSTAR (2 allocs/event) for
xid_correlation. Current ceiling inscripts/bench-registry.sh::allocs_gateis 13 allocs/event (measured 12.40 ev, 12699 allocs/op @ window=1024).
The target is ≤2 to converge on NORTHSTAR alongside the other detectors.
What the bench measures
./bench/detectors/BenchmarkXidCorrelationDetector— 64 Xid records × 1024pod-eviction events, joined by node + time. One verdict per evicted pod
(most-recent Xid wins). See
bench/detectors/detectors_bench_test.go.Hot-path candidates (pre-investigation)
evidence trail dominate the allocation count.
ObjectRefPod-kind allocation per event.Definition of done
scripts/bench-registry.sh::allocs_gateto the newfloor (the absolute gate prevents creep back upward).
bench/detectors/baselines.jsonfor the soft-gate trend tracking.go test -bench=BenchmarkXidCorrelationDetector -memprofile)— fix the largest contributor, re-measure, repeat.
Why now (priority signal)
Above NORTHSTAR by ~6×. Highest leverage of the remaining gap (along with
pod_evicted, which is tracked separately).Rolls up to #302.