Method
record
(self, success: bool, duration: float, error_type: str)
Source from the content-addressed store, hash-verified
| 80 | return self.total_duration / self.total_attempts |
| 81 | |
| 82 | def record(self, success: bool, duration: float, error_type: str): |
| 83 | self.total_attempts += 1 |
| 84 | if success: |
| 85 | self.successes += 1 |
| 86 | else: |
| 87 | self.failures += 1 |
| 88 | self.total_duration += duration |
| 89 | self.last_used = datetime.now().isoformat() |
| 90 | self.error_breakdown[error_type] += 1 |
| 91 | |
| 92 | def to_dict(self) -> Dict: |
| 93 | return { |
Tested by
no test coverage detected