Skip to content

Conversation

@chrisnas
Copy link
Contributor

Summary of changes

Add index to samples

Reason for change

Libdatadog will update the API to create and send .pprof. In that context, it is needed to map offsets in values vector to specific profiles used to create .pprof or OTel format.

Implementation details

Propagate the index from the providers to the samples down to the profile exporter.

Test coverage

Add SampleTypeProvider tests

Other details

@chrisnas chrisnas requested a review from a team as a code owner September 24, 2025 17:25
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Sep 24, 2025
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Sep 29, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7559) - mean (68ms)  : 66, 70
     .   : milestone, 68,
    master - mean (68ms)  : 66, 71
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (1,074ms)  : 981, 1166
     .   : milestone, 1074,
    master - mean (1,047ms)  : 997, 1097
     .   : milestone, 1047,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (106ms)  : 105, 108
     .   : milestone, 106,
    master - mean (106ms)  : 105, 107
     .   : milestone, 106,

    section Baseline
    This PR (7559) - mean (106ms)  : 103, 108
     .   : milestone, 106,
    master - mean (106ms)  : 103, 108
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (745ms)  : 727, 763
     .   : milestone, 745,
    master - mean (741ms)  : 719, 764
     .   : milestone, 741,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (101ms)  : crit, 100, 102
     .   : crit, milestone, 101,
    master - mean (94ms)  : 93, 95
     .   : milestone, 94,

    section Baseline
    This PR (7559) - mean (100ms)  : 97, 102
     .   : milestone, 100,
    master - mean (94ms)  : 91, 96
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (775ms)  : crit, 727, 824
     .   : crit, milestone, 775,
    master - mean (701ms)  : 684, 719
     .   : milestone, 701,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (92ms)  : 92, 93
     .   : milestone, 92,
    master - mean (92ms)  : 91, 94
     .   : milestone, 92,

    section Baseline
    This PR (7559) - mean (92ms)  : 90, 94
     .   : milestone, 92,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (658ms)  : 643, 673
     .   : milestone, 658,
    master - mean (666ms)  : 648, 683
     .   : milestone, 666,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (200ms)  : 197, 202
     .   : milestone, 200,
    master - mean (199ms)  : 195, 202
     .   : milestone, 199,

    section Baseline
    This PR (7559) - mean (196ms)  : 191, 202
     .   : milestone, 196,
    master - mean (196ms)  : 191, 201
     .   : milestone, 196,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (1,180ms)  : 1132, 1229
     .   : milestone, 1180,
    master - mean (1,180ms)  : 1114, 1246
     .   : milestone, 1180,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (283ms)  : 277, 288
     .   : milestone, 283,
    master - mean (282ms)  : 276, 287
     .   : milestone, 282,

    section Baseline
    This PR (7559) - mean (283ms)  : 277, 289
     .   : milestone, 283,
    master - mean (282ms)  : 277, 286
     .   : milestone, 282,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (945ms)  : 906, 984
     .   : milestone, 945,
    master - mean (943ms)  : 905, 982
     .   : milestone, 943,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (286ms)  : 281, 291
     .   : milestone, 286,
    master - mean (275ms)  : 270, 280
     .   : milestone, 275,

    section Baseline
    This PR (7559) - mean (287ms)  : 279, 295
     .   : milestone, 287,
    master - mean (276ms)  : 270, 281
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (1,005ms)  : crit, 954, 1056
     .   : crit, milestone, 1005,
    master - mean (931ms)  : 891, 971
     .   : milestone, 931,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7559) - mean (274ms)  : 271, 277
     .   : milestone, 274,
    master - mean (276ms)  : 269, 282
     .   : milestone, 276,

    section Baseline
    This PR (7559) - mean (275ms)  : 270, 280
     .   : milestone, 275,
    master - mean (273ms)  : 268, 278
     .   : milestone, 273,

    section CallTarget+Inlining+NGEN
    This PR (7559) - mean (860ms)  : 835, 884
     .   : milestone, 860,
    master - mean (863ms)  : 843, 883
     .   : milestone, 863,

Loading

@datadog-official

This comment has been minimized.

@chrisnas chrisnas merged commit 23911c1 into master Oct 3, 2025
159 checks passed
@chrisnas chrisnas deleted the chrisnas/many_profiles_per_pprof branch October 3, 2025 12:48
@github-actions github-actions bot added this to the vNext-v3 milestone Oct 3, 2025
igoragoli pushed a commit that referenced this pull request Oct 6, 2025
…#7559)

## Summary of changes

Add index to samples 

## Reason for change
Libdatadog will update the API to create and send .pprof. In that
context, it is needed to map offsets in values vector to specific
profiles used to create .pprof or OTel format.

## Implementation details
Propagate the index from the providers to the samples down to the
profile exporter.

## Test coverage
Add SampleTypeProvider tests

## Other details
<!-- Fixes #{issue} -->


<!--  ⚠️ Note:

Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.

MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:profiler Issues related to the continous-profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants