struct PostingCensus {
rows: u64,
logical: u64,
puts: u64,
deletes: u64,
malformed: u64,
coarse_puts: u64,
fine_incidences: u64,
levels: BTreeMap<u8, LevelTally>,
terms: HashSet<Vec<u8>>,
seen: HashSet<Vec<u8>>,
window: Option<WindowState>,
}Expand description
Read-only census of one O-axis geo posting store, folded from decoded rows in walk (key) order. Answers the window-estimate decomposition questions at the source: which S2 levels the coverer actually produced, how much L9–L10 expansion mass the stats histogram carries, how large the envelope-bearing (AABB-skippable) population is, and the cells-per-term multiplicity the drain’s distinct seen-set collapses.
Fields§
§rows: u64Raw rows walked, all versions.
logical: u64Distinct (cell, term) logical keys (versions collapse).
puts: u64Logical keys whose newest version is a Put.
deletes: u64Logical keys whose newest version is a Delete.
malformed: u64Distinct cell ids geo_cell_level could not decode (the stats
collector ignores these rows the same way).
coarse_puts: u64Levels 0–8 Put postings — the histogram’s native-id coarse map
(the count-once rung; the floor is
GEO_HISTOGRAM_COARSE_FLOOR_LEVEL).
fine_incidences: u64The fine map’s total bucket incidences.
levels: BTreeMap<u8, LevelTally>Per-level tallies (levels with at least one logical key).
terms: HashSet<Vec<u8>>Distinct encoded terms among Put postings — the drain’s distinct candidate analog (one geometry files under many cells but emits once per window).
seen: HashSet<Vec<u8>>Logical keys already counted. Rows arrive newest-version-first in key order on both backends, so the first sight of a key carries its newest op.
window: Option<WindowState>--window state: absent outside the window mode.
Implementations§
Source§impl PostingCensus
impl PostingCensus
Sourcefn consider(&mut self, posting: &GeoIndexPut)
fn consider(&mut self, posting: &GeoIndexPut)
Fold one decoded row. Feed in walk (key) order.
Sourcefn report(&self, dir: &Path)
fn report(&self, dir: &Path)
Print the report: one line per occupied level plus the populations the stats histogram derives from them.
Sourcefn report_window(
&self,
dir: &Path,
shape: &WindowQueryShape,
window: &WindowState,
)
fn report_window( &self, dir: &Path, shape: &WindowQueryShape, window: &WindowState, )
--window report: the estimator’s ladder decomposition over the
postings-exact histogram and the drain truth over the same
intervals — the two numbers whose gap IS the window over-count.
Trait Implementations§
Source§impl Debug for PostingCensus
impl Debug for PostingCensus
Source§impl Default for PostingCensus
impl Default for PostingCensus
Source§fn default() -> PostingCensus
fn default() -> PostingCensus
Auto Trait Implementations§
impl Freeze for PostingCensus
impl RefUnwindSafe for PostingCensus
impl Send for PostingCensus
impl Sync for PostingCensus
impl Unpin for PostingCensus
impl UnsafeUnpin for PostingCensus
impl UnwindSafe for PostingCensus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].