-
-
Notifications
You must be signed in to change notification settings - Fork 343
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: Add extension for FileManager to track file I/O operations with Sentry #4863
base: main
Are you sure you want to change the base?
Conversation
|
0db92ad
to
4182d91
Compare
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
d10e11b
to
d3e66be
Compare
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
2 similar comments
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
9bb9c45
to
95d1308
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4863 +/- ##
=============================================
+ Coverage 92.431% 92.574% +0.142%
=============================================
Files 665 667 +2
Lines 78190 79788 +1598
Branches 28260 29019 +759
=============================================
+ Hits 72272 73863 +1591
- Misses 5819 5829 +10
+ Partials 99 96 -3
... and 18 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great; with a few improvements, this will be an excellent feature.
Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift
Outdated
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/FileManager+SentryTracing.swift
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/SentryFileIOTracker+SwiftHelpers.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/FileManager+SentryTracing.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/FileManager+SentryTracing.swift
Outdated
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/FileManagerTracingIntegrationTests.swift
Show resolved
Hide resolved
…acing.swift Co-authored-by: Philipp Hofmann <[email protected]>
…acing.swift Co-authored-by: Philipp Hofmann <[email protected]>
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bec7914 | 1214.02 ms | 1236.20 ms | 22.18 ms |
d914696 | 1225.19 ms | 1247.16 ms | 21.98 ms |
371db89 | 1226.40 ms | 1251.54 ms | 25.14 ms |
e89dc54 | 1207.86 ms | 1218.27 ms | 10.41 ms |
a0cc9d6 | 1228.98 ms | 1252.36 ms | 23.38 ms |
98cca71 | 1226.66 ms | 1242.94 ms | 16.28 ms |
c5fef16 | 1221.71 ms | 1241.49 ms | 19.78 ms |
df9fb5b | 1239.18 ms | 1254.00 ms | 14.82 ms |
46467d0 | 1229.00 ms | 1241.27 ms | 12.27 ms |
c810e58 | 1221.57 ms | 1250.45 ms | 28.88 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
bec7914 | 21.58 KiB | 707.43 KiB | 685.85 KiB |
d914696 | 21.58 KiB | 629.83 KiB | 608.25 KiB |
371db89 | 20.76 KiB | 427.31 KiB | 406.55 KiB |
e89dc54 | 22.85 KiB | 412.60 KiB | 389.75 KiB |
a0cc9d6 | 21.58 KiB | 706.47 KiB | 684.89 KiB |
98cca71 | 22.85 KiB | 411.14 KiB | 388.29 KiB |
c5fef16 | 22.31 KiB | 760.65 KiB | 738.34 KiB |
df9fb5b | 21.90 KiB | 708.90 KiB | 687.00 KiB |
46467d0 | 21.58 KiB | 698.11 KiB | 676.53 KiB |
c810e58 | 22.32 KiB | 761.10 KiB | 738.78 KiB |
…-manager-tracking
This PR is derived from #4605
It introduces an extension to FileManager with these methods:
createFileWithSentryTracing(atPath:contents:attributes:)
mapped tocreateFile(atPath:contents:attributes:)
removeItemWithSentryTracing(at:)
mapped toremoveItem(at:)
removeItemWithSentryTracing(atPath:)
mapped toremoveItem(atPath:)
copyItemWithSentryTracing(at:to:)
mapped tocopyItem(at:to:)
copyItemWithSentryTracing(atPath:toPath:)
mapped tocopyItem(atPath:toPath)
moveItemWithSentryTracing(at:to:)
mapped tomoveItem(at:to:)
moveItemWithSentryTracing(atPath:toPath:)
mapped tomoveItem(atPath:toPath:)
Blocked by: