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

feat: SwiftUI time for initial display and time for full display #4596

Merged
merged 50 commits into from
Jan 20, 2025

Conversation

brustolin
Copy link
Contributor

📜 Description

Track time for initial display and time for full display in SwiftUI

💚 How did you test it?

UI Test and sample

📝 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

Copy link

github-actions bot commented Dec 4, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 71bc815

Copy link

github-actions bot commented Dec 4, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1229.30 ms 1259.04 ms 29.74 ms
Size 22.31 KiB 771.11 KiB 748.80 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
725565a 1234.59 ms 1250.02 ms 15.43 ms
9883c0f 1207.59 ms 1223.14 ms 15.55 ms
f25febb 1224.69 ms 1247.38 ms 22.68 ms
939cd63 1222.53 ms 1250.76 ms 28.23 ms
7bc3c0d 1212.35 ms 1228.94 ms 16.59 ms
2124551 1231.78 ms 1264.94 ms 33.16 ms
b35ccd0 1233.92 ms 1256.69 ms 22.78 ms
c0ea6a1 1236.42 ms 1250.94 ms 14.52 ms
f5c35a1 1227.98 ms 1232.84 ms 4.86 ms
f2daa68 1238.40 ms 1256.43 ms 18.03 ms

App size

Revision Plain With Sentry Diff
725565a 20.76 KiB 426.11 KiB 405.35 KiB
9883c0f 22.85 KiB 405.47 KiB 382.62 KiB
f25febb 21.58 KiB 414.92 KiB 393.34 KiB
939cd63 21.58 KiB 424.35 KiB 402.76 KiB
7bc3c0d 20.76 KiB 427.35 KiB 406.59 KiB
2124551 22.85 KiB 411.69 KiB 388.84 KiB
b35ccd0 21.58 KiB 573.13 KiB 551.55 KiB
c0ea6a1 21.58 KiB 671.94 KiB 650.35 KiB
f5c35a1 22.31 KiB 768.83 KiB 746.52 KiB
f2daa68 21.58 KiB 418.40 KiB 396.82 KiB

Previous results on branch: feat/swiftui-ttid

Startup times

Revision Plain With Sentry Diff
8c646bc 1221.49 ms 1245.31 ms 23.82 ms
7ce0058 1230.49 ms 1246.94 ms 16.45 ms
f6a9e2b 1234.94 ms 1245.60 ms 10.66 ms
f38e16a 1237.13 ms 1262.76 ms 25.62 ms
6f18f02 1231.51 ms 1252.33 ms 20.82 ms
e05c80a 1234.49 ms 1253.39 ms 18.90 ms
f583fd1 1243.27 ms 1258.91 ms 15.65 ms
1ea8b74 1229.67 ms 1251.90 ms 22.22 ms
7db9d84 1242.41 ms 1259.24 ms 16.84 ms
a4f97f8 1231.48 ms 1244.17 ms 12.69 ms

App size

Revision Plain With Sentry Diff
8c646bc 22.31 KiB 756.74 KiB 734.44 KiB
7ce0058 22.30 KiB 750.46 KiB 728.16 KiB
f6a9e2b 22.30 KiB 750.46 KiB 728.16 KiB
f38e16a 22.30 KiB 750.46 KiB 728.16 KiB
6f18f02 22.31 KiB 771.11 KiB 748.80 KiB
e05c80a 22.31 KiB 771.11 KiB 748.80 KiB
f583fd1 22.30 KiB 750.46 KiB 728.16 KiB
1ea8b74 22.30 KiB 760.46 KiB 738.16 KiB
7db9d84 22.32 KiB 761.55 KiB 739.23 KiB
a4f97f8 22.31 KiB 771.11 KiB 748.80 KiB

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.244%. Comparing base (91ceb3f) to head (71bc815).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4596       +/-   ##
=============================================
+ Coverage   91.156%   91.244%   +0.088%     
=============================================
  Files          624       621        -3     
  Lines        72164     72159        -5     
  Branches     26259     26291       +32     
=============================================
+ Hits         65782     65841       +59     
+ Misses        6283      6221       -62     
+ Partials        99        97        -2     
Files with missing lines Coverage Δ
SentryTestUtils/ClearTestState.swift 86.363% <100.000%> (ø)
Sources/Sentry/SentryHub.m 97.966% <100.000%> (-0.015%) ⬇️
...rces/Sentry/SentryPerformanceTrackingIntegration.m 100.000% <100.000%> (ø)
Sources/Sentry/SentryProfiler.mm 87.254% <100.000%> (ø)
Sources/Sentry/SentryTimeToDisplayTracker.m 100.000% <100.000%> (ø)
.../Sentry/SentryUIViewControllerPerformanceTracker.m 99.317% <100.000%> (+0.050%) ⬆️
...yProfilerTests/SentryAppLaunchProfilingTests.swift 100.000% <100.000%> (ø)
...ce/SentryPerformanceTrackingIntegrationTests.swift 100.000% <100.000%> (ø)
...iewController/SentryTimeToDisplayTrackerTest.swift 100.000% <100.000%> (ø)
...entryUIViewControllerPerformanceTrackerTests.swift 99.012% <100.000%> (ø)
... and 2 more

... and 17 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 91ceb3f...71bc815. Read the comment docs.

@brustolin brustolin marked this pull request as ready for review December 5, 2024 08:57
Sources/Sentry/SentryHub.m Show resolved Hide resolved
Sources/SentrySwiftUI/TracingView.swift Outdated Show resolved Hide resolved
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

I have one important comment to address that could impact a rework of this PR. Therefore, I wait until we resolve it before giving this a more detailed review.

Sources/Sentry/SentryUIViewControllerPerformanceTracker.m Outdated Show resolved Hide resolved
Sources/SentrySwiftUI/SentryTracedView.swift Outdated Show resolved Hide resolved
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

m: I think we must add to the code docs of the option enableTimeToFullDisplayTracing that this also has an impact on the SentryTracedView.

Almost LGTM.

Sources/SentrySwiftUI/SentryTracedView.swift Show resolved Hide resolved
Sources/SentrySwiftUI/SentryTracedView.swift Outdated Show resolved Hide resolved
Sources/SentrySwiftUI/SentryTracedView.swift Outdated Show resolved Hide resolved
scripts/xcode-test.sh Outdated Show resolved Hide resolved
@brustolin brustolin marked this pull request as draft December 23, 2024 14:01
Copy link
Contributor

@philprime philprime left a comment

Choose a reason for hiding this comment

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

Approved with comments so the PR is not blocked by me

@brustolin brustolin marked this pull request as ready for review January 17, 2025 10:32
@brustolin brustolin merged commit 825f0cb into main Jan 20, 2025
72 checks passed
@brustolin brustolin deleted the feat/swiftui-ttid branch January 20, 2025 07:32
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.

5 participants