Skip to content
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

[Profiler] Add metrics for cpu and walltime profilers #6267

Merged

Conversation

gleocadie
Copy link
Collaborator

@gleocadie gleocadie commented Nov 9, 2024

Summary of changes

Add metrics on signal-based profilers.

Reason for change

The goal is to provide visibility on discarded or failing at collecting samples for CPU and walltime profilers (signal-based profilers)

Implementation details

  • Add an enum DiscardReason which reflects the reason a sample could be discarded
  • Add a class DiscardMetrics which is partially templated on DiscardReason and encapsulates one metrics per enum item

Test coverage

Add unit tests.

Other details

@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Nov 9, 2024
@andrewlock
Copy link
Member

andrewlock commented Nov 9, 2024

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 (6267) - mean (73ms)  : 61, 84
     .   : milestone, 73,
    master - mean (74ms)  : 65, 83
     .   : milestone, 74,

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (1,110ms)  : 1086, 1134
     .   : milestone, 1110,
    master - mean (1,110ms)  : 1085, 1135
     .   : milestone, 1110,

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

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (768ms)  : 751, 785
     .   : milestone, 768,
    master - mean (767ms)  : 752, 783
     .   : milestone, 767,

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

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (724ms)  : 709, 739
     .   : milestone, 724,
    master - mean (727ms)  : 714, 739
     .   : milestone, 727,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6267) - mean (191ms)  : 186, 196
     .   : milestone, 191,
    master - mean (190ms)  : 187, 194
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (1,215ms)  : 1190, 1240
     .   : milestone, 1215,
    master - mean (1,212ms)  : 1184, 1240
     .   : milestone, 1212,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6267) - mean (276ms)  : 272, 281
     .   : milestone, 276,
    master - mean (276ms)  : 272, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (948ms)  : 930, 965
     .   : milestone, 948,
    master - mean (942ms)  : 926, 959
     .   : milestone, 942,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6267) - mean (266ms)  : 263, 269
     .   : milestone, 266,
    master - mean (266ms)  : 262, 270
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (6267) - mean (931ms)  : 913, 950
     .   : milestone, 931,
    master - mean (927ms)  : 910, 945
     .   : milestone, 927,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 9, 2024

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6267) (11.098M)   : 0, 11097706
    master (11.106M)   : 0, 11106407
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6267) (7.285M)   : 0, 7285336
    master (7.204M)   : 0, 7204056
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.595M)   : 0, 7595165

    section Manual
    master (11.008M)   : 0, 11007592

    section Manual + Automatic
    This PR (6267) (6.718M)   : 0, 6718447
    master (6.725M)   : 0, 6725238

    section DD_TRACE_ENABLED=0
    master (10.307M)   : 0, 10307106

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6267) (9.609M)   : 0, 9608565
    master (9.667M)   : 0, 9666990
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6267) (6.475M)   : 0, 6474501
    master (6.549M)   : 0, 6549462

    section Trace stats
    master (6.703M)   : 0, 6702885

    section Manual
    master (9.608M)   : 0, 9608456

    section Manual + Automatic
    This PR (6267) (5.830M)   : 0, 5829988
    master (5.958M)   : 0, 5958327

    section DD_TRACE_ENABLED=0
    master (8.816M)   : 0, 8816192

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6267) (9.915M)   : 0, 9914916
    master (9.761M)   : 0, 9761080
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6267) (6.427M)   : 0, 6427449
    master (6.222M)   : 0, 6221888
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.068M)   : 0, 7067863

    section Manual
    master (9.826M)   : 0, 9826453

    section Manual + Automatic
    This PR (6267) (6.120M)   : 0, 6119919
    master (5.724M)   : 0, 5723553

    section DD_TRACE_ENABLED=0
    master (9.178M)   : 0, 9177760

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 9, 2024

Datadog Report

Branch report: gleocadie/add-metrics-on-signal-handler-backoff-reason
Commit report: c131ee5
Test service: dd-trace-dotnet

❌ 1 Failed (0 Known Flaky), 455600 Passed, 3226 Skipped, 21h 3m 56.79s Total Time

