question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

report generated from Lighthouse command line does not contain user timing marks and measures

See original GitHub issue

Lighthouse version: 4.2.0 NPM version: 6.4.1 Node version: 10.13.0 NG version: 6.2.8

Provide the steps to reproduce

  1. run lighthouse from command line to generate performance report on http://localhost:4200/boc-operations/edit/15001900007 lighthouse http://localhost:4200/boc-operations/edit/15001900007 --port 59020 --output json --output-path=perf-moi-list.json --preset=perf --view --throttling-method provided --disable-storage-reset true --emulated-form-factor desktop --max-wait-for-load 5000

What is the current behavior?

in the generated report, user timing marks and measures in my applications are missing. However, the report generated from running Lighthouse in Chrome DevTools contains the marks and measures.

What is the expected behavior?

I have following code in my component window.performance.mark('product-list-init') the report should contain the user timing item such as: { "name": "product-list-init", "startTime": 578.116, "timingType": "Mark" }

Environment Information

  • Affected Channels: CLI
  • Lighthouse version: 4.2.0
  • Node.js version: 10.13.0
  • Operating System: Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Mar 19, 2019

Glad you figured it out! max-wait-for-load at 5000 is very short. It means “hey lighthouse, it doesn’t matter if the page looks like it still needs to load, give up after 5s of waiting and start auditing anyway”.

It sounds like this is the total opposite of what you want, so I’m not sure what prompted that argument but you should definitely make that number larger. If you want to wait even longer, then you can create a custom config and in the defaultPass set the pauseAfterLoadMs to some high number such that you are sure the page is done loading.

1reaction
greengalaxy2016commented, Mar 19, 2019

@patrickhulce from the rendering path of the report, I am sure the report is NOT on the login page, but on the specified page. I can also see when lighthouse is running, it does log in and navigate to the specified page. Actually, after a close look at the report from CLI, I saw the difference: the page was not fully loaded when lighthouse is complete. that was why the marks are not included in the report. so the question is: I set the --max-wait-for-load as 5000 to wait for Login page to done with loading, how to set another wait time for the specified page to be done loading so that lighthouse won’t complete before the page is done loading? Thanks very much! You can close the ticket as you please

Read more comments on GitHub >

github_iconTop Results From Across the Web

User Timing marks and measures - Chrome Developers
How Lighthouse reports User Timing data. When your app uses the User Timing API to add marks (that is, time stamps) and measures...
Read more >
Google Lighthouse custom audits tutorial - Aymen Loukil
User Timing API offers some useful methods to mark and measure many events in a webpage. For this tutorial, we will just use...
Read more >
Processing Lighthouse Reports from the Command Line
Save time and improve the efficiency of your site speed analysis by processing Chrome Lighthouse audits on the command line with our step...
Read more >
Lighthouse Optimizations - User Timing Marks and Measures
The User Timing API is a way for web developers to measure and understand how web applications are performing within the context of...
Read more >
User Timing API (Custom Timing): the most relevant ...
As marks duration always get a 0 value (a mark has no duration), measures duration corresponds to the difference between the ending and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found