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

chore(profiling): Create independent Profiler for Hybrid SDKs #3016

Merged
merged 16 commits into from
Nov 13, 2023

Conversation

krystofwoldrich
Copy link
Member

@krystofwoldrich krystofwoldrich commented Oct 30, 2023

📜 Description

This PR extracts Android Profiling and Profile Metrics to separate class that doesn't contain any transaction logic.

This is preparation for mixed profiles in Hybrid SDKs, where the Hybrid SDKs manage the transactions.

💡 Motivation and Context

Changes that have been done for mixed profiler for RN iOS

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

  • Add tests

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 383.65 ms 438.94 ms 55.29 ms
Size 1.72 MiB 2.29 MiB 578.38 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
283d83e 348.44 ms 392.06 ms 43.62 ms
c7e2fbc 372.00 ms 461.71 ms 89.71 ms
86f0096 381.33 ms 476.58 ms 95.25 ms
86f0096 368.63 ms 446.92 ms 78.29 ms
93a76ca 391.54 ms 475.65 ms 84.11 ms
c7e2fbc 393.98 ms 478.24 ms 84.27 ms
3d8bd2b 375.34 ms 446.32 ms 70.98 ms
0bf143e 368.35 ms 437.47 ms 69.12 ms
4bf95dd 345.96 ms 414.24 ms 68.28 ms
93a76ca 377.41 ms 448.22 ms 70.81 ms

App size

Revision Plain With Sentry Diff
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
3d8bd2b 1.72 MiB 2.29 MiB 577.53 KiB
0bf143e 1.72 MiB 2.29 MiB 576.50 KiB
4bf95dd 1.72 MiB 2.29 MiB 576.40 KiB
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB

Previous results on branch: kw-refactor-make-profiler-tx-independent

Startup times

Revision Plain With Sentry Diff
cc7192c 327.96 ms 387.92 ms 59.96 ms
c6bd3c3 388.20 ms 419.58 ms 31.38 ms
a4759fd 397.66 ms 476.55 ms 78.89 ms
52a389b 380.63 ms 448.58 ms 67.95 ms
442c6dd 375.12 ms 447.33 ms 72.21 ms
ed2130c 380.00 ms 451.81 ms 71.81 ms

App size

Revision Plain With Sentry Diff
cc7192c 1.72 MiB 2.29 MiB 576.99 KiB
c6bd3c3 1.72 MiB 2.29 MiB 578.18 KiB
a4759fd 1.72 MiB 2.29 MiB 577.02 KiB
52a389b 1.72 MiB 2.29 MiB 577.56 KiB
442c6dd 1.72 MiB 2.29 MiB 577.56 KiB
ed2130c 1.72 MiB 2.29 MiB 577.56 KiB

@krystofwoldrich krystofwoldrich self-assigned this Oct 30, 2023
@krystofwoldrich krystofwoldrich marked this pull request as ready for review October 30, 2023 18:06
@krystofwoldrich
Copy link
Member Author

@stefanosiano Is Integration Tests / Ui tests flaky or did I cause the flakiness with my changes?

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done refactoring! I left a comment which IMHO should be addressed, but apart from that - looks fine!

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Attention: 50 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...entry/android/core/AndroidTransactionProfiler.java 83.44% <79.16%> (+10.96%) ⬆️
...n/java/io/sentry/android/core/AndroidProfiler.java 71.15% <71.15%> (ø)

📢 Thoughts on this report? Let us know!.

@stefanosiano
Copy link
Member

@stefanosiano Is Integration Tests / Ui tests flaky or did I cause the flakiness with my changes?

I'm currently already investigating this
you didn't cause anything, don't worry 😅

@krystofwoldrich krystofwoldrich merged commit 4e29063 into main Nov 13, 2023
19 of 20 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-refactor-make-profiler-tx-independent branch November 13, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants