-
Notifications
You must be signed in to change notification settings - Fork 147
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 number of CPU samples to the profile #6646
Conversation
Datadog ReportBranch report: ❌ 52 Failed (0 Known Flaky), 246317 Passed, 2908 Skipped, 20h 15m 28.22s Total Time ❌ Failed Tests (52)
|
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 (6646) - mean (70ms) : 63, 76
. : milestone, 70,
master - mean (69ms) : 65, 73
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (999ms) : 977, 1021
. : milestone, 999,
master - mean (992ms) : 968, 1015
. : milestone, 992,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6646) - mean (103ms) : 100, 105
. : milestone, 103,
master - mean (101ms) : 99, 103
. : milestone, 101,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (673ms) : 657, 689
. : milestone, 673,
master - mean (671ms) : 657, 685
. : milestone, 671,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6646) - mean (90ms) : 88, 92
. : milestone, 90,
master - mean (88ms) : 86, 90
. : milestone, 88,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (630ms) : 613, 647
. : milestone, 630,
master - mean (629ms) : 613, 646
. : milestone, 629,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6646) - mean (192ms) : 187, 197
. : milestone, 192,
master - mean (191ms) : 187, 196
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (1,116ms) : 1078, 1154
. : milestone, 1116,
master - mean (1,110ms) : 1081, 1138
. : milestone, 1110,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6646) - mean (274ms) : 267, 281
. : milestone, 274,
master - mean (271ms) : 265, 278
. : milestone, 271,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (868ms) : 836, 900
. : milestone, 868,
master - mean (867ms) : 838, 895
. : milestone, 867,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6646) - mean (264ms) : 260, 267
. : milestone, 264,
master - mean (263ms) : 259, 267
. : milestone, 263,
section CallTarget+Inlining+NGEN
This PR (6646) - mean (840ms) : 810, 870
. : milestone, 840,
master - mean (848ms) : 810, 886
. : milestone, 848,
|
Benchmarks Report for tracer 🐌Benchmarks for #6646 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 - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.150 | 461.34 | 401.02 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 461ns | 0.51ns | 1.97ns | 0.00799 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 545ns | 0.729ns | 2.82ns | 0.00771 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 578ns | 0.762ns | 2.95ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 486ns | 0.446ns | 1.73ns | 0.00982 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 677ns | 0.955ns | 3.7ns | 0.0095 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 767ns | 1.63ns | 6.31ns | 0.104 | 0 | 0 | 658 B |
#6646 | StartFinishSpan |
net6.0 | 401ns | 0.359ns | 1.39ns | 0.00816 | 0 | 0 | 576 B |
#6646 | StartFinishSpan |
netcoreapp3.1 | 553ns | 1.07ns | 4.14ns | 0.00795 | 0 | 0 | 576 B |
#6646 | StartFinishSpan |
net472 | 636ns | 1.25ns | 4.84ns | 0.0917 | 0 | 0 | 578 B |
#6646 | StartFinishScope |
net6.0 | 499ns | 0.665ns | 2.57ns | 0.00988 | 0 | 0 | 696 B |
#6646 | StartFinishScope |
netcoreapp3.1 | 707ns | 1.24ns | 4.82ns | 0.00933 | 0 | 0 | 696 B |
#6646 | StartFinishScope |
net472 | 769ns | 1.16ns | 4.49ns | 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 | 645ns | 0.591ns | 2.29ns | 0.00978 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 891ns | 1.21ns | 4.68ns | 0.00945 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.01μs | 1.92ns | 7.44ns | 0.105 | 0 | 0 | 658 B |
#6646 | RunOnMethodBegin |
net6.0 | 690ns | 0.778ns | 3.01ns | 0.00975 | 0 | 0 | 696 B |
#6646 | RunOnMethodBegin |
netcoreapp3.1 | 883ns | 1.18ns | 4.57ns | 0.00938 | 0 | 0 | 696 B |
#6646 | RunOnMethodBegin |
net472 | 1.05μs | 0.943ns | 3.65ns | 0.104 | 0 | 0 | 658 B |
d9fb1cf
to
0cb7269
Compare
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.
Perfect
@@ -33,8 +34,12 @@ public void GetCpuSamplesIfCpuProfilerIsActivatedByDefault(string appName, strin | |||
|
|||
runner.Run(agent); | |||
|
|||
// only cpu profiler enabled so should see 1 value per sample | |||
SamplesHelper.CheckSamplesValueCount(runner.Environment.PprofDir, 1); | |||
// only cpu profiler enabled so should see 1 value per sample |
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.
// only cpu profiler enabled so should see 1 value per sample | |
// only cpu profiler enabled so should see 2 values per sample (duration and count) |
@@ -51,8 +56,12 @@ public void GetWalltimeSamplesIfWalltimeProfilerIsActivatedByDefault(string appN | |||
|
|||
runner.Run(agent); | |||
|
|||
// only wall time profiler enabled so should see 1 value per sample | |||
SamplesHelper.CheckSamplesValueCount(runner.Environment.PprofDir, 1); | |||
// only cpu profiler enabled so should see 1 value per sample |
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.
// only cpu profiler enabled so should see 1 value per sample | |
// only cpu profiler enabled so should see 2 values per sample (duration and count) |
0cb7269
to
980ee7f
Compare
980ee7f
to
ff655a8
Compare
Summary of changes
Add CPU samples to the profile.
Reason for change
Asked by the backend to enable samples indexing
per sample
(https://datadoghq.atlassian.net/browse/PROF-11330)Implementation details
cpu-samples
value so theCpuProvider
can add it to theSample
Test coverage
Current tests should suffice.
Other details