Record command execution time.
(self, command: CommandBase, elapsed_ms: float)
| 286 | self.slow_commands = [] |
| 287 | |
| 288 | def record_execution(self, command: CommandBase, elapsed_ms: float): |
| 289 | """Record command execution time.""" |
| 290 | self.execution_times.append(elapsed_ms) |
| 291 | |
| 292 | if elapsed_ms > 100: # NFR1 threshold |
| 293 | self.slow_commands.append({ |
| 294 | 'command': command.get_description(), |
| 295 | 'time_ms': elapsed_ms, |
| 296 | 'timestamp': time.time() |
| 297 | }) |
| 298 | |
| 299 | def get_average_execution_time(self) -> float: |
| 300 | """Get average execution time in milliseconds.""" |
no test coverage detected