Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add INP breakdown entries to the attribution build #430

Closed
lebreRafael opened this issue Feb 20, 2024 · 3 comments
Closed

Add INP breakdown entries to the attribution build #430

lebreRafael opened this issue Feb 20, 2024 · 3 comments

Comments

@lebreRafael
Copy link

Should we add the following entries?

  • inputDelay
  • processingTime
  • presentationDelay

I know we can easily calculate those with the eventEntry but I'm wondering how many people know about that, so the ideia here is more about encouraging people to track this important information.

If we don't wanna add those fields for some reason maybe we can think about some docs or article to explain how to calculate those fields?
I only realized I could track INP breakdown when reading this and I didn't find an example on how to calculate it.
For some reason I already had processingTime (probably copied from some article/docs) and then I copied the input delay logic from some FID docs and used those 2 and the INP value itself to calculate the presentation delay but I was not sure that was the correct way of doing that.

@tunetheweb
Copy link
Member

Yes we should, but it's a little more complicated than that (which is why we haven't done it yet!) as an interaction may have several components.

Consider a click, which has mouseup, pointerup, and click events, but which are all part of the same interaction. The processing time of the mouseup and pointerup events can cause a "input delay" to the click event. Similarly, just cause the mouseup event happened first it would see a long "presentationDelay", but if that is due to "processingTime" of the other two events when we would't want to imply it was due to the presenation time itself.

So ideally we want to group them together into "inputDelay" for the whole interaction (i.e. all three events), the "processingTime" of the whole interaction (i.e. all three events), and finally the "presentationDelay" of the whole interaction.

So it's a bit more complicated than just looking at the "INP event" as reported by web-vitals.js now and then calculating the inputDelay, processingTime, and precentationDelay of just that one event. So we haven't got to it just yet.

FYI, more info on all this here if you want some of the full, gory, details: https://github.com/mmocny/tpac_2023_workshop_responsiveness?tab=readme-ov-file

@lebreRafael
Copy link
Author

Hmm so that could be the reason why I'm seeing so much time spent on presentation delay.
Thanks for clarifying

@tunetheweb
Copy link
Member

Completed with #442 and will be included in v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants