Page MenuHomePhabricator

Add "consistently interactive" metric to WebPageTest data
Closed, ResolvedPublic


Blocking reflows, repaints, and other uninterrupted JavaScript execution has a negative impact on user-perceived performance.

Offsite 2016:

Let's make sure we're aware of blocking code in the main thread that causes scroll not to be smooth. Especially during the first view seconds of page load it is critical that we have a smooth scroll for the content loaded thus far.

Offsite 2017:

For RUM data, we can consider the Long Task API (T168293). This task, however, is about detecting this for page views from our WebPageTest runs. This would most likely involve some kind of analysis on the DevTools timeline collected from the browser.

Prior work:

Event Timeline

ori raised the priority of this task from to Medium.
ori updated the task description. (Show Details)
ori added subscribers: Peter, gerritbot, ori and 2 others.

Hmm isn't that Speed Index? I'm thinking we should try out something like

Krinkle renamed this task from Measure page jitter to Measure time to first possible smooth scroll.Dec 7 2016, 7:40 PM
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.

This is another take, maybe coming to WebPageTest: it will not be scroll but it will more be "time to ready" & and content ready?

Krinkle renamed this task from Measure time to first possible smooth scroll to Add "consistently interactive" metric to WebPageTest data.Sep 13 2017, 11:37 AM
Krinkle added a project: WebPageTest.
Krinkle updated the task description. (Show Details)

The TTI isn't working for us on our Windows agent, and it seems that it is not only we that have the problem:

When I deploy a fresh Linux agent it works. Deploy a new Windows agent do not work.

Change 378069 had a related patch set uploaded (by Phedenskog; owner: Phedenskog):
[performance/WebPageTest@master] Collect LastInteractive = TTI

Change 378069 merged by jenkins-bot:
[performance/WebPageTest@master] Collect LastInteractive = TTI

I've added a graph in the drilldown dashboard:

Today we only fetch LastInteractive:

This is Pats definition of the metrics:

FirstInteractive - First period after render where the page was interactive for 5 seconds
TimeToInteractive - Also known as consistently interactive in Lighthouse speak and waits for the js to finish loading and then 5 seconds of interactivity (can fire WAY late in some cases)
LastInteractive - Measured from the end of the test, whatever the last point where it was interactive was
TTIMeasurementEnd - The end time of the timeline data

I cannot find the other ones in our example JSON, let me do fresh run and verify that they really exists.

Running in the test instance (setting up a new one) generates no TTI at all, I'll try now with a small Linux instance.

Change 405693 had a related patch set uploaded (by Phedenskog; owner: Phedenskog):
[performance/WebPageTest@master] Collect FirstInteractive and TimeToInteractive.

Change 405693 merged by jenkins-bot:
[performance/WebPageTest@master] Collect FirstInteractive and TimeToInteractive.

Peter changed the task status from Open to Stalled.Jan 26 2018, 9:07 AM

This is done now but will not work until we switch the WPT client to run on Linux. We just wait on that, then verify that the metrics are there, add them to the graphs and close this ticket.

Hmm have this changed upstream? We only have last interactive (again) or is it a statsv thing? First Interactive and Time to interactive metrics is gone.

Yep it seems to have been changed in WebPageTest:

"TTIMeasurementEnd": 4875,
"LastInteractive": 2598,

is the ones I see when I getting from our server. And before we had FirstInteractive and TimeToInteractive. Let me go through the commit log of the WPTAgent and see what has changed.

Trying the simplest solution by disabling calculating the agent in the settings.ini:


I can see the code on the server side, so let us try if that works.

Imarlier added a subscriber: Imarlier.

At this point, the metric definition isn't fleshed out enough to be usable. We'll revisit when there's a better definition.