Add os_signpost instrumentation for scan phases#81
Merged
Conversation
Purely additive os_signpost spans for Instruments profiling of scan-side work. No behavioral changes; emits begin/end intervals that are no-ops when no profiler is attached. - FileSystemScanner: top-level "scan" span wraps the scan, "enumerate" wraps each concurrentPerform child iteration, "verify" wraps each duplicate-hash verification group. - ScanStore: "persist" wraps the post-scan hashCache.persist() call. - FilterStore: "index" wraps rebuildSearchSubtreeMatchIDs. Subsystem com.rasputinkaiser.StorageScope / category scan mirroring across all three classes so spans cluster in the Instruments timeline. Co-Authored-By: NCode <noreply@noumena.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
os_signpostspans for Instruments profiling of scan-side work. No behavioral changes; emits begin/end intervals that are no-ops when no profiler is attached.FileSystemScanner: top-levelscanspan wraps the whole scan,enumeratewraps eachconcurrentPerformchild iteration,verifywraps each duplicate-hash verification group iteration.ScanStore:persistwraps the post-scanhashCache.persist()call (in the detached utility task).FilterStore:indexwrapsrebuildSearchSubtreeMatchIDs.OSLog(subsystem: "com.rasputinkaiser.StorageScope", category: "scan")across all three classes so spans cluster in the Instruments timeline.Validation
swift test— 54/54 passing./script/public_upload_audit.sh— passedbash ./script/build_and_run.sh --verify— app bundle signature and launch verifiedPrivacy And Safety
%{public}@paths are local file names only and never written to disk by StorageScope.