-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: compute TBT impact for main thread tasks #15175
Conversation
@@ -60,7 +60,7 @@ class TotalBlockingTime extends ComputedMetric { | |||
timing: calculateSumOfBlockingTime( | |||
events, | |||
0, | |||
data.processedTrace.timestamps.traceEnd | |||
data.processedTrace.timings.traceEnd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this is a bug, but doesn't affect anything in practice. Timespan should just calculate the blocking time for the entire trace anyway.
@@ -41,7 +41,6 @@ | |||
"core/test/config/config-plugin-test.js", | |||
"core/test/legacy/config/config-test.js", | |||
"core/test/config/default-config-test.js", | |||
"core/test/create-test-trace.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type checking the new test file requires this to be type checked as well, so there are some changes to artifacts.d.ts
and create-test-trace.js
so it passes the type check.
As mentioned here, some long tasks that appear in the trace are not added to TBT because they are outside the bounds of TBT (Starting at FCP and ending at TTI).
This PR adds a computed artifact to calculate the impact each individual main thread task has on TBT. A downstream performance audit will use this to calculate the TBT savings for main thread tasks that are in scope for that audit. I expect to use this to calculate TBT savings in the following audits: