Check for available load testing tools.
(self)
| 384 | self._tool = None |
| 385 | |
| 386 | def check_dependencies(self) -> str | None: |
| 387 | """Check for available load testing tools.""" |
| 388 | for tool in ['wrk', 'ab']: |
| 389 | try: |
| 390 | subprocess.run([tool, '--version'], capture_output=True, |
| 391 | check=False) |
| 392 | return tool |
| 393 | except FileNotFoundError: |
| 394 | continue |
| 395 | return None |
| 396 | |
| 397 | def warmup(self, requests: int = 10): |
| 398 | """Warm up the server.""" |