❌ Failed Tests (1)

  • ShouldGetLockContentionSamplesViaEtw - Datadog.Profiler.IntegrationTests.Contention.ContentionProfilerTest - Details

    Expand for error
     
     Actual:   Falseilure
    

@andrewlock
Copy link
Member

andrewlock commented Nov 9, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6267 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.13μs 40.7ns 223ns 0.0203 0.00813 0 5.6 KB
master StartStopWithChild netcoreapp3.1 10.2μs 55.1ns 307ns 0.0245 0.0098 0 5.8 KB
master StartStopWithChild net472 16.6μs 48.7ns 189ns 1.06 0.325 0.108 6.21 KB
#6267 StartStopWithChild net6.0 7.99μs 43.5ns 268ns 0.016 0.00799 0 5.61 KB
#6267 StartStopWithChild netcoreapp3.1 10.1μs 56.1ns 354ns 0.0144 0.00478 0 5.8 KB
#6267 StartStopWithChild net472 16.5μs 31.8ns 119ns 1.05 0.312 0.107 6.22 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 467μs 326ns 1.22μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 644μs 322ns 1.25μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 833μs 425ns 1.64μs 0.417 0 0 3.3 KB
#6267 WriteAndFlushEnrichedTraces net6.0 495μs 185ns 715ns 0 0 0 2.7 KB
#6267 WriteAndFlushEnrichedTraces netcoreapp3.1 648μs 362ns 1.4μs 0 0 0 2.7 KB
#6267 WriteAndFlushEnrichedTraces net472 851μs 356ns 1.38μs 0.425 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 203μs 1.17μs 9.7μs 0.192 0 0 18.73 KB
master SendRequest netcoreapp3.1 219μs 1.25μs 8.63μs 0.21 0 0 20.89 KB
master SendRequest net472 0.00233ns 0.000599ns 0.00232ns 0 0 0 0 b
#6267 SendRequest net6.0 200μs 1.16μs 9.7μs 0.191 0 0 18.73 KB
#6267 SendRequest netcoreapp3.1 224μs 1.3μs 12μs 0.222 0 0 20.89 KB
#6267 SendRequest net472 0.000269ns 0.00025ns 0.000865ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 569μs 2.32μs 9.86μs 0.558 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 679μs 3.42μs 15.3μs 0.334 0 0 41.74 KB
master WriteAndFlushEnrichedTraces net472 866μs 2.61μs 9.78μs 8.19 2.59 0.431 53.32 KB
#6267 WriteAndFlushEnrichedTraces net6.0 578μs 2.41μs 9.35μs 0.59 0 0 41.76 KB
#6267 WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 3.32μs 14.9μs 0.34 0 0 41.9 KB
#6267 WriteAndFlushEnrichedTraces net472 845μs 4.12μs 17μs 8.39 2.52 0.419 53.31 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.23μs 0.792ns 3.07ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.81μs 1.07ns 3.99ns 0.0135 0 0 1.02 KB
master ExecuteNonQuery net472 2.04μs 2.13ns 8.26ns 0.156 0.00102 0 987 B
#6267 ExecuteNonQuery net6.0 1.31μs 1.05ns 4.07ns 0.0145 0 0 1.02 KB
#6267 ExecuteNonQuery netcoreapp3.1 1.72μs 0.877ns 3.39ns 0.0137 0 0 1.02 KB
#6267 ExecuteNonQuery net472 2.05μs 2.17ns 8.4ns 0.157 0.00102 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.22μs 0.904ns 3.38ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.6μs 1.49ns 5.77ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.59μs 4.1ns 14.8ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.26μs 0.926ns 3.59ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.63μs 0.761ns 2.74ns 0.0139 0 0 1.02 KB
master CallElasticsearchAsync net472 2.53μs 2.2ns 8.52ns 0.166 0 0 1.05 KB
#6267 CallElasticsearch net6.0 1.18μs 0.338ns 1.26ns 0.0135 0 0 976 B
#6267 CallElasticsearch netcoreapp3.1 1.53μs 1.21ns 4.53ns 0.013 0 0 976 B
#6267 CallElasticsearch net472 2.67μs 2.22ns 8.6ns 0.157 0 0 995 B
#6267 CallElasticsearchAsync net6.0 1.27μs 0.291ns 1.05ns 0.0135 0 0 952 B
#6267 CallElasticsearchAsync netcoreapp3.1 1.66μs 0.99ns 3.57ns 0.0141 0 0 1.02 KB
#6267 CallElasticsearchAsync net472 2.6μs 1.91ns 7.39ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.38μs 0.608ns 2.28ns 0.0132 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.72μs 1.28ns 4.8ns 0.0129 0 0 952 B
master ExecuteAsync net472 1.76μs 0.524ns 1.89ns 0.145 0 0 915 B
#6267 ExecuteAsync net6.0 1.32μs 0.449ns 1.68ns 0.0131 0 0 952 B
#6267 ExecuteAsync netcoreapp3.1 1.67μs 0.623ns 2.33ns 0.0126 0 0 952 B
#6267 ExecuteAsync net472 1.83μs 0.587ns 2.19ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.32μs 2.29ns 8.55ns 0.0325 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.25μs 3.66ns 14.2ns 0.0395 0 0 2.85 KB
master SendAsync net472 7.55μs 1.68ns 6.51ns 0.495 0 0 3.12 KB
#6267 SendAsync net6.0 4.37μs 2.11ns 8.18ns 0.0328 0 0 2.31 KB
#6267 SendAsync netcoreapp3.1 5.35μs 2.32ns 8.68ns 0.0375 0 0 2.85 KB
#6267 SendAsync net472 7.38μs 3.4ns 13.2ns 0.494 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.53μs 0.98ns 3.79ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.26μs 0.962ns 3.47ns 0.0224 0 0 1.64 KB
master EnrichedLog net472 2.57μs 1.52ns 5.9ns 0.249 0 0 1.57 KB
#6267 EnrichedLog net6.0 1.46μs 1.05ns 3.92ns 0.0228 0 0 1.64 KB
#6267 EnrichedLog netcoreapp3.1 2.19μs 1.15ns 4.45ns 0.0219 0 0 1.64 KB
#6267 EnrichedLog net472 2.57μs 2.4ns 9.3ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 119μs 231ns 895ns 0.0594 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 124μs 195ns 756ns 0 0 0 4.28 KB
master EnrichedLog net472 155μs 164ns 634ns 0.697 0.232 0 4.46 KB
#6267 EnrichedLog net6.0 118μs 142ns 549ns 0.0593 0 0 4.28 KB
#6267 EnrichedLog netcoreapp3.1 124μs 202ns 784ns 0 0 0 4.28 KB
#6267 EnrichedLog net472 152μs 87.3ns 338ns 0.68 0.227 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.87μs 0.836ns 3.24ns 0.0301 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.19μs 1.71ns 6.62ns 0.0291 0 0 2.2 KB
master EnrichedLog net472 4.94μs 1.55ns 5.82ns 0.319 0 0 2.02 KB
#6267 EnrichedLog net6.0 3.01μs 1.16ns 4.51ns 0.03 0 0 2.2 KB
#6267 EnrichedLog netcoreapp3.1 4.1μs 1.11ns 4.3ns 0.0286 0 0 2.2 KB
#6267 EnrichedLog net472 4.73μs 1.1ns 4.28ns 0.32 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.35μs 1.79ns 6.93ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.77μs 0.842ns 3.26ns 0.0151 0 0 1.14 KB
master SendReceive net472 2.1μs 1.2ns 4.64ns 0.183 0 0 1.16 KB
#6267 SendReceive net6.0 1.33μs 0.969ns 3.75ns 0.016 0 0 1.14 KB
#6267 SendReceive netcoreapp3.1 1.77μs 0.945ns 3.66ns 0.015 0 0 1.14 KB
#6267 SendReceive net472 2.03μs 1.04ns 3.89ns 0.184 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.86μs 1.68ns 6.52ns 0.0227 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.88μs 3.73ns 14.4ns 0.0217 0 0 1.65 KB
master EnrichedLog net472 4.32μs 3.06ns 11.9ns 0.323 0 0 2.04 KB
#6267 EnrichedLog net6.0 2.75μs 0.725ns 2.71ns 0.023 0 0 1.6 KB
#6267 EnrichedLog netcoreapp3.1 4μs 2.42ns 9.05ns 0.0221 0 0 1.65 KB
#6267 EnrichedLog net472 4.42μs 2.23ns 8.36ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 462ns 0.48ns 1.8ns 0.00814 0 0 576 B
master StartFinishSpan netcoreapp3.1 606ns 1.29ns 5ns 0.00788 0 0 576 B
master StartFinishSpan net472 720ns 1.02ns 3.94ns 0.0917 0 0 578 B
master StartFinishScope net6.0 533ns 0.405ns 1.57ns 0.00967 0 0 696 B
master StartFinishScope netcoreapp3.1 692ns 0.935ns 3.62ns 0.00938 0 0 696 B
master StartFinishScope net472 884ns 0.808ns 3.13ns 0.104 0 0 658 B
#6267 StartFinishSpan net6.0 477ns 0.641ns 2.48ns 0.00801 0 0 576 B
#6267 StartFinishSpan netcoreapp3.1 571ns 0.42ns 1.63ns 0.00773 0 0 576 B
#6267 StartFinishSpan net472 722ns 0.688ns 2.66ns 0.0918 0 0 578 B
#6267 StartFinishScope net6.0 484ns 0.381ns 1.47ns 0.00959 0 0 696 B
#6267 StartFinishScope netcoreapp3.1 739ns 0.862ns 3.34ns 0.00954 0 0 696 B
#6267 StartFinishScope net472 902ns 0.553ns 2.14ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 603ns 1.73ns 6.48ns 0.00961 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 900ns 0.624ns 2.16ns 0.0093 0 0 696 B
master RunOnMethodBegin net472 1.1μs 1.45ns 5.62ns 0.104 0 0 658 B
#6267 RunOnMethodBegin net6.0 645ns 0.586ns 2.27ns 0.00976 0 0 696 B
#6267 RunOnMethodBegin netcoreapp3.1 913ns 0.775ns 3ns 0.00955 0 0 696 B
#6267 RunOnMethodBegin net472 1.11μs 1.12ns 4.33ns 0.105 0 0 658 B

