Skip to main content

count_pair

Function count_pair 

Source
async fn count_pair(
    api: &Api,
    r: &Rule,
    now: i64,
) -> Result<(f64, usize, Option<usize>, Option<String>), String>
Expand description

Run a rule’s queries and reduce them to one number.

Two scans for a ratio, not one over a superset filtered twice: the terms are AND-ed and the denominator is a different conjunction, so there is no single scan that answers both, and two exact counts beat one estimate.