See the Pen NEqgOr by Daniel James (@danielscottjames) on CodePen.
Analysis Drag the blocks around the screen. You will notice that different blocks stall for different amounts of time while being dragged. We log output every âminuteâ (for the purposes of this demo, I am redefining a minute to be 10 seconds) that looks like this:MINUTE_TAG: {
"blocks_0": 440,
"time_0": 5475700,
"blocks_17": 18,
"time_17": 4890800,
"blocks_50": 16,
"time_50": 4821300,
"blocks_100": 14,
"time_100": 4666900,
"blocks_250": 10,
"time_250": 3947500
}
blocks_X is the number of blocks (we group microtasks with the task theyâre attached to and call it a block) executed this minute that took X or less milliseconds. time_X is the cumulative execution time for these blocks in microseconds. There are a number of conclusions we could draw from this data, such as:
- The total amount of time we spent executing JavaScript during this 10-second window is ~5.5 seconds (time_0).
- The user spent about ~90% of this interactive time getting less than 60 FPS (time_17/time_0).
- The user experienced 10 stalls that lasted a quarter second or longer (blocks_250).
