Skip to main content

query_breakdown

Function query_breakdown 

Source
pub fn query_breakdown(
    conn: &Connection,
    filter: &AnalyticsFilter,
    dim: Dim,
    metric: Metric,
    limit: usize,
) -> AnalyticsResult<BreakdownResult>
Expand description

Run a breakdown query: aggregate one metric by a chosen dimension.

Returns rows ordered by the metric value descending, capped at limit. This answers questions like “which agent uses the most tokens?” or “which workspace has the most tool calls?”.