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

Function classify

perf/trace.mjs:38–52  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

36]);
37
38function classify(name) {
39 if (/GC/.test(name)) {
40 return 'gc';
41 }
42 if (script.has(name) || name.startsWith('v8.')) {
43 return 'script';
44 }
45 if (style.has(name)) {
46 return 'style';
47 }
48 if (layout.has(name)) {
49 return 'layout';
50 }
51 return paint.has(name) ? 'paint' : null;
52}
53
54// Splits the renderer main thread's time inside the `bench:window` measure into
55// script, style, layout, paint, GC, and other work, attributing each moment to the

Callers 1

visitFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected