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

Function measure_dask_tasks

benchmarks/src/workloads/utils.py:108–117  ·  view source on GitHub ↗
(env: Environment, submit_fn: Callable[["distributed.Client"], None])

Source from the content-addressed store, hash-verified

106
107
108def measure_dask_tasks(env: Environment, submit_fn: Callable[["distributed.Client"], None]) -> WorkloadExecutionResult:
109 from ..environment.dask import DaskEnvironment
110
111 assert isinstance(env, DaskEnvironment)
112 logging.debug("[Dask] Submitting")
113
114 timer = Timings()
115 with timer.time():
116 submit_fn(env.get_client())
117 return create_result(timer.duration())
118
119
120def create_result(duration: float) -> WorkloadExecutionResult:

Callers 4

computeMethod · 0.90
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85

Calls 5

timeMethod · 0.95
durationMethod · 0.95
TimingsClass · 0.85
create_resultFunction · 0.85
get_clientMethod · 0.80

Tested by

no test coverage detected