-
-
Notifications
You must be signed in to change notification settings - Fork 358
feat: Add extension for Data to track file I/O operations with Sentry #4862
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
Conversation
|
e4c8331
to
24113a9
Compare
24113a9
to
beac2cc
Compare
dfce878
to
489ae5c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4862 +/- ##
=============================================
- Coverage 92.403% 92.342% -0.061%
=============================================
Files 662 666 +4
Lines 77728 78300 +572
Branches 28142 27547 -595
=============================================
+ Hits 71823 72304 +481
- Misses 5807 5902 +95
+ Partials 98 94 -4
... and 29 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
I found a few issues, but this is going to a great feature 💪
Sources/Swift/Integrations/Performance/IO/Data+SentryTracing.swift
Outdated
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/SentryFileIOTracker+SwiftHelpers.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Integrations/Performance/IO/SentryFileIOTracker+SwiftHelpers.swift
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift
Outdated
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/SentryFileIOTrackingIntegrationTests.swift
Outdated
Show resolved
Hide resolved
Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift
Show resolved
Hide resolved
Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>
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.
LGTM, with one comment to improve the test assertion for the timestamp.
Tests/SentryTests/Integrations/Performance/IO/DataSentryTracingIntegrationTests.swift
Show resolved
Hide resolved
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f5623cd | 1255.78 ms | 1262.30 ms | 6.52 ms |
8001609 | 1217.87 ms | 1231.31 ms | 13.44 ms |
39a4941 | 1210.69 ms | 1219.83 ms | 9.14 ms |
e0abb7e | 1235.60 ms | 1253.13 ms | 17.53 ms |
9d61bea | 1243.88 ms | 1254.36 ms | 10.48 ms |
f4a6925 | 1230.82 ms | 1243.94 ms | 13.12 ms |
1d11695 | 1219.57 ms | 1243.52 ms | 23.95 ms |
a71f5e2 | 1245.84 ms | 1258.81 ms | 12.98 ms |
98cca71 | 1210.75 ms | 1240.64 ms | 29.89 ms |
3437454 | 1235.54 ms | 1244.82 ms | 9.28 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f5623cd | 22.85 KiB | 412.98 KiB | 390.13 KiB |
8001609 | 21.58 KiB | 670.46 KiB | 648.88 KiB |
39a4941 | 22.84 KiB | 402.63 KiB | 379.79 KiB |
e0abb7e | 21.58 KiB | 704.93 KiB | 683.35 KiB |
9d61bea | 20.76 KiB | 436.29 KiB | 415.53 KiB |
f4a6925 | 21.58 KiB | 706.47 KiB | 684.89 KiB |
1d11695 | 20.76 KiB | 401.60 KiB | 380.84 KiB |
a71f5e2 | 21.58 KiB | 424.34 KiB | 402.76 KiB |
98cca71 | 22.85 KiB | 411.14 KiB | 388.29 KiB |
3437454 | 22.85 KiB | 408.88 KiB | 386.03 KiB |
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.
LGTM
This PR is derived from #4605
It introduces two methods to extend Data:
Data#init(contentsOfUrlWithSentryTracing:)
is mapped toData.init(contentsOfUrl:)
data.writeWithSentryTracing(to:options:)
is mapped todata.write(to:options)
Blocked by: