Get current error statistics. Returns: Dictionary with error statistics
(self)
| 352 | self.total_errors += 1 |
| 353 | |
| 354 | def get_stats(self) -> dict: |
| 355 | """Get current error statistics. |
| 356 | |
| 357 | Returns: |
| 358 | Dictionary with error statistics |
| 359 | """ |
| 360 | return { |
| 361 | 'total_errors': self.total_errors, |
| 362 | 'error_breakdown': self.error_counts.copy(), |
| 363 | 'top_errors': sorted( |
| 364 | self.error_counts.items(), |
| 365 | key=lambda x: x[1], |
| 366 | reverse=True |
| 367 | )[:10] |
| 368 | } |
| 369 | |
| 370 | def reset(self) -> None: |
| 371 | """Reset error statistics.""" |
nothing calls this directly
no outgoing calls
no test coverage detected