MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / measure

Function measure

src/ifcopenshell-python/ifcopenshell/draw.py:678–683  ·  view source on GitHub ↗
(task, fn)

Source from the content-addressed store, hash-verified

676 times = []
677
678 def measure(task, fn):
679 t0 = time.time()
680 r = fn()
681 dt = time.time() - t0
682 times.append((task, dt))
683 return r
684
685 def print_progress(*args):
686 print("\r", *args, " " * 10, end="", flush=True)

Callers 1

draw.pyFile · 0.85

Calls 2

fnFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected