(n: number)
| 45 | |
| 46 | /** Coarse buckets — exact counts are deliberately not collected. */ |
| 47 | export function bucketFileCount(n: number): '<100' | '100-1k' | '1k-10k' | '10k+' { |
| 48 | if (n < 100) return '<100'; |
| 49 | if (n < 1000) return '100-1k'; |
| 50 | if (n < 10000) return '1k-10k'; |
| 51 | return '10k+'; |
| 52 | } |
| 53 | |
| 54 | export function bucketDuration(ms: number): '<10s' | '10-60s' | '1-5m' | '5m+' { |
| 55 | if (ms < 10_000) return '<10s'; |