mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: include heapDeltaBytes in perf-report baseline comparison
Add heapDeltaBytes to REPORTED_METRICS so heap regressions appear in baseline diff tables and CI logs alongside taskDurationMs, style recalcs, and layouts. Update formatValue to use formatBytes for human-readable heap delta display. Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10495#discussion_r2985278220
This commit is contained in:
@@ -50,6 +50,7 @@ type MetricKey =
|
||||
| 'eventListeners'
|
||||
| 'totalBlockingTimeMs'
|
||||
| 'frameDurationMs'
|
||||
| 'heapDeltaBytes'
|
||||
const REPORTED_METRICS: { key: MetricKey; label: string; unit: string }[] = [
|
||||
{ key: 'styleRecalcs', label: 'style recalcs', unit: '' },
|
||||
{ key: 'layouts', label: 'layouts', unit: '' },
|
||||
@@ -58,7 +59,8 @@ const REPORTED_METRICS: { key: MetricKey; label: string; unit: string }[] = [
|
||||
{ key: 'scriptDurationMs', label: 'script duration', unit: 'ms' },
|
||||
{ key: 'eventListeners', label: 'event listeners', unit: '' },
|
||||
{ key: 'totalBlockingTimeMs', label: 'TBT', unit: 'ms' },
|
||||
{ key: 'frameDurationMs', label: 'frame duration', unit: 'ms' }
|
||||
{ key: 'frameDurationMs', label: 'frame duration', unit: 'ms' },
|
||||
{ key: 'heapDeltaBytes', label: 'heap delta', unit: 'bytes' }
|
||||
]
|
||||
|
||||
function groupByName(
|
||||
@@ -134,7 +136,9 @@ function computeCV(stats: MetricStats): number {
|
||||
}
|
||||
|
||||
function formatValue(value: number, unit: string): string {
|
||||
return unit === 'ms' ? `${value.toFixed(0)}ms` : `${value.toFixed(0)}`
|
||||
if (unit === 'ms') return `${value.toFixed(0)}ms`
|
||||
if (unit === 'bytes') return formatBytes(value)
|
||||
return `${value.toFixed(0)}`
|
||||
}
|
||||
|
||||
function formatDelta(pct: number | null): string {
|
||||
|
||||
Reference in New Issue
Block a user