Live demo
5,000 tool calls in. 788 out.
5,000 calls to search_orders under a 30s timeout. 788 of them were still running when the config gave up. Kaplan-Meier treats those as censored, not as slow, and reads off the second at which another second of waiting stops paying.
| Waited | Still running | Calls at risk | Completes in next 1s | 95% upper | Verdict | |
|---|---|---|---|---|---|---|
| 1s | 68.2% | 3,441 | 52.4% | 54.1% | wait | |
| 2s | 32.5% | 1,627 | 34.5% | 36.8% | wait | |
| 3s | 21.3% | 1,066 | 18.0% | 20.4% | wait | |
| 4s | 17.4% | 874 | 6.1% | 7.9% | wait | |
| 5s | 16.4% | 819 | 2.0% | 3.1% | wait | |
| 6s | 16.1% | 803 | 0.9% | 1.8% | stop | |
| 7s | 15.9% | 796 | 0.9% | 1.8% | stop | |
| 8s | 15.8% | 789 | 0.0% | 0.5% | stop | |
| 10s | 15.8% | 789 | 0.1% | 0.7% | stop | |
| 15s | 15.8% | 788 | 0.0% | 0.5% | stop | |
| 20s | 15.8% | 788 | 0.0% | 0.5% | stop |
788 hung calls in this window paid 23,640s of wait. At 6s they pay 4,728s, and 0.4% of completing calls get cut to buy that.
The other number people reach for. It is a quantile of the calls that came back, so it cuts 1.0% of good calls by construction, whether or not anything is hanging, and it says nothing about the 15.8% that never return. Kaplan-Meier cuts 0.4% here because it can see that the curve has gone flat.
The method assumes the calls that hit the timeout were hangs, not slow completions. If they were slow completions, the curve would keep sloping between ten seconds and the timeout instead of going flat at 15.8%. It went flat.