Trim whitespace in DBM_PROPAGATION_MODE#6332
Conversation
Ensures that we'll trim if we use this function somewhere else
Datadog ReportBranch report: ✅ 0 Failed, 447044 Passed, 2730 Skipped, 19h 17m 21.92s Total Time ⌛ Performance Regressions vs Default Branch (1)
|
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 (6332) - mean (72ms) : 64, 80
. : milestone, 72,
master - mean (72ms) : 64, 80
. : milestone, 72,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (1,108ms) : 1091, 1125
. : milestone, 1108,
master - mean (1,106ms) : 1085, 1128
. : milestone, 1106,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6332) - mean (108ms) : 105, 110
. : milestone, 108,
master - mean (108ms) : 106, 111
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (771ms) : 755, 787
. : milestone, 771,
master - mean (767ms) : 753, 781
. : milestone, 767,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6332) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (723ms) : 707, 739
. : milestone, 723,
master - mean (722ms) : 707, 737
. : milestone, 722,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6332) - mean (192ms) : 187, 196
. : milestone, 192,
master - mean (191ms) : 186, 196
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (1,217ms) : 1189, 1245
. : milestone, 1217,
master - mean (1,213ms) : 1192, 1234
. : milestone, 1213,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6332) - mean (277ms) : 273, 282
. : milestone, 277,
master - mean (277ms) : 273, 281
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (947ms) : 931, 964
. : milestone, 947,
master - mean (947ms) : 933, 961
. : milestone, 947,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6332) - mean (267ms) : 263, 271
. : milestone, 267,
master - mean (266ms) : 261, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6332) - mean (932ms) : 911, 953
. : milestone, 932,
master - mean (933ms) : 914, 951
. : milestone, 933,
|
Benchmarks Report for tracer 🐌Benchmarks for #6332 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‑netcoreapp3.1 | 1.352 | 724.96 | 536.37 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 448ns | 0.435ns | 1.68ns | 0.00811 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 725ns | 0.787ns | 2.95ns | 0.0078 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 644ns | 0.909ns | 3.52ns | 0.0915 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 481ns | 0.915ns | 3.54ns | 0.00972 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 750ns | 0.884ns | 3.31ns | 0.00924 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 908ns | 1.77ns | 6.84ns | 0.104 | 0 | 0 | 658 B |
| #6332 | StartFinishSpan |
net6.0 | 411ns | 0.909ns | 3.52ns | 0.00801 | 0 | 0 | 576 B |
| #6332 | StartFinishSpan |
netcoreapp3.1 | 536ns | 0.931ns | 3.48ns | 0.00794 | 0 | 0 | 576 B |
| #6332 | StartFinishSpan |
net472 | 633ns | 1.9ns | 7.36ns | 0.0918 | 0 | 0 | 578 B |
| #6332 | StartFinishScope |
net6.0 | 494ns | 0.844ns | 3.27ns | 0.00986 | 0 | 0 | 696 B |
| #6332 | StartFinishScope |
netcoreapp3.1 | 684ns | 1.62ns | 6.28ns | 0.0095 | 0 | 0 | 696 B |
| #6332 | StartFinishScope |
net472 | 876ns | 1.84ns | 7.12ns | 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 | 660ns | 1.14ns | 4.43ns | 0.0096 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 884ns | 2.16ns | 8.37ns | 0.00946 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.18μs | 2.81ns | 10.5ns | 0.104 | 0 | 0 | 658 B |
| #6332 | RunOnMethodBegin |
net6.0 | 653ns | 0.874ns | 3.39ns | 0.00985 | 0 | 0 | 696 B |
| #6332 | RunOnMethodBegin |
netcoreapp3.1 | 911ns | 1.97ns | 7.64ns | 0.00915 | 0 | 0 | 696 B |
| #6332 | RunOnMethodBegin |
net472 | 1.11μs | 1.24ns | 4.81ns | 0.104 | 0 | 0 | 658 B |
## Summary of changes
Trims whitespace in `DBM_PROPAGATION_MODE`
## Reason for change
Saw usages of `DBM_PROPAGATION_MODE` : `service ` <- note the space at
the end, which caused DBM to be disabled.
## Implementation details
Added `.Trim()`
## Test coverage
Added tests
## Other details
<!-- Fixes #{issue} -->
https://datadoghq.atlassian.net/browse/AIDM-493
<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->
Summary of changes
Trims whitespace in
DBM_PROPAGATION_MODEReason for change
Saw usages of
DBM_PROPAGATION_MODE:service<- note the space at the end, which caused DBM to be disabled.Implementation details
Added
.Trim()Test coverage
Added tests
Other details
https://datadoghq.atlassian.net/browse/AIDM-493