lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

TTFB and MP-FID missing in debug metrics output

Open shishirm opened this issue 7 years ago • 7 comments

Feature request summary

TTFB and MP-FID don't seem be available in the debug metrics for easy tracking. Is there a good way to capture those aside from (awkwardly) parsing the strings from their audits?

We would ideally want these metrics to be available under lighthouseResult.audits.metrics.details.items[0].

What is the motivation or use case for changing this?

Not including these metrics might have just been an oversight. It will make usability of this a lot easier as opposed to having to parse strings from elsewhere.

How is this beneficial to Lighthouse?

Makes lighthouse results more usable and automatable

shishirm avatar Oct 23 '19 21:10 shishirm

Is there a good way to capture those aside from (awkwardly) parsing the strings from their audits?

Yes, all these audits have a numericValue property which is a number and not a string.

lighthouseResult.audits['max-potential-fid'].numericValue lighthouseResult.audits['time-to-first-byte'].numericValue

the docs

We should probably still include them in metrics details though :)

patrickhulce avatar Oct 23 '19 21:10 patrickhulce

Thanks so much for the quick response. Will parse the docs and values and will reach out if there are any more questions.

shishirm avatar Oct 23 '19 22:10 shishirm

Trying to run this, I don't see a "numericValue" field.

https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://www.google.com

Is there a special flag I need to pass to get this to show up?

shishirm avatar Oct 24 '19 18:10 shishirm

Ah, for the PSI API, I think it wasn't exposed in the API response, but it should be very soon

@exterkamp

brendankenny avatar Oct 24 '19 18:10 brendankenny

It's staged now, to promote soon 😄

Sorry for the delay 😓

exterkamp avatar Oct 29 '19 17:10 exterkamp

Ty for the super quick turnaround!

shishirm avatar Oct 31 '19 18:10 shishirm

Forgot to circle back to this ticket! This is fixed now :wrench:

exterkamp avatar Nov 22 '19 17:11 exterkamp