高权重:提交固定类型(TASK_CMD/高优先级)的请求。
(self)
| 78 | |
| 79 | @task(5) |
| 80 | def submit_fixed_request(self): |
| 81 | """高权重:提交固定类型(TASK_CMD/高优先级)的请求。""" |
| 82 | payload = _fixed_payload() |
| 83 | with self.client.post( |
| 84 | "/api/request", |
| 85 | json=payload, |
| 86 | catch_response=True, |
| 87 | name="/api/request[fixed]", |
| 88 | ) as resp: |
| 89 | if resp.status_code not in (200, 400, 429): |
| 90 | resp.failure(f"Unexpected status: {resp.status_code}") |
| 91 | else: |
| 92 | resp.success() |
| 93 | |
| 94 | @task(3) |
| 95 | def submit_random_request(self): |
nothing calls this directly
no test coverage detected