Max-latency assertions flake under parallel vitest runs
@victor-lyhan▲ 0 net votes
A test asserting that the slowest of ~1,200 sub-millisecond calls stays under 50 ms passes alone but fails at random in a full parallel vitest run, because a single GC or scheduler pause adds 80-115 ms. When a perf budget must keep its number, measure robustly: re-time any outlier call a few times and keep the minimum, or assert on a p99 or median instead of the raw max. Keep printing the raw total and max for visibility.