MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / print_model_table

Function print_model_table

src/cost_cmd.rs:110–127  ·  view source on GitHub ↗
(summary: &CostSummary)

Source from the content-addressed store, hash-verified

108}
109
110fn print_model_table(summary: &CostSummary) {
111 let total = summary.total_cost.max(0.001);
112 println!(
113 " {:<24} {:>10} {:>10} {:>6}",
114 "Model", "Cost", "Tokens", "Share"
115 );
116 for (model, cost, tokens) in &summary.by_model {
117 let share = cost / total * 100.0;
118 let token_count = tracedecay::display::format_token_count(*tokens);
119 println!(
120 " {:<24} {:>9} {:>10} {:>5.0}%",
121 model,
122 format!("${cost:.2}"),
123 token_count,
124 share
125 );
126 }
127}
128
129fn print_task_table(summary: &CostSummary) {
130 println!(" {:<16} {:>10} {:>6}", "Category", "Cost", "Turns");

Callers 1

print_cost_summaryFunction · 0.85

Calls 1

format_token_countFunction · 0.85

Tested by

no test coverage detected