(summary: &CostSummary)
| 108 | } |
| 109 | |
| 110 | fn 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 | |
| 129 | fn print_task_table(summary: &CostSummary) { |
| 130 | println!(" {:<16} {:>10} {:>6}", "Category", "Cost", "Turns"); |
no test coverage detected