MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / execute

Method execute

benchmarks/src/workloads/sleep.py:60–72  ·  view source on GitHub ↗
(self, env: DaskEnvironment)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

measure_dask_tasksFunction · 0.85

Tested by

no test coverage detected