MCPcopy Create free account
hub / github.com/modem-dev/hunk / formatDeltaPercent

Function formatDeltaPercent

scripts/compare-release-benchmarks.ts:282–289  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

280}
281
282function formatDeltaPercent(value: number) {
283 if (!Number.isFinite(value)) {
284 return "+∞";
285 }
286
287 const sign = value > 0 ? "+" : "";
288 return `${sign}${(value * 100).toFixed(1)}%`;
289}
290
291function formatUnit(unit: BenchmarkMetricResult["unit"]) {
292 return unit === "bytes" ? "B" : unit;

Callers 1

formatComparisonMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected