pub const STATS_WIRE_BUDGET_BYTES: usize = _; // 3_145_728usizeExpand description
Serialized-size ceiling for one profile crossing the wire
(GetStatsProfile), with headroom under the 4 MiB gRPC message limit
for response framing.
Core budget: fixed parts + CMS + exact maps + the per-predicate HLL
pairs, ranked largest-exact-count first. The geo cell-count histogram
and temporal histogram no longer carve into this budget — each rides
its own transport frame with its own budget (GetGeoHistogram
fine/coarse, GetTemporalHistogram), so the core budget spends
entirely on the hexastore sketches.
The exact predicate/class maps and the per-predicate HLL pairs both
grow with the predicate namespace, but at very different rates: 24
B/entry for the exact maps versus ~8.2 KB/predicate for HLL pairs at
precision 12 — ~340× faster. The HLL pairs cross this wire budget at
a few hundred predicates and the gRPC message ceiling itself at ~500;
the exact maps alone would need ~170k predicates to reach the
ceiling, far past the architecture’s bounded-predicate-namespace
assumption (a dataset that pathological also breaks
StatsProfile::capped_for_wire, which never trims the fixed
parts). The exact counts are load-bearing regardless: they rank the
HLL retention, and the estimator’s HLL fan-out path requires a
present exact count, so dropping them would neuter the sketches that
are kept.