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

impr: Slightly speed up serializing scope #4661

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

philipphofmann
Copy link
Member

📜 Description

Use a double checked lock for getting the span when building the trace context.

💡 Motivation and Context

@armcknight found this.

💚 How did you test it?

Unit tests still green.

📝 Checklist

You have to check all boxes before merging:

  • 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.
  • I updated the wizard 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

Use a double checked lock for getting the span when building the
trace context.
Copy link

github-actions bot commented Dec 23, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1233.35 ms 1256.55 ms 23.20 ms
Size 22.32 KiB 761.51 KiB 739.19 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5e579af 1239.40 ms 1257.29 ms 17.89 ms
7bbb7c3 1232.40 ms 1249.78 ms 17.38 ms
49819af 1263.92 ms 1275.66 ms 11.74 ms
0a12181 1231.37 ms 1248.13 ms 16.75 ms
3cba0e8 1243.04 ms 1257.46 ms 14.42 ms
187edbf 1224.29 ms 1239.69 ms 15.40 ms
5ab598f 1213.90 ms 1240.45 ms 26.55 ms
c2dd146 1233.69 ms 1246.37 ms 12.67 ms
f4a6925 1228.73 ms 1252.18 ms 23.45 ms
216bdf9 1202.57 ms 1215.45 ms 12.88 ms

App size

Revision Plain With Sentry Diff
5e579af 21.58 KiB 656.60 KiB 635.02 KiB
7bbb7c3 21.58 KiB 418.78 KiB 397.20 KiB
49819af 20.76 KiB 427.31 KiB 406.55 KiB
0a12181 21.58 KiB 419.20 KiB 397.61 KiB
3cba0e8 22.84 KiB 403.19 KiB 380.34 KiB
187edbf 21.58 KiB 729.90 KiB 708.32 KiB
5ab598f 22.84 KiB 403.17 KiB 380.33 KiB
c2dd146 21.58 KiB 713.91 KiB 692.33 KiB
f4a6925 21.58 KiB 706.46 KiB 684.88 KiB
216bdf9 21.58 KiB 418.13 KiB 396.54 KiB

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.633%. Comparing base (15cfa41) to head (786fbf6).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4661       +/-   ##
=============================================
- Coverage   90.668%   90.633%   -0.036%     
=============================================
  Files          621       621               
  Lines        71159     71155        -4     
  Branches     25954     25336      -618     
=============================================
- Hits         64519     64490       -29     
- Misses        6543      6572       +29     
+ Partials        97        93        -4     
Files with missing lines Coverage Δ
Sources/Sentry/SentryScope.m 96.889% <100.000%> (+0.030%) ⬆️

... and 25 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15cfa41...786fbf6. Read the comment docs.

@philipphofmann philipphofmann merged commit 0970e44 into main Dec 23, 2024
67 of 70 checks passed
@philipphofmann philipphofmann deleted the impr/scope-serialization branch December 23, 2024 09:02
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.

3 participants