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.
Introduce a RadarProfiler. keeps track of what time each operation started/ended, and produce a formatted string of the performance.
RadarProfiler has two timing methods
start(operation)
andend(operation)
which tracks the time elapsed for a specific operation. In this PR it's being used fortrackVerified
.the
formatted
method returns a formatted string of all the operations that were tracked. e.g.getLocation: 0.003, trackAPI: 1.518, total: 3.448, getAttestToken: 1.477, getConfig: 0.450
then it's sent to logs. (currently debug level, but maybe this should be info) which then will be parsed and processed by the server (in the future)
The test in swift does run in CI, but the log doesn't show up. It does show up it if fails, it'll say
RadarSDKTestsSwift.test_profiler()
failed. But no output for success for some reason (for now).This test is written with the Swift Testing framework, which requires xcode 16. (updated github workflow to public pre-release for this).