| 366 | } |
| 367 | |
| 368 | type ToolStats struct { |
| 369 | TotalCalls int |
| 370 | Successes int |
| 371 | Failures int |
| 372 | ConsecutiveFails int |
| 373 | AvgLatency time.Duration |
| 374 | AvgCost float64 |
| 375 | LastUsed time.Time |
| 376 | LastErrorType ErrorType |
| 377 | } |
| 378 | |
| 379 | func (ts *ToolStats) SuccessRate() float64 { |
| 380 | if ts.TotalCalls == 0 { |
nothing calls this directly
no outgoing calls
no test coverage detected