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

[EPIC] Frames Delay #160

Open
6 of 7 tasks
philipphofmann opened this issue Nov 22, 2023 · 5 comments
Open
6 of 7 tasks

[EPIC] Frames Delay #160

philipphofmann opened this issue Nov 22, 2023 · 5 comments

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Nov 22, 2023

Specification is here https://develop.sentry.dev/sdk/performance/frames-delay/.
Internal Notion SDK Roadmap Doc

Tasks

Preview Give feedback
  1. 4 of 4
    Platform: Cocoa
    philipphofmann
  2. Scope: Backend Scope: Frontend
  3. Scope: Backend
    markushi
  4. 3 of 3
    Platform: Android Platform: Java
    markushi
  5. 1 of 2
@philipphofmann philipphofmann changed the title [EPIC] Frame Delay [EPIC] Frames Delay Nov 22, 2023
@philipphofmann philipphofmann changed the title [EPIC] Frames Delay [EPIC] Frame Delay Nov 22, 2023
@shruthilayaj
Copy link
Member

@philipphofmann Is there a reason why we'd want to capture this information the difference between expected frame render time and actual duration ie (300 - 16.67) instead of just frame duration if it exceeds expected render time? Also, do you know what duration profiles show for slow/frozen frame durations?

@philipphofmann
Copy link
Member Author

Is there a reason why we'd want to capture this information the difference between expected frame render time and actual duration ie (300 - 16.67) instead of just frame duration if it exceeds expected render time?

Yes, because the frame rate can change at any moment. You could have 120 fps or 60 fps or even a lower rate. If we would send the frame duration we would also need to send the frame rate. We still can't send multiple values for spans and transactions, so we need to narrow it down to one value. If we would send only the frame duration, we don't include the frame rate. Frame delay tells you how much a frame was delayed, no matter the frame rate. It's also what the user perceives as a hitch in the UI. That's how I came up with the calculation.

Also, do you know what duration profiles show for slow/frozen frame durations?

Here is a sample transaction with slow and frozen frames and a profile.

@shruthilayaj
Copy link
Member

shruthilayaj commented Nov 27, 2023

I see - I was also thinking frame duration as a single metric (ie the total duration of your slow/frozen frames) but good point about the different frame rates. I think for the top level metric, Frame Delay makes sense - although we should also report a normalized version of this metric (like Apple's scroll hitch ratio).

Do the SDKs have access to the expected number of frame renders and frame rate @philipphofmann? That way we can calculate the total expected duration of frame renders and report a ratio like (frame delay in ms) / (total expected render time in s).

@philipphofmann
Copy link
Member Author

Do the SDKs have access to the expected number of frame renders and frame rate @philipphofmann? That way we can calculate the total expected duration of frame renders and report a ratio like (frame delay in ms) / (total expected render time in s).

On iOS yes. We still trying to figure that out on Android, but I think yes @markushi and @stefanosiano?

@markushi
Copy link
Member

markushi commented Dec 4, 2023

On Android we could calculate the expected number of frames based on the last known frame rate, the last kown frame drawn timestamp and the span end timestamp. So yes, we can do that on Android!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants