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(launch profiling): fix data wipe between integration test runs #3633

Conversation

armcknight
Copy link
Member

@armcknight armcknight commented Feb 14, 2024

Following #3621 and followed by #3634

I realized that wiping the app data didn't happen early enough to get before the app launch profile; instead of relying on it to happen automatically, be a little more careful of what is left behind in the first place in the integration test.

#skip-changelog

…ngling config for the first launch to find on a subsequent run
Copy link

github-actions bot commented Feb 14, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1195.24 ms 1208.78 ms 13.53 ms
Size 21.58 KiB 422.62 KiB 401.03 KiB

Baseline results on branch: armcknight/feat/launch-profiling3-create-dedicated-launch-traces

Startup times

Revision Plain With Sentry Diff
cc00454 1213.73 ms 1243.79 ms 30.06 ms
5641251 1223.64 ms 1244.90 ms 21.26 ms
8a9a6b9 1237.59 ms 1247.96 ms 10.37 ms

App size

Revision Plain With Sentry Diff
cc00454 21.58 KiB 422.39 KiB 400.81 KiB
5641251 21.58 KiB 421.40 KiB 399.82 KiB
8a9a6b9 21.58 KiB 422.49 KiB 400.90 KiB

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.

LGTM

Samples/iOS-Swift/iOS-Swift/AppDelegate.swift Outdated Show resolved Hide resolved
Samples/iOS-Swift/iOS-Swift/AppDelegate.swift Outdated Show resolved Hide resolved

private extension AppDelegate {
// previously tried putting this in an AppDelegate.load override in ObjC, but it wouldn't run until after a launch profiler would have an opportunity to run, since SentryProfiler.load would always run first due to being dynamically linked in a framework module. it is sufficient to do it before calling SentrySDK.startWIthOptions to clear state for testProfiledAppLaunches because we don't make any assertions on a launch profile the first launch of the app in that test
func maybeWipeData() {
Copy link
Member

Choose a reason for hiding this comment

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

l: We could rename this to wipeAppData and call it above when ProcessInfo.processInfo.arguments.contains("--io.sentry.wipe-data") is true. The name maybeWipeData is a bit confusing to me.

armcknight and others added 4 commits February 14, 2024 19:01
…ch-traces' into armcknight/test/launch-profiling4-fix-data-wipe-between-integration-test-runs
…ch-traces' into armcknight/test/launch-profiling4-fix-data-wipe-between-integration-test-runs
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

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

Comparison is base (e28778c) 89.224% compared to head (1297606) 89.265%.

Additional details and impacted files

Impacted file tree graph

@@                                          Coverage Diff                                           @@
##           armcknight/feat/launch-profiling3-create-dedicated-launch-traces     #3633       +/-   ##
======================================================================================================
+ Coverage                                                            89.224%   89.265%   +0.041%     
======================================================================================================
  Files                                                                   532       532               
  Lines                                                                 58663     58664        +1     
  Branches                                                              21052     21048        -4     
======================================================================================================
+ Hits                                                                  52342     52367       +25     
+ Misses                                                                 5286      5266       -20     
+ Partials                                                               1035      1031        -4     
Files Coverage Δ
Sources/Sentry/SentryProfiler.mm 76.923% <37.500%> (-0.539%) ⬇️

... and 11 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 e28778c...1297606. Read the comment docs.

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.

Again LGTM.

@armcknight armcknight merged commit f45a7f7 into armcknight/feat/launch-profiling3-create-dedicated-launch-traces Feb 15, 2024
45 checks passed
@armcknight armcknight deleted the armcknight/test/launch-profiling4-fix-data-wipe-between-integration-test-runs branch February 15, 2024 08:33
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.

2 participants