Skip to content

Commit d3099df

Browse files
afrindclaude
andcommitted
stats: widen object-ack latency histogram tail to 1s
Give object-ack latency its own bucket array starting at 500us and extending through 250ms/500ms/1s, instead of sharing kLatencyBucketsUs which tops out at 100ms. Acks stretch well past 100ms under loss, so the old top bucket swallowed the tail. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 099ac45 commit d3099df

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/stats/StatsRegistry.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ namespace openmoq::moqx::stats {
2626
inline constexpr std::array<uint64_t, 11> kLatencyBucketsUs =
2727
{10, 50, 100, 250, 500, 1000, 2000, 5000, 10000, 50000, 100000};
2828

29+
inline constexpr std::array<uint64_t, 10> kObjectAckLatencyBucketsUs =
30+
{500, 1000, 2000, 5000, 10000, 50000, 100000, 250000, 500000, 1000000};
31+
2932
// RTT buckets in milliseconds (from onRttSample).
3033
inline constexpr std::array<uint64_t, 10> kRttBucketsMs =
3134
{1, 5, 10, 25, 50, 100, 250, 500, 1000, 5000};
@@ -253,7 +256,7 @@ inline constexpr std::array<std::string_view, kResetStreamErrorCodeCount>
253256
X(moqFetchLatency, kLatencyBucketsUs, "microseconds") \
254257
X(moqPublishNamespaceLatency, kLatencyBucketsUs, "microseconds") \
255258
X(moqPublishLatency, kLatencyBucketsUs, "microseconds") \
256-
X(moqObjectAckLatency, kLatencyBucketsUs, "microseconds")
259+
X(moqObjectAckLatency, kObjectAckLatencyBucketsUs, "microseconds")
257260

258261
// QUIC transport histograms — populated by QuicStatsCollector and PicoQuicStatsCollector.
259262
// Per-loop packet fields require an EventBaseStatsCollector loop observer to be wired up.

0 commit comments

Comments
 (0)