[Profiler] Add Index to samples and build index vector for libdatadog#7559
Merged
[Profiler] Add Index to samples and build index vector for libdatadog#7559
Conversation
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:
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,
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,
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,
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,
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,
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,
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,
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,
|
gleocadie
approved these changes
Oct 1, 2025
profiler/src/ProfilerEngine/Datadog.Profiler.Native/RawCpuSample.h
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
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. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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