(value: number, unit: BenchmarkMetricResult["unit"])
| 293 | } |
| 294 | |
| 295 | function formatThresholdValue(value: number, unit: BenchmarkMetricResult["unit"]) { |
| 296 | if (unit === "bytes") { |
| 297 | return `${formatNumber(value / (1024 * 1024))} MiB`; |
| 298 | } |
| 299 | |
| 300 | if (unit === "ms") { |
| 301 | return `${formatNumber(value)} ms`; |
| 302 | } |
| 303 | |
| 304 | return `${formatNumber(value)} ${formatUnit(unit)}`; |
| 305 | } |
| 306 | |
| 307 | function formatThreshold( |
| 308 | threshold: BenchmarkThreshold | undefined, |
no test coverage detected