-
-
Notifications
You must be signed in to change notification settings - Fork 276
Proof of Concept: Frame Timing Integration #519
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
==========================================
- Coverage 91.67% 90.50% -1.17%
==========================================
Files 70 71 +1
Lines 2318 2349 +31
==========================================
+ Hits 2125 2126 +1
- Misses 193 223 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| class FrameTimingIntegration extends Integration<SentryFlutterOptions> { | ||
| FrameTimingIntegration({ | ||
| required this.reporter, | ||
| this.badFrameThreshold = const Duration(milliseconds: 16), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't yet found a way to determine the device current refresh rate.
| Duration worstFrameDuration, | ||
| Duration totalDuration, | ||
| ) { | ||
| return '$badFrameCount frames exceeded ${_formatMS(badFrameThreshold)} ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Average frame time would be nice to know, too.
|
@marandaneto Is there some documentation on how these values should be added to transactions? Or do I have to go by the Android/iOS source code? |
there are no official docs yet since mobile vitals is a preview, but if you're willing to work on that, I can guide you. |
|
@marandaneto that would be nice |
|
If I understand the source code of the Android SDK correctly, I need to add the frame metrics in the following format to a transaction? {
...
"measurements":{
"frames_frozen":{
"value":0.0
},
"frames_slow":{
"value":2.0
},
"frames_total":{
"value":2.0
}
}
},
...I'm assuming the data collection should start (and end) with the start (and end) of a transaction. Is that correct? |
that's correct, good finding, sorry, we didn't have the time to document it yet. |
|
Are there any hooks for a transaction start and end which I can use to turn on and off frame time recording? The docs state that it has a small performance impact, so I really don't want to have it enabled the whole time. If there's no hooks, I can think of three ways to enable us to go further with this:
|
ideally, like Android, the measurements are dependent on this issue #611 |
📜 Description
Proof of concept for tracking frame durations.
It's not really useful without being able to better determine what's causing it.
💡 Motivation and Context
#513
💚 How did you test it?
Not yet
📝 Checklist
🔮 Next steps