Page MenuHomePhabricator

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

Description

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:

Details

Related Gerrit Patches:
performance/WebPageTest : masterCollect FirstInteractive and TimeToInteractive.
performance/WebPageTest : masterCollect LastInteractive = TTI

Event Timeline

ori created this task.Oct 15 2015, 2:39 PM
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.
Peter added a comment.Nov 9 2015, 2:07 PM

Hmm isn't that Speed Index? I'm thinking we should try out something like https://github.com/axemclion/perfjankie

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.
Peter added a comment.Dec 13 2016, 7:42 AM

This is another take, maybe coming to WebPageTest: https://github.com/WPO-Foundation/webpagetest/issues/781 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)
Peter updated the task description. (Show Details)Sep 14 2017, 8:15 AM
Peter added a comment.Sep 14 2017, 8:39 AM

The TTI isn't working for us on our Windows agent, and it seems that it is not only we that have the problem: https://github.com/WPO-Foundation/webpagetest/issues/907

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

https://gerrit.wikimedia.org/r/378069

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

https://gerrit.wikimedia.org/r/378069

I've added a graph in the drilldown dashboard:

Peter added a comment.Jan 22 2018, 9:24 AM

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.

https://gerrit.wikimedia.org/r/405693

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

https://gerrit.wikimedia.org/r/405693

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.

Peter added a comment.Mar 19 2018, 1:07 PM

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.

Peter added a comment.Apr 5 2018, 7:22 AM

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

enable_agent_processing=0

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

Imarlier closed this task as Resolved.Jun 21 2018, 9:15 AM
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.