MCPcopy Create free account
hub / github.com/dask/dask / _posttask

Method _posttask

dask/cache.py:55–62  ·  view source on GitHub ↗
(self, key, value, dsk, state, id)

Source from the content-addressed store, hash-verified

53 self.starttimes[key] = default_timer()
54
55 def _posttask(self, key, value, dsk, state, id):
56 duration = default_timer() - self.starttimes[key]
57 deps = state["dependencies"][key]
58 if deps:
59 duration += max(self.durations.get(k, 0) for k in deps)
60 self.durations[key] = duration
61 nb = self._nbytes(value) + overhead + sys.getsizeof(key) * 4
62 self.cache.put(key, value, cost=duration / nb / 1e9, nbytes=nb)
63
64 def _finish(self, dsk, state, errored):
65 self.starttimes.clear()

Callers

nothing calls this directly

Calls 2

maxFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected