diff --git a/cli/run/timings.ts b/cli/run/timings.ts index 4b4fbb400ad..ebc59b3047c 100644 --- a/cli/run/timings.ts +++ b/cli/run/timings.ts @@ -3,10 +3,10 @@ import type { SerializedTimings } from '../../src/rollup/types'; import { bold, underline } from '../../src/utils/colors'; export function printTimings(timings: SerializedTimings): void { - Object.keys(timings).forEach(label => { + Object.entries(timings).forEach(([label, [time, memory, total]]) => { const appliedColor = label[0] === '#' ? (label[1] !== '#' ? underline : bold) : (text: string) => text; - const [time, memory, total] = timings[label]; + const row = `${label}: ${time.toFixed(0)}ms, ${prettyBytes(memory)} / ${prettyBytes(total)}`; console.info(appliedColor(row)); });