MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / record

Method record

core/strategy_tracker.py:82–90  ·  view source on GitHub ↗
(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 {

Callers 1

record_attemptMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected