HTTPArchive / custom-metrics

Custom metrics to use with WebPageTest agents
Apache License 2.0
19 stars 21 forks source link

Performance 2022 custom metrics #20

Closed rviscomi closed 2 years ago

rviscomi commented 2 years ago

Progress on #16 https://github.com/HTTPArchive/almanac.httparchive.org/issues/2890

Additional metadata about the LCP element:

Everything is applicable to images. The boundingClientRect will also be available for text-based LCP elements.

Tests

rviscomi commented 2 years ago

Background image not preloaded, not discoverable?

This is an interesting case. The metric evaluates to not discoverable because there is no src or srcset on the page set to that image URL. But lcp_resource.initiator.type is "parser" so it seems to be discoverable? That might only be the case because the CSS is in an inline style block, haven't tested it with an external stylesheet. Should we drop the discoverable field and always check the initiator type?

mel-ada commented 2 years ago

For my own knowledge - does the fact that the full HAR data is added give us the info we need here?

Background image not preloaded, not discoverable?

This is an interesting case. The metric evaluates to not discoverable because there is no src or srcset on the page set to that image URL. But lcp_resource.initiator.type is "parser" so it seems to be discoverable? That might only be the case because the CSS is in an inline style block, haven't tested it with an external stylesheet. Should we drop the discoverable field and always check the initiator type?

rviscomi commented 2 years ago

Yeah hopefully that gives us enough metadata to figure it out later in SQL if there were any false negatives. We can analyze the next crawl to see how reliable the discoverable field is vs initiator.type.