Building a Timing Utility That Can't Corrupt Its Own Stats — Even When Your Code Throws
🔒
https://dev.to
«Most ad-hoc timing code in Python looks like this:
start = time.perf_counter()
result = do_work()
elapsed = time.perf_counter() - start
stats[name].append(elapsed)
It works, until do_work() raises. Then the line...»
Automatische Weiterleitung...
1.5s