MCPcopy Create free account
hub / github.com/ccusage/ccusage / report_from_rows

Function report_from_rows

rust/crates/ccusage/src/adapter/opencode/report.rs:19–28  ·  view source on GitHub ↗
(rows: &[crate::UsageSummary], kind: AgentReportKind)

Source from the content-addressed store, hash-verified

17}
18
19fn 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
30pub(crate) fn agent_summary_json(
31 row: &crate::UsageSummary,

Callers 1

report_jsonFunction · 0.70

Calls 1

agent_summary_jsonFunction · 0.85

Tested by

no test coverage detected