From 529c4d4d0e327cd4ab2974432a4a86459362c8d1 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 27 Jun 2026 20:21:17 +0900 Subject: [PATCH] chore(dev): tweak heap snapshot table --- .github/scripts/heap-snapshot-util.mts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/heap-snapshot-util.mts b/.github/scripts/heap-snapshot-util.mts index be105de45d..c99ce5f441 100644 --- a/.github/scripts/heap-snapshot-util.mts +++ b/.github/scripts/heap-snapshot-util.mts @@ -63,20 +63,20 @@ export function renderHeapSnapshotTable(base: HeapSnapshotReport, head: HeapSnap const percent = summary.median * 100 / baseValue; if (category === 'total') { - const deltaMedian = `${util.formatDeltaBytes(summary.median, 1000)}
${util.formatDeltaPercent(percent, 0.1).replaceAll('\\%', '\\\\%')}`; + const deltaMedian = `${util.formatDeltaBytes(summary.median, 100000)}
${util.formatDeltaPercent(percent, 0.1).replaceAll('\\%', '\\\\%')}`; const baseText = `${util.formatBytes(baseValue)}
± ${util.formatBytes(baseSpread)}`; const headText = `${util.formatBytes(headValue)}
± ${util.formatBytes(headSpread)}`; const metricText = `$\\color{${heapSnapshotCategory[category].color}}{\\rule{8pt}{8pt}}$ **${heapSnapshotCategory[category].label}**`; - lines.push(`| ${metricText} | ${baseText} | ${headText} | ${deltaMedian} | ${util.formatBytes(summary.mad)} | ${util.formatDeltaBytes(summary.min, 1000)} | ${util.formatDeltaBytes(summary.max, 1000)} |`); + lines.push(`| ${metricText} | ${baseText} | ${headText} | ${deltaMedian} | ${util.formatBytes(summary.mad)} | ${util.formatDeltaBytes(summary.min, 100000)} | ${util.formatDeltaBytes(summary.max, 100000)} |`); lines.push('| | | | | | | |'); } else { - const deltaMedian = util.formatDeltaBytes(summary.median, 1000); + const deltaMedian = util.formatDeltaBytes(summary.median, 100000); const baseText = util.formatBytes(baseValue); const headText = util.formatBytes(headValue); const basePercent = util.formatPercent((baseValue * 100) / baseTotal); const headPercent = util.formatPercent((headValue * 100) / headTotal); const metricText = `
$\\color{${heapSnapshotCategory[category].color}}{\\rule{8pt}{8pt}}$ **${heapSnapshotCategory[category].label}**${basePercent} → ${headPercent}
`; - lines.push(`| ${metricText} | ${baseText} | ${headText} | ${deltaMedian} | ${util.formatBytes(summary.mad)} | ${util.formatDeltaBytes(summary.min, 1000)} | ${util.formatDeltaBytes(summary.max, 1000)} |`); + lines.push(`| ${metricText} | ${baseText} | ${headText} | ${deltaMedian} | ${util.formatBytes(summary.mad)} | ${util.formatDeltaBytes(summary.min, 100000)} | ${util.formatDeltaBytes(summary.max, 100000)} |`); } }