-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Remove profiler main thread io #2348
Remove profiler main thread io #2348
Conversation
wrapped AndroidTransactionProfiler methods in executor service fixed crash in sample app's ProfilingActivity
wrapped AndroidTransactionProfiler methods in executor service fixed crash in sample app's ProfilingActivity
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e7e2fb1 | 317.90 ms | 353.63 ms | 35.73 ms |
43860fd | 297.76 ms | 330.25 ms | 32.49 ms |
9385630 | 313.85 ms | 319.06 ms | 5.21 ms |
5b4c2f3 | 319.28 ms | 356.79 ms | 37.52 ms |
922e325 | 360.50 ms | 405.19 ms | 44.69 ms |
b1b2eb0 | 315.10 ms | 349.81 ms | 34.71 ms |
5711c14 | 298.11 ms | 323.40 ms | 25.30 ms |
a6b6b98 | 370.26 ms | 459.67 ms | 89.41 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e7e2fb1 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
43860fd | 1.73 MiB | 2.33 MiB | 612.62 KiB |
9385630 | 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 |
b1b2eb0 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
5711c14 | 1.73 MiB | 2.32 MiB | 612.50 KiB |
a6b6b98 | 1.73 MiB | 2.32 MiB | 612.52 KiB |
Previous results on branch: fix/profiler-main-thread-io
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
9eb967e | 364.30 ms | 394.56 ms | 30.26 ms |
552b6d9 | 310.70 ms | 381.00 ms | 70.30 ms |
1fea68e | 328.90 ms | 348.24 ms | 19.34 ms |
413eb4e | 343.06 ms | 381.49 ms | 38.43 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
9eb967e | 1.73 MiB | 2.33 MiB | 612.62 KiB |
552b6d9 | 1.73 MiB | 2.32 MiB | 612.23 KiB |
1fea68e | 1.73 MiB | 2.32 MiB | 612.23 KiB |
413eb4e | 1.73 MiB | 2.32 MiB | 612.23 KiB |
sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
Show resolved
Hide resolved
Closes #2317 |
sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
Show resolved
Hide resolved
Codecov ReportBase: 80.26% // Head: 80.32% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feat/profiling-frame-metrics #2348 +/- ##
==================================================================
+ Coverage 80.26% 80.32% +0.05%
Complexity 3687 3687
==================================================================
Files 292 292
Lines 13840 13828 -12
Branches 1832 1824 -8
==================================================================
- Hits 11109 11107 -2
+ Misses 2016 2012 -4
+ Partials 715 709 -6
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. |
* added ProfileMeasurements to AndroidTransactionProfiler and ProfilingTraceData * added frameMetrics (slow and frozen frames) and screen refresh rate * added a SentryFrameMetricsCollector to collect frameMetrics * updated espresso test dependency to stable to run on Android 13 devices * increased benchmark cpu overhead threshold from 5% to 5.5% * updated benchmark device from OnePlus Nord N200 to Google Pixel 3a * added automatic activity transaction in ui test * Remove profiler main thread io (#2348) * fixed crash in sample app's ProfilingActivity
📜 Description
Removed a useless file exist check in AndroidTransactionProfiler
Offloaded AndroidTransactionProfiler methods to background threads using executor service
💡 Motivation and Context
When using Android Strict Mode, the file io that was happening in the main thread (file existence checks) were generating warnings, as in this issue
Closes #2317
💚 How did you test it?
I updated the unit tests
📝 Checklist
🔮 Next steps