-
Notifications
You must be signed in to change notification settings - Fork 142
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
[Profiler] Add metrics for cpu and walltime profilers #6267
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.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,
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,
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,
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,
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,
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,
|
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
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
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
|
Datadog ReportBranch report: ❌ 1 Failed (0 Known Flaky), 455600 Passed, 3226 Skipped, 21h 3m 56.79s Total Time ❌ Failed Tests (1)
|
Benchmarks Report for tracer 🐌Benchmarks for #6267 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
43d067b
to
e729025
Compare
988a478
to
574a8d3
Compare
|
||
// 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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_cpu_sample_discard"); | |
_discardMetrics = metricsRegistry.GetOrRegister<DiscardMetrics>("dotnet_cpu_sample_discarded"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0b97be0
to
ee61892
Compare
ee61892
to
c131ee5
Compare
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
DiscardReason
which reflects the reason a sample could be discardedDiscardMetrics
which is partially templated onDiscardReason
and encapsulates one metrics per enum itemTest coverage
Add unit tests.
Other details