No longer forgive spans.Array from being null#6878
Conversation
Benchmarks Report for tracer 🐌Benchmarks for #6878 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.08 KB | 6.18 KB | 98 B | 1.61% |
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 | 5.73 KB | 5.76 KB | 30 B | 0.52% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 8.5μs | 138ns | 1.38μs | 0 | 0 | 0 | 5.54 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 10.1μs | 115ns | 1.15μs | 0 | 0 | 0 | 5.73 KB |
| master | StartStopWithChild |
net472 | 15.3μs | 80.8ns | 554ns | 1.09 | 0.409 | 0.136 | 6.08 KB |
| #6878 | StartStopWithChild |
net6.0 | 8.31μs | 147ns | 1.47μs | 0 | 0 | 0 | 5.54 KB |
| #6878 | StartStopWithChild |
netcoreapp3.1 | 10.1μs | 94.8ns | 924ns | 0 | 0 | 0 | 5.76 KB |
| #6878 | StartStopWithChild |
net472 | 15.3μs | 83.6ns | 567ns | 1.01 | 0.27 | 0.0674 | 6.18 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 | 499μs | 1.8μs | 6.97μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 656μs | 1.82μs | 6.82μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 844μs | 1.57μs | 6.08μs | 0 | 0 | 0 | 3.31 KB |
| #6878 | WriteAndFlushEnrichedTraces |
net6.0 | 502μs | 746ns | 2.58μs | 0 | 0 | 0 | 2.7 KB |
| #6878 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 663μs | 763ns | 2.85μs | 0 | 0 | 0 | 2.7 KB |
| #6878 | WriteAndFlushEnrichedTraces |
net472 | 847μs | 1.15μs | 4.3μs | 0 | 0 | 0 | 3.31 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 | 133μs | 658ns | 2.87μs | 0 | 0 | 0 | 14.48 KB |
| master | SendRequest |
netcoreapp3.1 | 147μs | 407ns | 1.57μs | 0 | 0 | 0 | 17.28 KB |
| master | SendRequest |
net472 | 0.00206ns | 0.000933ns | 0.00349ns | 0 | 0 | 0 | 0 b |
| #6878 | SendRequest |
net6.0 | 130μs | 702ns | 3.71μs | 0 | 0 | 0 | 14.48 KB |
| #6878 | SendRequest |
netcoreapp3.1 | 149μs | 587ns | 2.35μs | 0 | 0 | 0 | 17.28 KB |
| #6878 | SendRequest |
net472 | 0.00643ns | 0.00139ns | 0.00538ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #6878
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.48 KB
41.73 KB
247 B
0.60%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.48 KB | 41.73 KB | 247 B | 0.60% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 647μs | 10.1μs | 99.8μs | 0 | 0 | 0 | 41.48 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 762μs | 9.74μs | 95.4μs | 0 | 0 | 0 | 41.79 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 865μs | 4.99μs | 45.7μs | 4.81 | 0 | 0 | 53.41 KB |
| #6878 | WriteAndFlushEnrichedTraces |
net6.0 | 644μs | 9.92μs | 98.7μs | 0 | 0 | 0 | 41.73 KB |
| #6878 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 761μs | 6.89μs | 68.9μs | 0 | 0 | 0 | 41.76 KB |
| #6878 | WriteAndFlushEnrichedTraces |
net472 | 892μs | 5.95μs | 59.2μs | 4.46 | 0 | 0 | 53.42 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.25μs | 2.93ns | 10.9ns | 0.0125 | 0 | 0 | 1.03 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 1.75μs | 4.99ns | 19.3ns | 0.00866 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.17μs | 4.44ns | 17.2ns | 0.15 | 0.0107 | 0 | 995 B |
| #6878 | ExecuteNonQuery |
net6.0 | 1.29μs | 3.65ns | 13.2ns | 0.0129 | 0 | 0 | 1.03 KB |
| #6878 | ExecuteNonQuery |
netcoreapp3.1 | 1.83μs | 3.97ns | 14.3ns | 0.00921 | 0 | 0 | 1.02 KB |
| #6878 | ExecuteNonQuery |
net472 | 2.11μs | 2.39ns | 8.94ns | 0.158 | 0.0105 | 0 | 995 B |
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6878
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.129
1,381.01
1,223.66
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.129 | 1,381.01 | 1,223.66 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.38μs | 1.28ns | 4.97ns | 0.0138 | 0 | 0 | 984 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.66μs | 1.05ns | 4.08ns | 0.00828 | 0 | 0 | 984 B |
| master | CallElasticsearch |
net472 | 2.53μs | 1.4ns | 5.43ns | 0.152 | 0 | 0 | 1 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.23μs | 0.83ns | 3.22ns | 0.0123 | 0 | 0 | 960 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 1.58ns | 5.69ns | 0.0084 | 0 | 0 | 1.03 KB |
| master | CallElasticsearchAsync |
net472 | 2.63μs | 2.51ns | 9.39ns | 0.158 | 0 | 0 | 1.06 KB |
| #6878 | CallElasticsearch |
net6.0 | 1.22μs | 0.948ns | 3.55ns | 0.0122 | 0 | 0 | 984 B |
| #6878 | CallElasticsearch |
netcoreapp3.1 | 1.51μs | 0.895ns | 3.23ns | 0.00765 | 0 | 0 | 984 B |
| #6878 | CallElasticsearch |
net472 | 2.6μs | 1.04ns | 3.91ns | 0.156 | 0 | 0 | 1 KB |
| #6878 | CallElasticsearchAsync |
net6.0 | 1.21μs | 0.93ns | 3.6ns | 0.0121 | 0 | 0 | 960 B |
| #6878 | CallElasticsearchAsync |
netcoreapp3.1 | 1.66μs | 1.14ns | 4.28ns | 0.00819 | 0 | 0 | 1.03 KB |
| #6878 | CallElasticsearchAsync |
net472 | 2.63μs | 2.72ns | 10.5ns | 0.158 | 0 | 0 | 1.06 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.29μs | 0.526ns | 1.97ns | 0.0133 | 0 | 0 | 960 B |
| master | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 1.21ns | 4.54ns | 0.00826 | 0 | 0 | 960 B |
| master | ExecuteAsync |
net472 | 1.85μs | 1ns | 3.88ns | 0.139 | 0 | 0 | 923 B |
| #6878 | ExecuteAsync |
net6.0 | 1.32μs | 0.365ns | 1.37ns | 0.0132 | 0 | 0 | 960 B |
| #6878 | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 1.84ns | 6.88ns | 0.00826 | 0 | 0 | 960 B |
| #6878 | ExecuteAsync |
net472 | 1.81μs | 0.668ns | 2.5ns | 0.145 | 0 | 0 | 923 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.43μs | 3.03ns | 11.7ns | 0.0221 | 0 | 0 | 2.32 KB |
| master | SendAsync |
netcoreapp3.1 | 5.43μs | 3.6ns | 13ns | 0.0271 | 0 | 0 | 2.86 KB |
| master | SendAsync |
net472 | 7.47μs | 4.06ns | 15.7ns | 0.485 | 0 | 0 | 3.13 KB |
| #6878 | SendAsync |
net6.0 | 4.53μs | 3.23ns | 12.5ns | 0.0229 | 0 | 0 | 2.32 KB |
| #6878 | SendAsync |
netcoreapp3.1 | 5.34μs | 2.77ns | 10.7ns | 0.0267 | 0 | 0 | 2.86 KB |
| #6878 | SendAsync |
net472 | 7.51μs | 3.36ns | 13ns | 0.489 | 0 | 0 | 3.13 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 | 2.15ns | 8.05ns | 0.0228 | 0 | 0 | 1.71 KB |
| master | EnrichedLog |
netcoreapp3.1 | 2.18μs | 2.57ns | 9.62ns | 0.022 | 0 | 0 | 1.71 KB |
| master | EnrichedLog |
net472 | 2.7μs | 1.95ns | 7.57ns | 0.256 | 0 | 0 | 1.64 KB |
| #6878 | EnrichedLog |
net6.0 | 1.52μs | 1.36ns | 5.1ns | 0.0227 | 0 | 0 | 1.71 KB |
| #6878 | EnrichedLog |
netcoreapp3.1 | 2.12μs | 3.54ns | 13.7ns | 0.0211 | 0 | 0 | 1.71 KB |
| #6878 | EnrichedLog |
net472 | 2.58μs | 1.87ns | 7.25ns | 0.258 | 0 | 0 | 1.64 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 | 114μs | 388ns | 1.45μs | 0 | 0 | 0 | 4.32 KB |
| master | EnrichedLog |
netcoreapp3.1 | 115μs | 152ns | 569ns | 0 | 0 | 0 | 4.32 KB |
| master | EnrichedLog |
net472 | 150μs | 144ns | 540ns | 0 | 0 | 0 | 4.51 KB |
| #6878 | EnrichedLog |
net6.0 | 112μs | 178ns | 666ns | 0 | 0 | 0 | 4.32 KB |
| #6878 | EnrichedLog |
netcoreapp3.1 | 116μs | 383ns | 1.49μs | 0 | 0 | 0 | 4.32 KB |
| #6878 | EnrichedLog |
net472 | 151μs | 72.5ns | 262ns | 0 | 0 | 0 | 4.51 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 | 3.08μs | 1.82ns | 6.83ns | 0.0305 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 4.1μs | 3.33ns | 12ns | 0.0204 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 4.81μs | 2.55ns | 9.19ns | 0.313 | 0 | 0 | 2.09 KB |
| #6878 | EnrichedLog |
net6.0 | 2.94μs | 2.15ns | 8.34ns | 0.0293 | 0 | 0 | 2.26 KB |
| #6878 | EnrichedLog |
netcoreapp3.1 | 4.24μs | 1.95ns | 7.31ns | 0.0213 | 0 | 0 | 2.26 KB |
| #6878 | EnrichedLog |
net472 | 4.77μs | 1.42ns | 4.91ns | 0.311 | 0 | 0 | 2.09 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.34μs | 0.843ns | 3.15ns | 0.0135 | 0 | 0 | 1.15 KB |
| master | SendReceive |
netcoreapp3.1 | 1.81μs | 3.66ns | 14.2ns | 0.0089 | 0 | 0 | 1.15 KB |
| master | SendReceive |
net472 | 2.15μs | 1.36ns | 5.09ns | 0.182 | 0 | 0 | 1.16 KB |
| #6878 | SendReceive |
net6.0 | 1.34μs | 0.92ns | 3.44ns | 0.0137 | 0 | 0 | 1.15 KB |
| #6878 | SendReceive |
netcoreapp3.1 | 1.83μs | 1.29ns | 4.98ns | 0.00903 | 0 | 0 | 1.15 KB |
| #6878 | SendReceive |
net472 | 2.06μs | 1.57ns | 6.08ns | 0.176 | 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.8μs | 1.47ns | 5.71ns | 0.014 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.92μs | 1.87ns | 6.99ns | 0.02 | 0 | 0 | 1.69 KB |
| master | EnrichedLog |
net472 | 4.53μs | 4.58ns | 17.7ns | 0.316 | 0 | 0 | 2.08 KB |
| #6878 | EnrichedLog |
net6.0 | 2.7μs | 2.1ns | 7.87ns | 0.0135 | 0 | 0 | 1.64 KB |
| #6878 | EnrichedLog |
netcoreapp3.1 | 4.11μs | 4.13ns | 15.4ns | 0.0205 | 0 | 0 | 1.69 KB |
| #6878 | EnrichedLog |
net472 | 4.44μs | 2.27ns | 8.18ns | 0.311 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6878
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.141
402.52
459.22
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.141 | 402.52 | 459.22 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 402ns | 0.828ns | 3.21ns | 0.00802 | 0 | 0 | 584 B |
| master | StartFinishSpan |
netcoreapp3.1 | 570ns | 0.832ns | 3.22ns | 0.00576 | 0 | 0 | 584 B |
| master | StartFinishSpan |
net472 | 674ns | 1.04ns | 4.04ns | 0.0905 | 0 | 0 | 586 B |
| master | StartFinishScope |
net6.0 | 498ns | 0.813ns | 3.15ns | 0.01 | 0 | 0 | 704 B |
| master | StartFinishScope |
netcoreapp3.1 | 707ns | 0.89ns | 3.45ns | 0.00707 | 0 | 0 | 704 B |
| master | StartFinishScope |
net472 | 842ns | 0.951ns | 3.43ns | 0.102 | 0 | 0 | 666 B |
| #6878 | StartFinishSpan |
net6.0 | 459ns | 0.292ns | 1.05ns | 0.00682 | 0 | 0 | 584 B |
| #6878 | StartFinishSpan |
netcoreapp3.1 | 569ns | 0.602ns | 2.33ns | 0.00572 | 0 | 0 | 584 B |
| #6878 | StartFinishSpan |
net472 | 676ns | 0.512ns | 1.92ns | 0.0917 | 0 | 0 | 586 B |
| #6878 | StartFinishScope |
net6.0 | 499ns | 0.334ns | 1.25ns | 0.01 | 0 | 0 | 704 B |
| #6878 | StartFinishScope |
netcoreapp3.1 | 761ns | 0.412ns | 1.49ns | 0.00769 | 0 | 0 | 704 B |
| #6878 | StartFinishScope |
net472 | 875ns | 0.416ns | 1.56ns | 0.105 | 0 | 0 | 666 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 | 700ns | 0.528ns | 2.05ns | 0.007 | 0 | 0 | 704 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 963ns | 1.92ns | 7.42ns | 0.00966 | 0 | 0 | 704 B |
| master | RunOnMethodBegin |
net472 | 1.14μs | 0.188ns | 0.678ns | 0.102 | 0 | 0 | 666 B |
| #6878 | RunOnMethodBegin |
net6.0 | 696ns | 0.831ns | 3.11ns | 0.00698 | 0 | 0 | 704 B |
| #6878 | RunOnMethodBegin |
netcoreapp3.1 | 976ns | 0.812ns | 3.15ns | 0.0095 | 0 | 0 | 704 B |
| #6878 | RunOnMethodBegin |
net472 | 1.13μs | 0.543ns | 2.1ns | 0.102 | 0 | 0 | 666 B |
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.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (84ms) : crit, 81, 86
. : crit, milestone, 84,
master - mean (72ms) : 70, 73
. : milestone, 72,
section Baseline
This PR (6878) - mean (79ms) : 77, 81
. : milestone, 79,
master - mean (68ms) : 67, 70
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (1,154ms) : crit, 1076, 1233
. : crit, milestone, 1154,
master - mean (1,051ms) : 995, 1106
. : milestone, 1051,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (123ms) : crit, 120, 126
. : crit, milestone, 123,
master - mean (107ms) : 105, 108
. : milestone, 107,
section Baseline
This PR (6878) - mean (122ms) : 118, 126
. : milestone, 122,
master - mean (106ms) : 104, 109
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (802ms) : crit, 752, 852
. : crit, milestone, 802,
master - mean (745ms) : 728, 763
. : milestone, 745,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (102ms) : 100, 104
. : milestone, 102,
master - mean (101ms) : 99, 102
. : milestone, 101,
section Baseline
This PR (6878) - mean (101ms) : 98, 104
. : milestone, 101,
master - mean (100ms) : 98, 102
. : milestone, 100,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (776ms) : 730, 823
. : milestone, 776,
master - mean (771ms) : 716, 826
. : milestone, 771,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (93ms) : 91, 94
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (6878) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (660ms) : 644, 675
. : milestone, 660,
master - mean (663ms) : 651, 675
. : milestone, 663,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (206ms) : 199, 214
. : milestone, 206,
master - mean (207ms) : 197, 218
. : milestone, 207,
section Baseline
This PR (6878) - mean (203ms) : 194, 212
. : milestone, 203,
master - mean (204ms) : 192, 216
. : milestone, 204,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (1,219ms) : 1141, 1298
. : milestone, 1219,
master - mean (1,215ms) : 1146, 1284
. : milestone, 1215,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (299ms) : 282, 316
. : milestone, 299,
master - mean (296ms) : 280, 311
. : milestone, 296,
section Baseline
This PR (6878) - mean (299ms) : 280, 319
. : milestone, 299,
master - mean (292ms) : 276, 309
. : milestone, 292,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (987ms) : 944, 1030
. : milestone, 987,
master - mean (983ms) : 936, 1030
. : milestone, 983,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (302ms) : 285, 319
. : milestone, 302,
master - mean (297ms) : 284, 310
. : milestone, 297,
section Baseline
This PR (6878) - mean (301ms) : 283, 319
. : milestone, 301,
master - mean (298ms) : 282, 314
. : milestone, 298,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (1,047ms) : 989, 1106
. : milestone, 1047,
master - mean (1,041ms) : 977, 1105
. : milestone, 1041,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (6878) - mean (297ms) : 273, 322
. : milestone, 297,
master - mean (287ms) : 272, 302
. : milestone, 287,
section Baseline
This PR (6878) - mean (288ms) : 270, 306
. : milestone, 288,
master - mean (289ms) : 274, 305
. : milestone, 289,
section CallTarget+Inlining+NGEN
This PR (6878) - mean (945ms) : 828, 1062
. : milestone, 945,
master - mean (917ms) : 829, 1005
. : milestone, 917,
|
Datadog ReportBranch report: ✅ 0 Failed, 251331 Passed, 2423 Skipped, 20h 7m 51.5s Total Time |
BenchmarksBenchmarks Report for tracer 🐌Benchmarks for #99 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.1 KB | 6.19 KB | 92 B | 1.51% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.5μs | 59.2ns | 374ns | 0 | 0 | 0 | 5.57 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.5μs | 67.4ns | 294ns | 0 | 0 | 0 | 5.76 KB |
| master | StartStopWithChild |
net472 | 22.5μs | 125ns | 803ns | 0.867 | 0.217 | 0 | 6.1 KB |
| #99 | StartStopWithChild |
net6.0 | 10.6μs | 58.9ns | 358ns | 0 | 0 | 0 | 5.55 KB |
| #99 | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 62.8ns | 251ns | 0 | 0 | 0 | 5.77 KB |
| #99 | StartStopWithChild |
net472 | 22μs | 121ns | 717ns | 0.978 | 0.326 | 0 | 6.19 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.35 KB
3.31 KB
-46 B
-1.37%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.35 KB | 3.31 KB | -46 B | -1.37% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 926μs | 39ns | 151ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.01ms | 94.8ns | 355ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.23ms | 341ns | 1.23μs | 0 | 0 | 0 | 3.35 KB |
| #99 | WriteAndFlushEnrichedTraces |
net6.0 | 927μs | 93.7ns | 350ns | 0 | 0 | 0 | 2.71 KB |
| #99 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.01ms | 208ns | 779ns | 0 | 0 | 0 | 2.7 KB |
| #99 | WriteAndFlushEnrichedTraces |
net472 | 1.24ms | 40ns | 150ns | 0 | 0 | 0 | 3.31 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 | 62μs | 287ns | 1.11μs | 0 | 0 | 0 | 14.53 KB |
| master | SendRequest |
netcoreapp3.1 | 71μs | 184ns | 690ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
| #99 | SendRequest |
net6.0 | 62μs | 64.3ns | 232ns | 0 | 0 | 0 | 14.53 KB |
| #99 | SendRequest |
netcoreapp3.1 | 71.3μs | 352ns | 1.45μs | 0 | 0 | 0 | 17.42 KB |
| #99 | SendRequest |
net472 | 0.00571ns | 0.00182ns | 0.00707ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.01 KB
55.67 KB
-340 B
-0.61%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.35 KB
41.75 KB
-598 B
-1.41%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.01 KB | 55.67 KB | -340 B | -0.61% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.35 KB | 41.75 KB | -598 B | -1.41% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 639μs | 1.24μs | 4.47μs | 0 | 0 | 0 | 42.35 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 673μs | 3.5μs | 24.3μs | 0 | 0 | 0 | 42.23 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 971μs | 4.6μs | 19.5μs | 4.81 | 0 | 0 | 56.01 KB |
| #99 | WriteAndFlushEnrichedTraces |
net6.0 | 656μs | 1.87μs | 7.26μs | 0 | 0 | 0 | 41.75 KB |
| #99 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 666μs | 2.83μs | 10.2μs | 0 | 0 | 0 | 42.04 KB |
| #99 | WriteAndFlushEnrichedTraces |
net472 | 1.03ms | 5.14μs | 23μs | 4.81 | 0 | 0 | 55.67 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.93μs | 8.2ns | 31.8ns | 0 | 0 | 0 | 1.03 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.46μs | 10.2ns | 39.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.8μs | 4.93ns | 19.1ns | 0.153 | 0.0139 | 0 | 995 B |
| #99 | ExecuteNonQuery |
net6.0 | 1.89μs | 9.34ns | 38.5ns | 0 | 0 | 0 | 1.03 KB |
| #99 | ExecuteNonQuery |
netcoreapp3.1 | 2.54μs | 10.8ns | 41.7ns | 0 | 0 | 0 | 1.02 KB |
| #99 | ExecuteNonQuery |
net472 | 2.81μs | 7.31ns | 28.3ns | 0.156 | 0.0142 | 0 | 995 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #99
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.132
1,844.79
2,088.64
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.132 | 1,844.79 | 2,088.64 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.83μs | 9.48ns | 46.5ns | 0 | 0 | 0 | 1.04 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.27μs | 10.9ns | 43.7ns | 0 | 0 | 0 | 1.04 KB |
| master | CallElasticsearch |
net472 | 3.54μs | 1.43ns | 5.55ns | 0.159 | 0 | 0 | 1.05 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.85μs | 8.88ns | 36.6ns | 0 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.43μs | 8.95ns | 34.7ns | 0 | 0 | 0 | 1.09 KB |
| master | CallElasticsearchAsync |
net472 | 3.71μs | 1.43ns | 5.35ns | 0.166 | 0 | 0 | 1.11 KB |
| #99 | CallElasticsearch |
net6.0 | 2.07μs | 9.9ns | 42ns | 0 | 0 | 0 | 1.04 KB |
| #99 | CallElasticsearch |
netcoreapp3.1 | 2.34μs | 7.09ns | 27.4ns | 0 | 0 | 0 | 1.04 KB |
| #99 | CallElasticsearch |
net472 | 3.65μs | 5.22ns | 20.2ns | 0.164 | 0 | 0 | 1.05 KB |
| #99 | CallElasticsearchAsync |
net6.0 | 1.9μs | 7.33ns | 28.4ns | 0 | 0 | 0 | 1.02 KB |
| #99 | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 10.9ns | 42.1ns | 0 | 0 | 0 | 1.09 KB |
| #99 | CallElasticsearchAsync |
net472 | 3.73μs | 4.13ns | 16ns | 0.152 | 0 | 0 | 1.11 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.83μs | 6.11ns | 23.7ns | 0 | 0 | 0 | 960 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.34μs | 2.84ns | 11ns | 0 | 0 | 0 | 960 B |
| master | ExecuteAsync |
net472 | 2.58μs | 1.77ns | 6.63ns | 0.141 | 0 | 0 | 923 B |
| #99 | ExecuteAsync |
net6.0 | 2.03μs | 5.3ns | 20.5ns | 0 | 0 | 0 | 960 B |
| #99 | ExecuteAsync |
netcoreapp3.1 | 2.28μs | 7.55ns | 29.2ns | 0 | 0 | 0 | 960 B |
| #99 | ExecuteAsync |
net472 | 2.6μs | 0.858ns | 3.21ns | 0.143 | 0 | 0 | 923 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 | 6.84μs | 15.4ns | 55.5ns | 0 | 0 | 0 | 2.37 KB |
| master | SendAsync |
netcoreapp3.1 | 8.63μs | 15.8ns | 61.2ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 9.74ns | 37.7ns | 0.488 | 0 | 0 | 3.19 KB |
| #99 | SendAsync |
net6.0 | 6.87μs | 26.5ns | 102ns | 0 | 0 | 0 | 2.37 KB |
| #99 | SendAsync |
netcoreapp3.1 | 8.41μs | 3.47ns | 12.5ns | 0 | 0 | 0 | 2.9 KB |
| #99 | SendAsync |
net472 | 12.4μs | 11.3ns | 43.8ns | 0.494 | 0 | 0 | 3.19 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 | 2.59μs | 0.676ns | 2.62ns | 0 | 0 | 0 | 1.76 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.47μs | 10.2ns | 39.5ns | 0 | 0 | 0 | 1.76 KB |
| master | EnrichedLog |
net472 | 3.93μs | 4.14ns | 15.5ns | 0.255 | 0 | 0 | 1.69 KB |
| #99 | EnrichedLog |
net6.0 | 2.67μs | 14.1ns | 74.7ns | 0 | 0 | 0 | 1.76 KB |
| #99 | EnrichedLog |
netcoreapp3.1 | 3.44μs | 16.6ns | 70.6ns | 0 | 0 | 0 | 1.76 KB |
| #99 | EnrichedLog |
net472 | 3.8μs | 6.45ns | 25ns | 0.266 | 0 | 0 | 1.69 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 | 122μs | 88.3ns | 330ns | 0 | 0 | 0 | 4.37 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 62.2ns | 215ns | 0 | 0 | 0 | 4.37 KB |
| master | EnrichedLog |
net472 | 171μs | 111ns | 400ns | 0 | 0 | 0 | 4.57 KB |
| #99 | EnrichedLog |
net6.0 | 124μs | 308ns | 1.11μs | 0 | 0 | 0 | 4.37 KB |
| #99 | EnrichedLog |
netcoreapp3.1 | 127μs | 116ns | 417ns | 0 | 0 | 0 | 4.37 KB |
| #99 | EnrichedLog |
net472 | 168μs | 298ns | 1.11μs | 0 | 0 | 0 | 4.57 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 | 4.88μs | 19.8ns | 74.2ns | 0 | 0 | 0 | 2.32 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.8μs | 18.4ns | 71.3ns | 0 | 0 | 0 | 2.32 KB |
| master | EnrichedLog |
net472 | 7.42μs | 8.51ns | 32.9ns | 0.333 | 0 | 0 | 2.14 KB |
| #99 | EnrichedLog |
net6.0 | 5.28μs | 9.49ns | 36.7ns | 0 | 0 | 0 | 2.32 KB |
| #99 | EnrichedLog |
netcoreapp3.1 | 6.67μs | 5.98ns | 23.2ns | 0 | 0 | 0 | 2.32 KB |
| #99 | EnrichedLog |
net472 | 7.51μs | 8.73ns | 33.8ns | 0.339 | 0 | 0 | 2.14 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 | 2.07μs | 10ns | 41.2ns | 0 | 0 | 0 | 1.21 KB |
| master | SendReceive |
netcoreapp3.1 | 2.66μs | 9.63ns | 34.7ns | 0 | 0 | 0 | 1.21 KB |
| master | SendReceive |
net472 | 3.09μs | 4.88ns | 18.9ns | 0.186 | 0 | 0 | 1.21 KB |
| #99 | SendReceive |
net6.0 | 2.06μs | 1.63ns | 6.3ns | 0 | 0 | 0 | 1.21 KB |
| #99 | SendReceive |
netcoreapp3.1 | 2.56μs | 11.9ns | 47.7ns | 0 | 0 | 0 | 1.21 KB |
| #99 | SendReceive |
net472 | 3.02μs | 8.1ns | 31.4ns | 0.179 | 0 | 0 | 1.21 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 | 4.31μs | 15.6ns | 60.6ns | 0 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.78μs | 15.3ns | 57.1ns | 0 | 0 | 0 | 1.69 KB |
| master | EnrichedLog |
net472 | 6.6μs | 7.85ns | 30.4ns | 0.331 | 0 | 0 | 2.08 KB |
| #99 | EnrichedLog |
net6.0 | 4.33μs | 5.4ns | 19.5ns | 0 | 0 | 0 | 1.64 KB |
| #99 | EnrichedLog |
netcoreapp3.1 | 5.67μs | 4.15ns | 16.1ns | 0 | 0 | 0 | 1.69 KB |
| #99 | EnrichedLog |
net472 | 6.62μs | 10.3ns | 39.7ns | 0.331 | 0 | 0 | 2.08 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 | 760ns | 3.95ns | 18.5ns | 0 | 0 | 0 | 584 B |
| master | StartFinishSpan |
netcoreapp3.1 | 957ns | 5.04ns | 24.2ns | 0 | 0 | 0 | 584 B |
| master | StartFinishSpan |
net472 | 900ns | 0.239ns | 0.924ns | 0.0919 | 0 | 0 | 586 B |
| master | StartFinishScope |
net6.0 | 939ns | 4.83ns | 21.6ns | 0 | 0 | 0 | 704 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.19μs | 1.74ns | 6.75ns | 0 | 0 | 0 | 704 B |
| master | StartFinishScope |
net472 | 1.11μs | 0.142ns | 0.549ns | 0.1 | 0 | 0 | 666 B |
| #99 | StartFinishSpan |
net6.0 | 772ns | 3.67ns | 14.7ns | 0 | 0 | 0 | 584 B |
| #99 | StartFinishSpan |
netcoreapp3.1 | 932ns | 5.05ns | 28.1ns | 0 | 0 | 0 | 584 B |
| #99 | StartFinishSpan |
net472 | 886ns | 0.0366ns | 0.137ns | 0.093 | 0 | 0 | 586 B |
| #99 | StartFinishScope |
net6.0 | 923ns | 4.75ns | 22.8ns | 0 | 0 | 0 | 704 B |
| #99 | StartFinishScope |
netcoreapp3.1 | 1.12μs | 5.65ns | 27.1ns | 0 | 0 | 0 | 704 B |
| #99 | StartFinishScope |
net472 | 1.11μs | 0.087ns | 0.314ns | 0.106 | 0 | 0 | 666 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 | 1.05μs | 1.37ns | 5.32ns | 0 | 0 | 0 | 704 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.35μs | 7.37ns | 33.8ns | 0 | 0 | 0 | 704 B |
| master | RunOnMethodBegin |
net472 | 1.37μs | 0.658ns | 2.55ns | 0.102 | 0 | 0 | 666 B |
| #99 | RunOnMethodBegin |
net6.0 | 1.09μs | 5.35ns | 21.4ns | 0 | 0 | 0 | 704 B |
| #99 | RunOnMethodBegin |
netcoreapp3.1 | 1.46μs | 1.82ns | 7.04ns | 0 | 0 | 0 | 704 B |
| #99 | RunOnMethodBegin |
net472 | 1.39μs | 1.05ns | 3.93ns | 0.104 | 0 | 0 | 666 B |
andrewlock
left a comment
There was a problem hiding this comment.
I don't think there's any harm in it, since it's technically correct, but also I'm pretty certain there's no scenario in which this could be null, so it's an odd one 🤔
f62ef79 to
ae1e4a3
Compare
| { | ||
| var index = i + spans.Offset; | ||
| if (spans.Array![index].GetMetric(Metrics.SingleSpanSampling.SamplingMechanism) is not null) | ||
| if (spans.Array?[index].GetMetric(Metrics.SingleSpanSampling.SamplingMechanism) is not null) |
There was a problem hiding this comment.
In practice (in our codebase) this should never be able to be null if you track all the places where we create this ArraySegment<Span>. But who knows... 😅 🤷🏽♂️
There was a problem hiding this comment.
Oops. I just realized this is an old PR and we had already commented the same thing, my bad.
Summary of changes
Remove the
!to be a?. I think the!isn't accurate asArraycan benullReason for change
I noticed a error in error tracking for a NullReferenceException in this method and this looked pretty suspect to me, but we do this in other places as well 🤔
Implementation details
! -> ?
Test coverage
Other details