Total Blocking Time (TBT)
Collected from: Web Browser (Long Task API + simple algorithm)
Total Blocking Time (TBT) measures the total amount of time that a page is blocked from responding to user input (clicks, keyboard presses, etc) after the page has started to render content.
Total Blocking Time calculation is based on the Long Tasks. A Long Task is a treatment that monopolizes web browser for a while (>50 milliseconds) and blocks other critical tasks from being executed (e.g. reacting to user input).
The Total Blocking Time is a sum, computed by adding the blocking portion of all Long Tasks between First Contentful Paint and Time to (Consistently) Interactive. The blocking portion of the long task is the duration in excess of 50 ms.
Example of a page loading with 3 long tasks:
[longtask 1: 55 ms] FCP [longtask 2: 110 ms] [longtask 3: 200 ms] TTI
- longtask 1 is ignored as occurring prior to the FCP
- blocking portion of long task 2 is 60 ms (110 - 50).
- blocking portion of long task 3 is 150 ms (200 - 50).
The Total Blocking Time thus is 210 ms (60 + 150).