@gleocadie gleocadie force-pushed the gleocadie/add-metrics-on-signal-handler-backoff-reason branch 2 times, most recently from 43d067b to e729025 Compare November 13, 2024 10:06
@gleocadie gleocadie marked this pull request as ready for review November 13, 2024 10:14
@gleocadie gleocadie requested a review from a team as a code owner November 13, 2024 10:14
@gleocadie gleocadie force-pushed the gleocadie/add-metrics-on-signal-handler-backoff-reason branch 2 times, most recently from 988a478 to 574a8d3 Compare November 13, 2024 11:16

// For now have one metric for both walltime and cpu (naive)
_samplingRequest = metricsRegistry.GetOrRegister<CounterMetric>("dotnet_walltime_cpu_sampling_requests");
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_walltime_cpu_sample_discard");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_walltime_cpu_sample_discard");
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_walltime_cpu_sample_discarded");

@@ -32,6 +34,8 @@ TimerCreateCpuProfiler::TimerCreateCpuProfiler(
{
Log::Info("Cpu profiling interval: ", _samplingInterval.count(), "ms");
Log::Info("timer_create Cpu profiler is enabled");
_totalSampling = metricsRegistry.GetOrRegister<CounterMetric>("dotnet_cpu_sampling_requests");
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_cpu_sample_discard");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_cpu_sample_discard");
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_cpu_sample_discarded");

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

@gleocadie gleocadie force-pushed the gleocadie/add-metrics-on-signal-handler-backoff-reason branch from 0b97be0 to ee61892 Compare November 14, 2024 09:17
@gleocadie gleocadie force-pushed the gleocadie/add-metrics-on-signal-handler-backoff-reason branch from ee61892 to c131ee5 Compare November 14, 2024 20:43
@gleocadie gleocadie merged commit 1527d43 into master Nov 15, 2024
80 of 85 checks passed
@gleocadie gleocadie deleted the gleocadie/add-metrics-on-signal-handler-backoff-reason branch November 15, 2024 07:57
@github-actions github-actions bot added this to the vNext-v3 milestone Nov 15, 2024
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