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 that records the timing never runs, the exception propagates, and the one call that was probably slowest — the one that failed —...
🛡️ VERIFIED CYBER INTELLIGENCE ID: #3665967