(n: number)
| 131 | } |
| 132 | |
| 133 | function floatStr(n: number) { |
| 134 | if (!Number.isFinite(n)) { |
| 135 | return `${n > 0 ? '+' : '-'}∞`; |
| 136 | } |
| 137 | |
| 138 | if (Number.isInteger(n)) { |
| 139 | return n.toFixed(0); |
| 140 | } |
| 141 | |
| 142 | if (n > 0.1) { |
| 143 | return n.toFixed(2); |
| 144 | } |
| 145 | |
| 146 | return n.toString(); |
| 147 | } |
| 148 | |
| 149 | function strVal(b: BenchmarkResult): string { |
| 150 | let s = `\`${b.value}\` ${b.unit}`; |
no outgoing calls
no test coverage detected