End timing a build command
(self, command_name)
| 40 | self.logger(f"Starting '{command_name}' at {datetime.now().strftime('%H:%M:%S')}") |
| 41 | |
| 42 | def end_command(self, command_name): |
| 43 | """End timing a build command""" |
| 44 | if command_name in self.start_times: |
| 45 | end_time = time.time() |
| 46 | duration = end_time - self.start_times[command_name] |
| 47 | self.command_times[command_name] = { |
| 48 | 'start_time': self.start_times[command_name], |
| 49 | 'end_time': end_time, |
| 50 | 'duration': duration, |
| 51 | 'timestamp': datetime.now().isoformat() |
| 52 | } |
| 53 | self.logger(f"'{command_name}' completed in {duration:.2f} s") |
| 54 | |
| 55 | def start_component(self, component_name, platform=None): |
| 56 | """Start timing an engine component build""" |
no test coverage detected