(self, error_type: str)
| 65 | self.response_times.append(response_time_ms) |
| 66 | |
| 67 | def record_failure(self, error_type: str): |
| 68 | with self.lock: |
| 69 | self.total_requests += 1 |
| 70 | self.failed_requests += 1 |
| 71 | if error_type == "connection": |
| 72 | self.connection_errors += 1 |
| 73 | elif error_type == "timeout": |
| 74 | self.timeout_errors += 1 |
| 75 | else: |
| 76 | self.other_errors += 1 |
| 77 | |
| 78 | |
| 79 | def start_server(config: StressTestConfig) -> subprocess.Popen[str]: |