(self, env: DaskEnvironment)
| 58 | return "sleep-spawn" |
| 59 | |
| 60 | def execute(self, env: DaskEnvironment) -> WorkloadExecutionResult: |
| 61 | from distributed import Client |
| 62 | |
| 63 | def run(client: Client): |
| 64 | def sleep(duration: float): |
| 65 | import subprocess |
| 66 | |
| 67 | subprocess.run([self.sleep_bin, str(duration)]) |
| 68 | |
| 69 | tasks = [client.submit(sleep, self.sleep_duration, pure=False) for _ in range(self.task_count)] |
| 70 | client.gather(tasks) |
| 71 | |
| 72 | return measure_dask_tasks(env, run) |
nothing calls this directly
no test coverage detected