(n: number)
| 56 | |
| 57 | /** Coarse buckets — exact counts are deliberately not collected. */ |
| 58 | export function bucketFileCount(n: number): '<100' | '100-1k' | '1k-10k' | '10k+' { |
| 59 | if (n < 100) return '<100'; |
| 60 | if (n < 1000) return '100-1k'; |
| 61 | if (n < 10000) return '1k-10k'; |
| 62 | return '10k+'; |
| 63 | } |
| 64 | |
| 65 | export function bucketDuration(ms: number): '<10s' | '10-60s' | '1-5m' | '5m+' { |
| 66 | if (ms < 10_000) return '<10s'; |