MCPcopy Create free account
hub / github.com/modAL-python/modAL / timed_func

Function timed_func

examples/runtime_comparison.py:25–32  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

23 def timer(func):
24
25 def timed_func(*args, **kwargs):
26 start = time()
27 for _ in range(n_reps):
28 result = func(*args, **kwargs)
29 end = time()
30 print("%s has been executed in %f s avg for %d reps" % (func.__name__, (end - start)/n_reps, n_reps))
31 runtime[func.__name__] = (end - start)/n_reps
32 return result
33
34 return timed_func
35

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…