# Hook bench split — Tinybench p99 explorer

Dial the workload + load conditions to see why a single absolute wall-clock assertion fails. The same p99 that passes locally fails under coverage + parallel workers — even though throughput is unchanged. Branch: `test/perf-bench-split`

## 1 · Workload

Payload size (KB)
50 KB
Has secret embedded?

## 2 · Runtime environment

Coverage instrumentation
Worker contention
Thermal jitter

## TODAY — absolute test assertion

Threshold
ms

scenario | p99 (ms) | verdict
--- | --- | ---

Failure here means CI blocks the merge — even if the function got no slower.

## AFTER — bench + ratio signal

scenario | p99 (ms) | ratio vs baseline
--- | --- | ---

Ratios cancel hardware/load variance. Catastrophic backtracking shows up as ≥10x.

## Why p99, not max — quick demo

Inject backtracking? (changes regex behaviour)

signal | healthy | backtrack | caught?
--- | --- | --- | ---

`max` moves with every GC pause too — high false-positive rate. `p99` stays put until many samples slow down — strong signal, low false positives.