(name)
| 36 | ]); |
| 37 | |
| 38 | function 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 |