added FrameMetrics to Android profiling data#2342
Merged
Merged
Conversation
…TraceData added frameMetrics (slow and frozen frames) and screen refresh rate added a SentryFrameMetricsCollector to collect frameMetrics changed a benchmark device on Saucelabs as it's not available anymore
Contributor
|
…TraceData added frameMetrics (slow and frozen frames) and screen refresh rate added a SentryFrameMetricsCollector to collect frameMetrics changed a benchmark device on Saucelabs as it's not available anymore
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f809aac | 301.51 ms | 346.60 ms | 45.09 ms |
| a04f788 | 321.78 ms | 354.12 ms | 32.35 ms |
| 38e4f11 | 358.20 ms | 433.73 ms | 75.53 ms |
| 507f924 | 342.51 ms | 402.65 ms | 60.14 ms |
| 90e9745 | 314.68 ms | 357.28 ms | 42.60 ms |
| 7597ded | 289.60 ms | 339.69 ms | 50.09 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f809aac | 1.73 MiB | 2.32 MiB | 608.63 KiB |
| a04f788 | 1.73 MiB | 2.32 MiB | 609.88 KiB |
| 38e4f11 | 1.73 MiB | 2.32 MiB | 609.82 KiB |
| 507f924 | 1.73 MiB | 2.32 MiB | 609.95 KiB |
| 90e9745 | 1.73 MiB | 2.32 MiB | 608.63 KiB |
| 7597ded | 1.73 MiB | 2.32 MiB | 609.88 KiB |
Previous results on branch: feat/profiling-frame-metrics
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 43860fd | 297.76 ms | 330.25 ms | 32.49 ms |
| 9385630 | 313.85 ms | 319.06 ms | 5.21 ms |
| 4d7bda6 | 338.96 ms | 461.37 ms | 122.41 ms |
| a6b6b98 | 370.26 ms | 459.67 ms | 89.41 ms |
| b1b2eb0 | 315.10 ms | 349.81 ms | 34.71 ms |
| 5711c14 | 298.11 ms | 323.40 ms | 25.30 ms |
| e7e2fb1 | 317.90 ms | 353.63 ms | 35.73 ms |
| 5b4c2f3 | 319.28 ms | 356.79 ms | 37.52 ms |
| 922e325 | 360.50 ms | 405.19 ms | 44.69 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 43860fd | 1.73 MiB | 2.33 MiB | 612.62 KiB |
| 9385630 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
| 4d7bda6 | 1.73 MiB | 2.33 MiB | 612.74 KiB |
| a6b6b98 | 1.73 MiB | 2.32 MiB | 612.52 KiB |
| b1b2eb0 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
| 5711c14 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
| e7e2fb1 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
| 5b4c2f3 | 1.73 MiB | 2.32 MiB | 612.52 KiB |
| 922e325 | 1.73 MiB | 2.32 MiB | 612.55 KiB |
Codecov ReportBase: 80.33% // Head: 80.28% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2342 +/- ##
============================================
- Coverage 80.33% 80.28% -0.05%
- Complexity 3673 3690 +17
============================================
Files 290 292 +2
Lines 13729 13845 +116
Branches 1810 1833 +23
============================================
+ Hits 11029 11116 +87
- Misses 2003 2014 +11
- Partials 697 715 +18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…TraceData added frameMetrics (slow and frozen frames) and screen refresh rate added a SentryFrameMetricsCollector to collect frameMetrics changed a benchmark device on Saucelabs as it's not available anymore
…TraceData added frameMetrics (slow and frozen frames) and screen refresh rate added a SentryFrameMetricsCollector to collect frameMetrics changed a benchmark device on Saucelabs as it's not available anymore
stefanosiano
marked this pull request as ready for review
November 10, 2022 08:42
stefanosiano
requested review from
adinauer,
markushi and
romtsn
as code owners
November 10, 2022 08:42
…n error on Saucelabs
…n error on Saucelabs
changed nanoseconds unit to nanosecond
…to feat/profiling-frame-metrics
romtsn
reviewed
Nov 14, 2022
romtsn
reviewed
Nov 14, 2022
added automatic activity transaction in ui test
romtsn
reviewed
Nov 15, 2022
| // Most frames take just a few nanoseconds longer than the optimal calculated | ||
| // duration. | ||
| // Therefore we subtract one, because otherwise almost all frames would be slow. | ||
| boolean isSlow = durationNanos > nanosInSecond / (refreshRate - 1); |
Member
There was a problem hiding this comment.
I like this approach, we should probably also switch over in the ActivityFramesTracker, because for now we're just using hardcoded 16ms for detecting slow frames
romtsn
approved these changes
Nov 15, 2022
* removed useless file exist check in AndroidTransactionProfiler * wrapped AndroidTransactionProfiler methods in executor service * fixed crash in sample app's ProfilingActivity * updated ui tests
…tyStarted(), not onActivityCreated() anymore
frameMetricsListener removal wrapped in a try catch block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
added ProfileMeasurements to AndroidTransactionProfiler and ProfilingTraceData
added frameMetrics (slow and frozen frames) and screen refresh rate to profiling measurements
added a SentryFrameMetricsCollector to collect frameMetrics
changed a benchmark device on Saucelabs as it's not available anymore
💡 Motivation and Context
We want to add data to profiles. So we're starting reporting all slow and frozen frames
Oneplus 7 pro on Saucelabs is not available anymore, and i replaced it with Oneplus 7T
💚 How did you test it?
Added Unit and Ui tests
📝 Checklist
🔮 Next steps