Skip to main content

build

Function build 

Source
pub fn build(
    rows: &[Row],
    catalog: &Catalog,
    plan_id: &str,
    now_ms: i64,
    since_override: Option<i64>,
) -> Report
Expand description

Build the report: window totals plus a per-model breakdown for the period.

plan_id selects which Go plan’s per-model allowances the figures are measured against (the store records no subscription, so the caller chooses); since_override pins the period start (from --period-start); otherwise the anniversary heuristic in month_start applies. Rows before the period are anniversary evidence only — never listed — so the table and the totals agree.