dd-sdk-android
dd-sdk-android copied to clipboard
RUM-12330: Handle multi SDK instance in profiling
What does this PR do?
This PR handles multi SDK instance in profiling by bringing following changes:
-
PerfettoProfilerhold a map of <InstanceName, ProfilerCallback> to make sure the result can be sent back to the correct instance. -
ProfilingStoragesave the name of the instance on which the profiling feature is enabled, and when profiler is started in content provider, the instance name can be used to indicate the profiling is launched by which feature.
Motivation
RUM-12330
Review checklist (to be filled by reviewers)
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
- [ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
- [ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
🎯 Code Coverage
• Patch Coverage: 72.86%
• Total Coverage: 71.37% (-0.01%)
View detailed report
🔗 Commit SHA: 5e1f23d | Docs | Datadog PR Page | Was this helpful? Give us feedback!
Codecov Report
:x: Patch coverage is 70.96774% with 18 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 71.22%. Comparing base (f8c30e2) to head (5e1f23d).
Additional details and impacted files
@@ Coverage Diff @@
## feature/perfetto-profiling #3026 +/- ##
==============================================================
+ Coverage 71.19% 71.22% +0.03%
==============================================================
Files 874 874
Lines 31814 31847 +33
Branches 5326 5331 +5
==============================================================
+ Hits 22649 22681 +32
+ Misses 7654 7647 -7
- Partials 1511 1519 +8
| Files with missing lines | Coverage Δ | |
|---|---|---|
| .../android/internal/data/SharedPreferencesStorage.kt | 100.00% <100.00%> (ø) |
|
| .../android/profiling/internal/ProfilingDataWriter.kt | 87.72% <100.00%> (-1.75%) |
:arrow_down: |
| ...dog/android/profiling/internal/ProfilingStorage.kt | 100.00% <100.00%> (ø) |
|
| ...id/profiling/internal/perfetto/PerfettoProfiler.kt | 93.94% <100.00%> (+2.00%) |
:arrow_up: |
| ...atadog/android/internal/data/PreferencesStorage.kt | 0.00% <0.00%> (ø) |
|
| ...in/java/com/datadog/android/profiling/Profiling.kt | 0.00% <0.00%> (ø) |
|
| ...og/android/profiling/DdProfilingContentProvider.kt | 0.00% <0.00%> (ø) |
|
| ...dog/android/profiling/internal/ProfilingFeature.kt | 69.05% <26.67%> (-10.95%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.