feat(bench): RFC 0031 — latency_p50 channel (RFC0031.7 becomes measurable) - #495
Conversation
…able) The indicative run now measures the RFC 0031 §3.6 latency channel per pair on both systems: after a pair's correctness measurement succeeds, 7 timed repetitions of the same query — Ourios via ourios_query_answer end to end (in-process), Loki via the same query_range round trip with the body drained — reported as the median (warm p50, never min). The report prints both p50s, the loki_p50/ourios_p50 ratio in the bytes gates' orientation with the in-process-vs-localhost-HTTP asymmetry caveat, and for Floor pairs the RFC0031.7 gate as written (ourios_p50 <= F_L6 x loki_p50) through the shared checked gate math on nanosecond integers. Latency stays corroborating: a rep failure on an otherwise-good pair logs loudly and reports "unmeasured", never fails the run; a pair whose correctness measurement failed reports no latency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
📝 WalkthroughWalkthroughThe RFC0031 comparative harness now measures warm p50 latency for Loki and Ourios queries, propagates latency through measurement handling, reports latency ratios and Floor gate results, and tests median and gate calculations. ChangesWarm latency comparison
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ComparativeRunner
participant Ourios
participant Loki
participant IndicativeReport
ComparativeRunner->>Ourios: Execute repeated in-process queries
Ourios-->>ComparativeRunner: Return latency samples
ComparativeRunner->>Loki: Execute repeated query_range requests
Loki-->>ComparativeRunner: Return latency samples
ComparativeRunner->>ComparativeRunner: Store and split measurements
ComparativeRunner->>IndicativeReport: Render p50 values, ratio, and Floor result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds the missing RFC 0031 §3.6 latency_p50 “corroborating channel” to the comparative benchmark harness so scenario RFC0031.7’s latency floor can be measured and reported alongside the existing bytes gates.
Changes:
- Introduces warm-p50 latency measurement for both Ourios (in-process) and Loki (localhost HTTP), using 7 post-correctness repetitions and reporting the median.
- Implements an RFC0031.7 latency floor check by reusing
ourios_bench::bytes_within_floorover nanosecond integers. - Extends the per-pair measurement plumbing/report output and adds unit tests for median + floor behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
…e the timing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
What
The latency_p50 channel RFC 0031 §3.6 specifies but the harness never implemented. After this, scenario RFC0031.7 (
ourios.latency_p50 ≤ F_L6 × loki.latency_p50) is measurable as written — and measured.Measured result (pre-merge validation, run #18 on this branch — first latency numbers in the program)
Three headline findings:
All byte figures and equivalence unchanged from run #17 (exit 0).
Checks run
cargo fmt --all --check,cargo clippy --all-targets --all-features -- -D warnings(workspace-wide),cargo nextest run -p ourios-bench(140 passed). Pre-merge bench: run #18 (29210202343), exit 0, six pairs, equivalence held.🤖 Generated with Claude Code
https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y