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

SDK profiler #412

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

SDK profiler #412

wants to merge 6 commits into from

Conversation

ShiCheng-Lu
Copy link
Contributor

@ShiCheng-Lu ShiCheng-Lu commented Nov 13, 2024

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) and end(operation) which tracks the time elapsed for a specific operation. In this PR it's being used for trackVerified.

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 sayRadarSDKTestsSwift.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).

@ShiCheng-Lu ShiCheng-Lu changed the title Shicheng/sdk profiler SDK profiler Nov 13, 2024
@ShiCheng-Lu ShiCheng-Lu marked this pull request as ready for review November 18, 2024 16:38
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.

1 participant