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

Fix: Dont create transaction for unused ViewControllers #4448

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brustolin
Copy link
Contributor

📜 Description

Its possible to create a view controller but never add it to the view hierarchy.
This will create a transaction with data that is not helpful

💚 How did you test it?

Unit tests

📝 Checklist

You have to check all boxes before merging:

  • 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.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.333%. Comparing base (149877e) to head (7780ec8).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4448       +/-   ##
=============================================
+ Coverage   91.318%   91.333%   +0.014%     
=============================================
  Files          609       610        +1     
  Lines        49855     49963      +108     
  Branches     17932     18037      +105     
=============================================
+ Hits         45527     45633      +106     
- Misses        4236      4238        +2     
  Partials        92        92               
Files with missing lines Coverage Δ
Sources/Sentry/SentryTracer.m 97.202% <100.000%> (+0.290%) ⬆️
.../Sentry/SentryUIViewControllerPerformanceTracker.m 99.103% <100.000%> (+0.016%) ⬆️
...entryUIViewControllerPerformanceTrackerTests.swift 98.407% <100.000%> (+0.002%) ⬆️
...ts/SentryTests/Transaction/SentryTracerTests.swift 98.394% <100.000%> (+0.011%) ⬆️

... and 18 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 149877e...7780ec8. Read the comment docs.

Copy link

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1228.55 ms 1245.65 ms 17.09 ms
Size 21.90 KiB 707.47 KiB 685.57 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0ecf042 1228.25 ms 1250.67 ms 22.42 ms
0d32275 1230.96 ms 1237.90 ms 6.94 ms
e0f077c 1224.65 ms 1243.52 ms 18.87 ms
af1f4dd 1207.33 ms 1230.04 ms 22.71 ms
7bc3c0d 1212.35 ms 1228.94 ms 16.59 ms
3f366ee 1242.28 ms 1260.80 ms 18.52 ms
cb6ab62 1213.47 ms 1248.46 ms 34.99 ms
42ef6ba 1219.58 ms 1245.37 ms 25.78 ms
b9d59f7 1222.23 ms 1227.16 ms 4.93 ms
888a145 1228.63 ms 1248.94 ms 20.30 ms

App size

Revision Plain With Sentry Diff
0ecf042 21.58 KiB 631.82 KiB 610.24 KiB
0d32275 22.84 KiB 403.14 KiB 380.29 KiB
e0f077c 22.85 KiB 412.59 KiB 389.74 KiB
af1f4dd 22.85 KiB 414.71 KiB 391.86 KiB
7bc3c0d 20.76 KiB 427.35 KiB 406.59 KiB
3f366ee 20.76 KiB 427.84 KiB 407.08 KiB
cb6ab62 22.85 KiB 413.42 KiB 390.57 KiB
42ef6ba 21.58 KiB 417.86 KiB 396.28 KiB
b9d59f7 22.85 KiB 405.77 KiB 382.92 KiB
888a145 21.58 KiB 713.54 KiB 691.96 KiB

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.

1 participant