pub fn plan_by_source_bytes(
range: TimeRange,
bytes: &(dyn Fn(TimeRange) -> i64 + Sync),
cap: i64,
) -> Vec<PlannedBucket>Expand description
Tiles range with buckets that each cover at most cap source bytes (as measured by
bytes), except at the finest rung, where a bucket is emitted whatever its size. The
result is ascending and has no gap.
The range is first cut into the coarsest aligned ladder buckets that fit it, then every bucket
over the cap splits into its finer children, down to LADDER[0]. Source bytes alone decide, so
a dense range does not probe each intermediate rung. A part of the range narrower than
LADDER[0] at its edges (a unit grown around rows can end off the minute grid) is emitted as
one leaf over its exact range, at LADDER[0].
closed, nb_blocks and nb_objects of the result are placeholders for the caller to fill.