MCPcopy Create free account
hub / github.com/adobe/react-spectrum / median

Function median

perf/report.mjs:98–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97 let observed = samples.filter(sample => sample.metrics.longFrames);
98 let median = metric =>
99 observed.length
100 ? ms(
101 percentile(
102 observed.map(sample => sample.metrics[metric]),
103 0.5
104 )
105 )
106 : '—';
107 rows.push(
108 `| ${scenario.id} / ${arm} | ${observed.length}/${samples.length} | ${observed.length ? ms(Math.max(...observed.map(sample => sample.metrics.longFrameMax))) : 'none reported'} | ${median('longFrameBlocking')} | ${median('longFrameScript')} | ${median('longFrameStyleLayout')} | ${median('longFrameForcedLayout')} | ${topInvoker(observed)} |`
109 );

Callers 4

longFrameRowsFunction · 0.85
compareFunction · 0.85
launchSectionFunction · 0.85
reportFunction · 0.85

Calls 3

percentileFunction · 0.85
msFunction · 0.70
filterMethod · 0.65

Tested by

no test coverage detected