RUM-15189: Add setContinuousSampleRate API to ProfilingConfiguration#3276
Conversation
f9b1bde to
737fb9b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 737fb9b0e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
...k-android-profiling/src/main/java/com/datadog/android/profiling/internal/ProfilingFeature.kt
Outdated
Show resolved
Hide resolved
737fb9b to
b19db6b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b19db6b0a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
...-sdk-android-profiling/src/main/java/com/datadog/android/profiling/ProfilingConfiguration.kt
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
...-sdk-android-profiling/src/main/java/com/datadog/android/profiling/ProfilingConfiguration.kt
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/continuous-profiling #3276 +/- ##
================================================================
- Coverage 71.68% 71.44% -0.24%
================================================================
Files 942 942
Lines 34811 34829 +18
Branches 5899 5901 +2
================================================================
- Hits 24954 24883 -71
- Misses 8233 8288 +55
- Partials 1624 1658 +34
🚀 New features to boost your workflow:
|
...-sdk-android-profiling/src/main/java/com/datadog/android/profiling/ProfilingConfiguration.kt
Show resolved
Hide resolved
| whenever( | ||
| mockSharedPreferencesStorage | ||
| .getFloat(ProfilingStorage.KEY_CONTINUOUS_PROFILING_SAMPLE_RATE, -1f) | ||
| ) doReturn fakeConfiguration.continuousSampleRate - 1f |
There was a problem hiding this comment.
This test will be flaky if fakeConfiguration.continuousSampleRate is 0.
34422b2 to
2e24822
Compare
2e24822 to
d0c0841
Compare
What does this PR do?
This PRs implements
setContinuousSampleRateAPI inProfilingConfiguration, during the initialization ofProfilingFeature, this sample rate will be persist for next app launch profiling to decide if it needs to extends.The continuous profiling sample rate persisting follows the same rules of app launch profiling, if multiple SDK instances enable profiling feature, the smallest sample rate is persisted.
Motivation
RUM-15189
Review checklist (to be filled by reviewers)