Lighthouse: Is there a way to measure FPS while the page scrolling?

Created on 10 Apr 2018  ·  3Comments  ·  Source: GoogleChrome/lighthouse

I search many source files, issues, docs in this repo, still can't find a way to measure FPS(Frames Per Second) while the page scrolling. Any ideas?
Thanks for your patience.

needs-more-info question

All 3 comments

This might be interesting to measure. Especially mobile when JavaScript heavy code is executed on onscroll handler which might lead to laggy user experience.

You could check whether requestIdleCallback() is used for example with graceful downgrade to requestAnimationFrame() if first is not available.

Folks on the Chrome team have been working on improved metrics for this. The current proposal: LatencyInfo Based Frame Metrics

These aren't yet available, however. Still in development.
One could attempt to gather a rough approximate "scrolling smoothness" metric, but it will have weaknesses.

Can I ask how you'd like to write this test? Are you interested in mobile or desktop? Scrolling/flinging the page or a specific overflow container? Would you like to define how fast the scroll is, or should we choose defaults so it's normalized for everyone?

Ref #1648 as that's the upstream issue.

I resolved this problem by adding those commands to chrome flags

  • --show-fps-counter
  • --enable-logging
  • --v=1
  • --vmodule="head*=1"

those commands make chrome outputting page's FPS to log file, I just need to parse it.Thank you, guys.

Was this page helpful?
0 / 5 - 0 ratings