dd-sdk-android icon indicating copy to clipboard operation
dd-sdk-android copied to clipboard

RUM-12330: Handle multi SDK instance in profiling

Open ambushwork opened this issue 2 months ago • 2 comments

What does this PR do?

This PR handles multi SDK instance in profiling by bringing following changes:

  • PerfettoProfiler hold a map of <InstanceName, ProfilerCallback> to make sure the result can be sent back to the correct instance.
  • ProfilingStorage save 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)

ambushwork avatar Nov 25 '25 15:11 ambushwork

🎯 Code Coverage
Patch Coverage: 72.86%
Total Coverage: 71.37% (-0.01%)
View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5e1f23d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

datadog-official[bot] avatar Nov 25 '25 15:11 datadog-official[bot]

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

Files with missing lines Patch % Lines
...dog/android/profiling/internal/ProfilingFeature.kt 26.67% 10 Missing and 1 partial :warning:
...og/android/profiling/DdProfilingContentProvider.kt 0.00% 4 Missing :warning:
...in/java/com/datadog/android/profiling/Profiling.kt 0.00% 2 Missing :warning:
...atadog/android/internal/data/PreferencesStorage.kt 0.00% 1 Missing :warning:
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:

... and 40 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Nov 25 '25 17:11 codecov-commenter