(rows: &[crate::UsageSummary], kind: AgentReportKind)
| 17 | } |
| 18 | |
| 19 | fn report_from_rows(rows: &[crate::UsageSummary], kind: AgentReportKind) -> Value { |
| 20 | let rows_json = rows |
| 21 | .iter() |
| 22 | .map(|row| agent_summary_json(row, kind, false)) |
| 23 | .collect::<Vec<_>>(); |
| 24 | json!({ |
| 25 | rows_key(kind): rows_json, |
| 26 | "totals": totals_json(rows), |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | pub(crate) fn agent_summary_json( |
| 31 | row: &crate::UsageSummary, |
no test coverage detected