* Print cost summary after an E2E test.
(label: string, result: { costEstimate: { turnsUsed: number; estimatedTokens: number; estimatedCost: number }; duration: number })
| 138 | * Print cost summary after an E2E test. |
| 139 | */ |
| 140 | function logCost(label: string, result: { costEstimate: { turnsUsed: number; estimatedTokens: number; estimatedCost: number }; duration: number }) { |
| 141 | const { turnsUsed, estimatedTokens, estimatedCost } = result.costEstimate; |
| 142 | const durationSec = Math.round(result.duration / 1000); |
| 143 | console.log(`${label}: $${estimatedCost.toFixed(2)} (${turnsUsed} turns, ${(estimatedTokens / 1000).toFixed(1)}k tokens, ${durationSec}s)`); |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Dump diagnostic info on planted-bug outcome failure (decision 1C). |
no outgoing calls
no test coverage detected