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

Ensure performance measurement collection is not taken too frequently #3221

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Feb 22, 2024

📜 Description

performance measurement collection now waits at least 10ms between collections
compiled regex in AndroidCpuCollector to parse the cpu file, to improve speed

💡 Motivation and Context

Some UI tests are failing. Also, measurements taken too quickly (1ms) caused issues when the backend parsed the data. It was resolved in the backend, but it's something we should avoid in the first place

💚 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

…llections

compiled regex in AndroidCpuCollector to parse the cpu file, to improve speed
@stefanosiano stefanosiano marked this pull request as ready for review February 22, 2024 15:40
@stefanosiano
Copy link
Member Author

Do we need a changelog entry for this change?

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 383.13 ms 445.08 ms 61.96 ms
Size 1.70 MiB 2.28 MiB 587.99 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4bf95dd 345.96 ms 414.24 ms 68.28 ms
95a98b5 380.06 ms 453.56 ms 73.50 ms
2465853 400.64 ms 465.47 ms 64.83 ms
7ab32b6 373.62 ms 480.61 ms 106.99 ms
2fad834 390.07 ms 470.80 ms 80.73 ms
1f3652d 361.62 ms 424.76 ms 63.14 ms
937879e 400.98 ms 482.84 ms 81.86 ms
4e29063 376.38 ms 390.98 ms 14.60 ms
4e260b3 388.40 ms 468.98 ms 80.58 ms
86f0096 368.63 ms 446.92 ms 78.29 ms

App size

Revision Plain With Sentry Diff
4bf95dd 1.72 MiB 2.29 MiB 576.40 KiB
95a98b5 1.70 MiB 2.27 MiB 586.31 KiB
2465853 1.70 MiB 2.27 MiB 583.82 KiB
7ab32b6 1.70 MiB 2.27 MiB 584.63 KiB
2fad834 1.72 MiB 2.29 MiB 577.53 KiB
1f3652d 1.72 MiB 2.27 MiB 554.95 KiB
937879e 1.72 MiB 2.27 MiB 558.42 KiB
4e29063 1.72 MiB 2.29 MiB 578.38 KiB
4e260b3 1.72 MiB 2.27 MiB 554.95 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB

Previous results on branch: fix/ensure-performance-collection-gaps

Startup times

Revision Plain With Sentry Diff
b25ea04 410.00 ms 471.20 ms 61.20 ms

App size

Revision Plain With Sentry Diff
b25ea04 1.70 MiB 2.28 MiB 587.94 KiB

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

nice!

Do we need a changelog entry for this change?

Yeah ideally we'd mention something, especially when it touches production code 👍

@stefanosiano stefanosiano enabled auto-merge (squash) February 23, 2024 15:04
@stefanosiano stefanosiano merged commit bf82eb3 into main Feb 23, 2024
24 checks passed
@stefanosiano stefanosiano deleted the fix/ensure-performance-collection-gaps branch February 23, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants