1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-25 15:35:14 +02:00

Merge branch 'develop' into sp-reaction

This commit is contained in:
syuilo
2026-06-23 12:19:44 +09:00
committed by GitHub

View File

@@ -21,9 +21,10 @@ const phases = [
const metrics = [
'HeapUsed',
'HeapTotal',
'External',
'Pss',
'Private_Dirty',
'VmRSS',
'External',
];
function formatNumber(value) {
@@ -34,11 +35,6 @@ function formatMemory(valueKiB) {
return `${formatNumber(valueKiB / 1024)} MB`;
}
function formatMemoryWithSpread(valueKiB, spreadKiB) {
if (spreadKiB == null) return formatMemory(valueKiB);
return `${formatMemory(valueKiB)} ± ${formatMemory(spreadKiB)}`;
}
function formatPercent(value) {
return `${formatNumber(value)}%`;
}
@@ -115,7 +111,7 @@ function renderTable(base, head, phase) {
const baseSpread = getSampleSpread(base, phase, metric);
const headSpread = getSampleSpread(head, phase, metric);
lines.push(`| ${metric} | ${formatMemoryWithSpread(baseValue, baseSpread)} | ${formatMemoryWithSpread(headValue, headSpread)} | ${formatDiff(baseValue, headValue)} | ${formatDiffPercent(baseValue, headValue)} |`);
lines.push(`| ${metric} | ${formatMemory(baseValue)} <br> ± ${formatMemory(baseSpread)} | ${formatMemory(headValue)} <br> ± ${formatMemory(headSpread)} | ${formatDiff(baseValue, headValue)} | ${formatDiffPercent(baseValue, headValue)} |`);
}
return lines.join('\n');