Skip to content

[Profiler] Little improvement #6830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2025

Conversation

gleocadie
Copy link
Collaborator

@gleocadie gleocadie commented Apr 8, 2025

Summary of changes

Use only one container in Sample class to store labels.

Reason for change

There is 2 types of labels: numeric and string. The type is related to the type of the value.
Before that we had 2 containers (one per type of label).

Implementation details

  • Use std::variant to store NumericLabel and StringLabel labels in the same container.
  • Use std::visit to have a processing per label type.
  • Rename Label into StringLabel
  • Remove SpanLabel and use NumericLabel instead (since it's a Numeric label)

Test coverage

Current test should be suffice

Other details

@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Apr 8, 2025
@gleocadie gleocadie force-pushed the gleocadie/refactor-labels-in-sample-class branch from e21791e to 36fe51e Compare April 8, 2025 15:04
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Apr 8, 2025

Datadog Report

All test runs 274a1e0 🔗

2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Test Service View
dd-trace-dotnet 0 0 0 247940 2932 23h 1m 17.72s Link
exploration_tests 0 0 0 22085 3 2m 14.08s Link

@andrewlock
Copy link
Member

andrewlock commented Apr 8, 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.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (71ms)  : 66, 75
     .   : milestone, 71,
    master - mean (69ms)  : 67, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (1,001ms)  : 975, 1028
     .   : milestone, 1001,
    master - mean (999ms)  : 978, 1020
     .   : milestone, 999,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (103ms)  : 101, 106
     .   : milestone, 103,
    master - mean (103ms)  : 100, 106
     .   : milestone, 103,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (692ms)  : 671, 713
     .   : milestone, 692,
    master - mean (691ms)  : 672, 711
     .   : milestone, 691,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (90ms)  : 88, 93
     .   : milestone, 90,
    master - mean (90ms)  : 88, 92
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (645ms)  : 630, 660
     .   : milestone, 645,
    master - mean (646ms)  : 629, 662
     .   : milestone, 646,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (189ms)  : 185, 192
     .   : milestone, 189,
    master - mean (189ms)  : 184, 195
     .   : milestone, 189,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (1,099ms)  : 1075, 1123
     .   : milestone, 1099,
    master - mean (1,099ms)  : 1070, 1128
     .   : milestone, 1099,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (268ms)  : 263, 272
     .   : milestone, 268,
    master - mean (268ms)  : 264, 272
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (870ms)  : 845, 896
     .   : milestone, 870,
    master - mean (870ms)  : 845, 895
     .   : milestone, 870,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6830) - mean (260ms)  : 256, 264
     .   : milestone, 260,
    master - mean (260ms)  : 256, 264
     .   : milestone, 260,

    section CallTarget+Inlining+NGEN
    This PR (6830) - mean (859ms)  : 824, 894
     .   : milestone, 859,
    master - mean (855ms)  : 825, 885
     .   : milestone, 855,

Loading

@gleocadie gleocadie force-pushed the gleocadie/refactor-labels-in-sample-class branch from f248757 to 80ff489 Compare April 9, 2025 08:04
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Apr 9, 2025

Datadog Report

Branch report: gleocadie/refactor-labels-in-sample-class
Commit report: 274a1e0
Test service: dd-trace-dotnet

✅ 0 Failed, 12 Passed, 0 Skipped, 0s Total Time

@gleocadie gleocadie force-pushed the gleocadie/refactor-labels-in-sample-class branch from 80ff489 to 274a1e0 Compare April 9, 2025 11:38
@gleocadie gleocadie marked this pull request as ready for review April 9, 2025 11:44
@gleocadie gleocadie requested a review from a team as a code owner April 9, 2025 11:44
Copy link
Contributor

@chrisnas chrisnas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chrisnas chrisnas merged commit e84e7a5 into master Apr 16, 2025
132 of 134 checks passed
@chrisnas chrisnas deleted the gleocadie/refactor-labels-in-sample-class branch April 16, 2025 16:16
@github-actions github-actions bot added this to the vNext-v3 milestone Apr 16, 2025
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