[Profiler] Clean up profiler code#6291
Conversation
b70b8c9 to
a0211e3
Compare
Datadog ReportBranch report: ✅ 0 Failed, 454492 Passed, 3218 Skipped, 21h 2m 58.32s Total Time ⌛ Performance Regressions vs Default Branch (5)
|
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 (6291) - mean (69ms) : 66, 73
. : milestone, 69,
master - mean (69ms) : 67, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (986ms) : 961, 1011
. : milestone, 986,
master - mean (983ms) : 961, 1004
. : milestone, 983,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6291) - mean (109ms) : 107, 111
. : milestone, 109,
master - mean (108ms) : 106, 111
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (684ms) : 669, 698
. : milestone, 684,
master - mean (685ms) : 671, 699
. : milestone, 685,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6291) - mean (92ms) : 90, 95
. : milestone, 92,
master - mean (92ms) : 90, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (637ms) : 623, 650
. : milestone, 637,
master - mean (638ms) : 620, 656
. : milestone, 638,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6291) - mean (191ms) : 187, 195
. : milestone, 191,
master - mean (190ms) : 187, 194
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (1,096ms) : 1060, 1131
. : milestone, 1096,
master - mean (1,091ms) : 1066, 1117
. : milestone, 1091,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6291) - mean (277ms) : 271, 284
. : milestone, 277,
master - mean (277ms) : 272, 282
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (879ms) : 847, 910
. : milestone, 879,
master - mean (875ms) : 848, 902
. : milestone, 875,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6291) - mean (268ms) : 263, 272
. : milestone, 268,
master - mean (266ms) : 261, 271
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6291) - mean (859ms) : 823, 895
. : milestone, 859,
master - mean (857ms) : 822, 892
. : milestone, 857,
|
c5fd5dc to
3a5cef0
Compare
Benchmarks Report for tracer 🐌Benchmarks for #6291 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 - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.171 | 585.16 | 685.36 |
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.119 | 448.68 | 401.05 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 447ns | 0.985ns | 3.81ns | 0.00811 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 581ns | 1.33ns | 4.98ns | 0.00753 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 585ns | 0.801ns | 3.1ns | 0.0917 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 476ns | 0.665ns | 2.58ns | 0.00966 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 729ns | 1.21ns | 4.38ns | 0.00953 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 860ns | 2.31ns | 8.94ns | 0.104 | 0 | 0 | 658 B |
| #6291 | StartFinishSpan |
net6.0 | 401ns | 0.412ns | 1.59ns | 0.00804 | 0 | 0 | 576 B |
| #6291 | StartFinishSpan |
netcoreapp3.1 | 552ns | 0.265ns | 0.992ns | 0.00769 | 0 | 0 | 576 B |
| #6291 | StartFinishSpan |
net472 | 685ns | 0.275ns | 1.07ns | 0.0918 | 0 | 0 | 578 B |
| #6291 | StartFinishScope |
net6.0 | 501ns | 0.249ns | 0.931ns | 0.00983 | 0 | 0 | 696 B |
| #6291 | StartFinishScope |
netcoreapp3.1 | 721ns | 0.33ns | 1.23ns | 0.00937 | 0 | 0 | 696 B |
| #6291 | StartFinishScope |
net472 | 862ns | 0.487ns | 1.89ns | 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 | 602ns | 1.3ns | 5.03ns | 0.00969 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 895ns | 2.22ns | 8.32ns | 0.00956 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.13μs | 2.37ns | 9.18ns | 0.104 | 0 | 0 | 658 B |
| #6291 | RunOnMethodBegin |
net6.0 | 596ns | 0.294ns | 1.1ns | 0.00991 | 0 | 0 | 696 B |
| #6291 | RunOnMethodBegin |
netcoreapp3.1 | 905ns | 2.78ns | 10.8ns | 0.00941 | 0 | 0 | 696 B |
| #6291 | RunOnMethodBegin |
net472 | 1.17μs | 0.586ns | 2.27ns | 0.104 | 0 | 0 | 658 B |
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 (6291) (11.027M) : 0, 11026751
master (11.038M) : 0, 11037856
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6291) (7.175M) : 0, 7174690
master (7.290M) : 0, 7290054
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.562M) : 0, 7561734
section Manual
master (11.036M) : 0, 11035836
section Manual + Automatic
This PR (6291) (6.688M) : 0, 6688268
master (6.689M) : 0, 6689266
section DD_TRACE_ENABLED=0
master (10.220M) : 0, 10219721
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6291) (9.549M) : 0, 9548819
master (9.546M) : 0, 9546165
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6291) (6.501M) : 0, 6500605
master (6.394M) : 0, 6393817
section Trace stats
master (6.660M) : 0, 6660181
section Manual
master (9.408M) : 0, 9407542
section Manual + Automatic
This PR (6291) (6.101M) : 0, 6100679
master (5.960M) : 0, 5959995
section DD_TRACE_ENABLED=0
master (8.863M) : 0, 8862796
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6291) (10.159M) : 0, 10159323
master (9.789M) : 0, 9789389
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6291) (6.499M) : 0, 6498811
master (6.248M) : 0, 6248234
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (6.983M) : 0, 6982636
section Manual
master (9.781M) : 0, 9781004
section Manual + Automatic
This PR (6291) (6.135M) : 0, 6135325
master (5.788M) : 0, 5787625
section DD_TRACE_ENABLED=0
master (9.053M) : 0, 9053347
|
3a5cef0 to
6e16ca1
Compare
6e16ca1 to
f794310
Compare
254d802 to
1db1780
Compare
1db1780 to
2ef8605
Compare
2ef8605 to
f827fd3
Compare
- Implement a `LogOnce` - Implement an efficient `LogGcEvent` - Remove the WCF demos stuffs
Summary of changes
Clean up
Reason for change
Winter is coming and need to clean up the code a bit.
Implementation details
LogOnceLogGcEventTest coverage
current tests. No change in behavior.
Other details