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

ref: Use average color for redact masking #3877

Merged
merged 31 commits into from
May 6, 2024
Merged

Conversation

brustolin
Copy link
Contributor

Use the text color or the average color of the image as the redaction mask.

#skip-changelog

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 98.54227% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 90.823%. Comparing base (aa45f36) to head (7589760).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3877       +/-   ##
=============================================
+ Coverage   90.690%   90.823%   +0.132%     
=============================================
  Files          581       586        +5     
  Lines        45418     45778      +360     
  Branches     16162     16334      +172     
=============================================
+ Hits         41190     41577      +387     
- Misses        4048      4131       +83     
+ Partials       180        70      -110     
Files Coverage Δ
Sources/Sentry/SentrySessionReplay.m 87.179% <100.000%> (+0.424%) ⬆️
Sources/Sentry/SentrySessionReplayIntegration.m 91.666% <ø> (ø)
...egrations/SessionReplay/SentryOnDemandReplay.swift 97.435% <ø> (+1.709%) ⬆️
...tions/SessionReplay/SentrySessionReplayTests.swift 98.333% <100.000%> (-0.028%) ⬇️
Tests/SentryTests/RedactRegionTests.swift 100.000% <100.000%> (ø)
Tests/SentryTests/UIImageHelperTests.swift 100.000% <100.000%> (ø)
Tests/SentryTests/UIRedactBuilderTests.swift 100.000% <100.000%> (ø)
Sources/Swift/Tools/UIRedactBuilder.swift 98.780% <98.780%> (ø)
Sources/Swift/Tools/SentryViewPhotographer.swift 88.888% <87.500%> (+31.076%) ⬆️
Sources/Swift/Tools/UIImageHelper.swift 87.500% <87.500%> (ø)

... and 49 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 aa45f36...7589760. Read the comment docs.

Copy link

github-actions bot commented Apr 25, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1241.67 ms 1253.83 ms 12.16 ms
Size 21.58 KiB 619.21 KiB 597.63 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
1e065bc 1239.69 ms 1258.18 ms 18.49 ms
6f4d20c 1228.67 ms 1238.88 ms 10.21 ms
61a1a2b 1222.73 ms 1245.35 ms 22.62 ms
add8416 1270.72 ms 1300.38 ms 29.66 ms
98713e6 1211.48 ms 1244.42 ms 32.94 ms
8f397a7 1196.55 ms 1226.82 ms 30.27 ms
90d17d3 1261.18 ms 1278.18 ms 17.00 ms
253bb71 1221.62 ms 1250.82 ms 29.20 ms
a2af9fa 1236.62 ms 1253.12 ms 16.50 ms
effc81c 1253.71 ms 1256.16 ms 2.45 ms

App size

Revision Plain With Sentry Diff
1e065bc 20.76 KiB 425.78 KiB 405.01 KiB
6f4d20c 20.76 KiB 431.71 KiB 410.95 KiB
61a1a2b 21.58 KiB 424.34 KiB 402.76 KiB
add8416 21.58 KiB 541.91 KiB 520.33 KiB
98713e6 20.76 KiB 435.22 KiB 414.46 KiB
8f397a7 20.76 KiB 420.55 KiB 399.79 KiB
90d17d3 20.76 KiB 432.17 KiB 411.41 KiB
253bb71 20.76 KiB 393.37 KiB 372.60 KiB
a2af9fa 20.76 KiB 432.87 KiB 412.11 KiB
effc81c 20.76 KiB 433.18 KiB 412.42 KiB

Previous results on branch: feat(SR)/averagecolormasking

Startup times

Revision Plain With Sentry Diff
e3a04fb 1222.72 ms 1244.85 ms 22.13 ms
6b8b5ea 1240.14 ms 1255.67 ms 15.52 ms

App size

Revision Plain With Sentry Diff
e3a04fb 21.58 KiB 621.03 KiB 599.45 KiB
6b8b5ea 21.58 KiB 619.21 KiB 597.62 KiB

Sources/Sentry/SentrySessionReplay.m Outdated Show resolved Hide resolved
Sources/Swift/Tools/RedactRegion.swift Outdated Show resolved Hide resolved
Tests/SentryTests/RedactRegionTests.swift Show resolved Hide resolved
Sources/Swift/Tools/RedactRegion.swift Outdated Show resolved Hide resolved
Sources/Swift/Tools/SentryViewPhotographer.swift Outdated Show resolved Hide resolved
@brustolin brustolin requested a review from romtsn May 3, 2024 08:29
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.

Thanks for adding more tests and extracting some code to make it testable 👍

Sources/Swift/Tools/UIImageHelper.swift Show resolved Hide resolved
Tests/SentryTests/UIImageHelperTests.swift Outdated Show resolved Hide resolved
Tests/SentryTests/UIImageHelperTests.swift Show resolved Hide resolved
Tests/SentryTests/RedactRegionTests.swift Show resolved Hide resolved
Tests/SentryTests/UIRedactBuilderTests.swift Show resolved Hide resolved
Tests/SentryTests/UIRedactBuilderTests.swift Outdated Show resolved Hide resolved
Sources/Swift/Tools/UIRedactBuilder.swift Outdated Show resolved Hide resolved
Sources/Swift/Tools/UIRedactBuilder.swift Outdated Show resolved Hide resolved
Sources/Swift/Tools/UIRedactBuilder.swift Show resolved Hide resolved
Sources/Swift/Tools/UIRedactBuilder.swift Show resolved Hide resolved
brustolin and others added 3 commits May 3, 2024 14:33
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. Thanks for including all the feedback.

@bruno-garcia
Copy link
Member

hope we can ship this one Monday to unblock customers trialing who are affected by high CPU

@brustolin brustolin merged commit 6a7328f into main May 6, 2024
68 of 70 checks passed
@brustolin brustolin deleted the feat(SR)/averagecolormasking branch May 6, 2024 14:04
dKasabwala pushed a commit to dKasabwala/sentry-cocoa that referenced this pull request May 6, 2024
Use the text color or the average color of the image as the redaction mask.

Co-authored-by: Philipp Hofmann <[email protected]>
threema-matteo pushed a commit to threema-ch/sentry-cocoa that referenced this pull request May 21, 2024
Use the text color or the average color of the image as the redaction mask.

Co-authored-by: Philipp Hofmann <[email protected]>
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