Reduce allocations in `TraceContext`
Summary of changes
Replace ArraySegment<Span> with SpanCollection
Reason for change
ArraySegment<Span> is a wrapper around an array, and by design, always requires allocating an array.
However, if we look at the distribution of traces received for processing, we see that 50% of traces only have a single span.
Consequently, SpanCollection takes a similar approach to StringValues, in which it is an abstraction around either a single Span or a Span[]. This means we can avoid allocating the array entirely until we need to.
For small traces (with a single span), this saves 56 Bytes per scope/trace or ~8% of the basic trace size. For larger traces, SpanCollection and ArraySegment<Span> are essentially identical, so the allocation is the same.
Given SpanCollection (and ArraySegment actually) are readonly struct, also added in to the signatures (given that both structs are the same size and > pointer size).
The only practical way I could see to actually make
SpanCollectionpointer-sized is to remove theCountparameter. But that means we either need to allocate an "ArraySegment" wrapper around the Array, to hold the count, or we always allocate an array of the "correct" length. I explored the latter in a separate PR, using an array pool during the "builder" step, and then allocating an array of the correct size subsequently, but the allocation gains were marginal, and it didn't
Implementation details
The changes are essentially:
SpanCollectionholds either aSpanor aSpan[](ornull)- We store this in the same field (much like
StringValuesdoes), as it reduces the size of the struct which brings small perf benefits - Pass the span around via
into reduce chance of defensive copies - Fix/replace uses of Moq which requires different usage for
in/reffields, and can't provide the same functionality as a stub
Test coverage
Added some unit tests for the implementation, but the important thing is the benchmarks. We see an 8-8.5% reduction in the allocations for create span/create scope:
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 696 B | 640 B | -56 B | -8.05% |
| Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 696 B | 640 B | -56 B | -8.05% |
| Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 | 658 B | 602 B | -56 B | -8.51% |
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 578 B | 522 B | -56 B | -9.69% |
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 576 B | 520 B | -56 B | -9.72% |
| Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 576 B | 520 B | -56 B | -9.72% |
Other benchmarks which create a single span see similar improvements.
Note that the two scope benchmark (added in #7869) shows essentially no change (as expected).
Other details
I tried a variety of variations on this approach:
- Keep separate fields for
SpanandSpan[]- Nicer as it's type safe again, but increases allocations (by a pointer) so prob not worth it as this is hot path
- Don't pass via
in- Slows things down slightly
- Remove the
Countfield (and makeSpanCollectionpointer-sized)- Requires allocating exact-sized arrays, so not practical to handle array growth
- Same as above, but use an array pool for the build stage, and then only allocate the fixed size on close
- Does show improvements in allocation, but more complexity. May be worth considering (I'll create a separate PR for it)
- Don't have a builder, just use an array pool + a Count field, and rely on reliably cleaning up the pooling,
Benchmarks
Benchmarks Report for benchmark platform :snail:
Benchmarks for #7851 compared to master:
- 1 benchmarks are faster, with geometric mean 1.659
- 1 benchmarks are slower, with geometric mean 1.211
- 37 benchmarks have fewer allocations
- 6 benchmarks have more allocations
The following thresholds were used for comparing the benchmark speeds:
- Mann–Whitney U test with statistical test for significance of 5%
- Only results indicating a difference greater than 10% and 0.3 ns are considered.
Allocation changes below 0.5% are ignored.
Benchmark details
Benchmarks.Trace.ActivityBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472
6.01 KB
6.06 KB
51 B
0.85%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 9.99μs | 54.5ns | 332ns | 0 | 0 | 0 | 5.5 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 70.4ns | 330ns | 0 | 0 | 0 | 5.71 KB |
| master | StartStopWithChild |
net472 | 21.8μs | 120ns | 741ns | 0.978 | 0.435 | 0.109 | 6.01 KB |
| #7851 | StartStopWithChild |
net6.0 | 9.91μs | 9.4ns | 36.4ns | 0 | 0 | 0 | 5.51 KB |
| #7851 | StartStopWithChild |
netcoreapp3.1 | 13.8μs | 66.1ns | 273ns | 0 | 0 | 0 | 5.72 KB |
| #7851 | StartStopWithChild |
net472 | 22.3μs | 99.5ns | 385ns | 0.994 | 0.331 | 0.11 | 6.06 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.31 KB
3.33 KB
23 B
0.70%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 939μs | 45.8ns | 177ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 623ns | 2.41μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.22ms | 61.8ns | 231ns | 0 | 0 | 0 | 3.31 KB |
| #7851 | WriteAndFlushEnrichedTraces |
net6.0 | 945μs | 529ns | 2.05μs | 0 | 0 | 0 | 2.7 KB |
| #7851 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 66.4ns | 239ns | 0 | 0 | 0 | 2.7 KB |
| #7851 | WriteAndFlushEnrichedTraces |
net472 | 1.24ms | 1.76μs | 6.82μs | 0 | 0 | 0 | 3.33 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 1.09μs | 1.29ns | 5.01ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.39μs | 7.67ns | 46.6ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.897ns | 3.47ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.28μs | 33.8ns | 131ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.98μs | 32ns | 124ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.7μs | 4.79ns | 18.6ns | 0.729 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 331ns | 1.68ns | 7.52ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 401ns | 2.2ns | 12.2ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 298ns | 0.167ns | 0.648ns | 0.0436 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 30.1ns | 141ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 29.1ns | 113ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 5.3ns | 19.8ns | 0.602 | 0 | 0 | 3.8 KB |
| #7851 | AllCycleSimpleBody |
net6.0 | 1.06μs | 5.96ns | 40.4ns | 0 | 0 | 0 | 1.22 KB |
| #7851 | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 8.05ns | 60.7ns | 0 | 0 | 0 | 1.2 KB |
| #7851 | AllCycleSimpleBody |
net472 | 1.05μs | 2.52ns | 9.09ns | 0.194 | 0 | 0 | 1.23 KB |
| #7851 | AllCycleMoreComplexBody |
net6.0 | 7.11μs | 33.4ns | 134ns | 0 | 0 | 0 | 4.72 KB |
| #7851 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.27μs | 42.4ns | 164ns | 0 | 0 | 0 | 4.62 KB |
| #7851 | AllCycleMoreComplexBody |
net472 | 7.67μs | 4.27ns | 16.5ns | 0.727 | 0 | 0 | 4.74 KB |
| #7851 | ObjectExtractorSimpleBody |
net6.0 | 319ns | 1.78ns | 11ns | 0 | 0 | 0 | 280 B |
| #7851 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.09ns | 11.1ns | 0 | 0 | 0 | 272 B |
| #7851 | ObjectExtractorSimpleBody |
net472 | 300ns | 0.631ns | 2.44ns | 0.0435 | 0 | 0 | 281 B |
| #7851 | ObjectExtractorMoreComplexBody |
net6.0 | 6.32μs | 31.8ns | 149ns | 0 | 0 | 0 | 3.78 KB |
| #7851 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.92μs | 38.2ns | 162ns | 0 | 0 | 0 | 3.69 KB |
| #7851 | ObjectExtractorMoreComplexBody |
net472 | 6.66μs | 3.36ns | 12.1ns | 0.6 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.6μs | 213ns | 796ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.3μs | 207ns | 774ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 112μs | 7.66ns | 26.5ns | 5.03 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 145μs | 25.7ns | 99.6ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 83.5ns | 289ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 96ns | 372ns | 0 | 0 | 0 | 2.16 KB |
| #7851 | EncodeArgs |
net6.0 | 76.3μs | 305ns | 1.18μs | 0 | 0 | 0 | 32.4 KB |
| #7851 | EncodeArgs |
netcoreapp3.1 | 95.8μs | 354ns | 1.37μs | 0 | 0 | 0 | 32.4 KB |
| #7851 | EncodeArgs |
net472 | 108μs | 13.6ns | 47.2ns | 4.88 | 0 | 0 | 32.51 KB |
| #7851 | EncodeLegacyArgs |
net6.0 | 142μs | 52.8ns | 205ns | 0 | 0 | 0 | 2.15 KB |
| #7851 | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 483ns | 1.87μs | 0 | 0 | 0 | 2.14 KB |
| #7851 | EncodeLegacyArgs |
net472 | 263μs | 26.1ns | 101ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
5.48 KB
5.14 KB
-336 B
-6.13%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
3.5 KB
2.54 KB
-960 B
-27.40%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 457μs | 3.08μs | 30.6μs | 0 | 0 | 0 | 5.48 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 496μs | 4.32μs | 42.1μs | 0 | 0 | 0 | 4.58 KB |
| master | RunWafRealisticBenchmark |
net472 | 503μs | 607ns | 2.27μs | 0 | 0 | 0 | 8.19 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 311μs | 778ns | 2.81μs | 0 | 0 | 0 | 3.5 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 352μs | 3.19μs | 31μs | 0 | 0 | 0 | 2.32 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 371μs | 373ns | 1.29μs | 0 | 0 | 0 | 8.19 KB |
| #7851 | RunWafRealisticBenchmark |
net6.0 | 425μs | 1.11μs | 3.85μs | 0 | 0 | 0 | 5.14 KB |
| #7851 | RunWafRealisticBenchmark |
netcoreapp3.1 | 630μs | 19.5μs | 195μs | 0 | 0 | 0 | 4.58 KB |
| #7851 | RunWafRealisticBenchmark |
net472 | 496μs | 323ns | 1.16μs | 0 | 0 | 0 | 0 b |
| #7851 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 322μs | 1.86μs | 14.7μs | 0 | 0 | 0 | 2.54 KB |
| #7851 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 335μs | 1.77μs | 8.65μs | 0 | 0 | 0 | 2.32 KB |
| #7851 | RunWafRealisticBenchmarkWithAttack |
net472 | 370μs | 505ns | 1.82μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 61.4μs | 113ns | 422ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 71.1μs | 70.2ns | 253ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00553ns | 0.00212ns | 0.00822ns | 0 | 0 | 0 | 0 b |
| #7851 | SendRequest |
net6.0 | 60.4μs | 59.8ns | 224ns | 0 | 0 | 0 | 14.46 KB |
| #7851 | SendRequest |
netcoreapp3.1 | 71.1μs | 68.2ns | 255ns | 0 | 0 | 0 | 17.36 KB |
| #7851 | SendRequest |
net472 | 0.154ns | 0.0013ns | 0.00469ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster :tada: More allocations :warning:
Faster :tada: in #7851
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
1.659
2,817,700.00
1,698,100.00
More allocations :warning: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
304 B
976 B
672 B
221.05%
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
976 B
304 B
-672 B
-68.85%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 907ns | 3.51μs | 0 | 0 | 0 | 640.3 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.97ms | 1.68μs | 6.27μs | 0 | 0 | 0 | 640.1 KB |
| master | OriginalCharSlice |
net472 | 2.64ms | 648ns | 2.42μs | 0 | 0 | 0 | 647.17 KB |
| master | OptimizedCharSlice |
net6.0 | 1.4ms | 554ns | 2.07μs | 0 | 0 | 0 | 976 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.82ms | 905ns | 3.39μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 996ns | 3.59μs | 0 | 0 | 0 | 8.19 KB |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 347ns | 1.3μs | 0 | 0 | 0 | 304 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 2ms | 2.03μs | 7.88μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.15ms | 639ns | 2.39μs | 0 | 0 | 0 | 8.19 KB |
| #7851 | OriginalCharSlice |
net6.0 | 1.93ms | 2.28μs | 8.83μs | 0 | 0 | 0 | 640.3 KB |
| #7851 | OriginalCharSlice |
netcoreapp3.1 | 3.89ms | 1.2μs | 4.14μs | 0 | 0 | 0 | 640.1 KB |
| #7851 | OriginalCharSlice |
net472 | 2.55ms | 777ns | 3.01μs | 0 | 0 | 0 | 647.17 KB |
| #7851 | OptimizedCharSlice |
net6.0 | 1.5ms | 875ns | 3.27μs | 0 | 0 | 0 | 304 B |
| #7851 | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 5.94μs | 46.4μs | 0 | 0 | 0 | 104 B |
| #7851 | OptimizedCharSlice |
net472 | 2.02ms | 462ns | 1.73μs | 0 | 0 | 0 | 0 b |
| #7851 | OptimizedCharSliceWithPool |
net6.0 | 1.07ms | 702ns | 2.72μs | 0 | 0 | 0 | 976 B |
| #7851 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.91ms | 855ns | 3.31μs | 0 | 0 | 0 | 104 B |
| #7851 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 948ns | 3.67μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower :warning: Fewer allocations :tada:
Slower :warning: in #7851
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.211
625,569.95
757,523.12
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.98 KB
41.73 KB
-248 B
-0.59%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 685μs | 1.86μs | 7.21μs | 0 | 0 | 0 | 41.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 627μs | 903ns | 3.5μs | 0 | 0 | 0 | 41.98 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 832μs | 1.3μs | 4.88μs | 8.33 | 0 | 0 | 56.18 KB |
| #7851 | WriteAndFlushEnrichedTraces |
net6.0 | 711μs | 3.79μs | 20.4μs | 0 | 0 | 0 | 41.78 KB |
| #7851 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 750μs | 4.17μs | 25.4μs | 0 | 0 | 0 | 41.73 KB |
| #7851 | WriteAndFlushEnrichedTraces |
net472 | 930μs | 3.13μs | 12.1μs | 8.33 | 0 | 0 | 56.25 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0
1.02 KB
968 B
-56 B
-5.47%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1
1.02 KB
960 B
-56 B
-5.51%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net472
987 B
931 B
-56 B
-5.67%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.93μs | 9.98ns | 47.9ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.47μs | 11.2ns | 40.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.71μs | 1.89ns | 7.31ns | 0.15 | 0 | 0 | 987 B |
| #7851 | ExecuteNonQuery |
net6.0 | 1.87μs | 9.48ns | 41.3ns | 0 | 0 | 0 | 968 B |
| #7851 | ExecuteNonQuery |
netcoreapp3.1 | 2.51μs | 7.97ns | 30.9ns | 0 | 0 | 0 | 960 B |
| #7851 | ExecuteNonQuery |
net472 | 2.65μs | 2.88ns | 11.1ns | 0.147 | 0 | 0 | 931 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472
1.1 KB
1.04 KB
-56 B
-5.10%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1
1.08 KB
1.02 KB
-56 B
-5.19%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472
1.04 KB
987 B
-56 B
-5.37%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.03 KB
976 B
-56 B
-5.43%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1
1.03 KB
976 B
-56 B
-5.43%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0
1.01 KB
952 B
-56 B
-5.56%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.76μs | 8.03ns | 30ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 11.7ns | 56.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.57μs | 3.38ns | 13.1ns | 0.16 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.79μs | 8.33ns | 32.3ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 8.58ns | 33.2ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.71μs | 1.19ns | 4.6ns | 0.165 | 0 | 0 | 1.1 KB |
| #7851 | CallElasticsearch |
net6.0 | 1.71μs | 6.95ns | 26.9ns | 0 | 0 | 0 | 976 B |
| #7851 | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 4.95ns | 19.2ns | 0 | 0 | 0 | 976 B |
| #7851 | CallElasticsearch |
net472 | 3.49μs | 5.64ns | 21.8ns | 0.14 | 0 | 0 | 987 B |
| #7851 | CallElasticsearchAsync |
net6.0 | 1.8μs | 8.58ns | 35.4ns | 0 | 0 | 0 | 952 B |
| #7851 | CallElasticsearchAsync |
netcoreapp3.1 | 2.4μs | 9.45ns | 35.3ns | 0 | 0 | 0 | 1.02 KB |
| #7851 | CallElasticsearchAsync |
net472 | 3.65μs | 2.62ns | 10.1ns | 0.163 | 0 | 0 | 1.04 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0
952 B
896 B
-56 B
-5.88%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1
952 B
896 B
-56 B
-5.88%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472
915 B
859 B
-56 B
-6.12%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.82μs | 5.61ns | 21.7ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.35μs | 10.9ns | 43.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.67μs | 3.16ns | 12.2ns | 0.133 | 0 | 0 | 915 B |
| #7851 | ExecuteAsync |
net6.0 | 1.77μs | 7ns | 26.2ns | 0 | 0 | 0 | 896 B |
| #7851 | ExecuteAsync |
netcoreapp3.1 | 2.4μs | 7.34ns | 28.4ns | 0 | 0 | 0 | 896 B |
| #7851 | ExecuteAsync |
net472 | 2.51μs | 3.95ns | 15.3ns | 0.125 | 0 | 0 | 859 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472
3.18 KB
3.12 KB
-56 B
-1.76%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑netcoreapp3.1
2.9 KB
2.84 KB
-56 B
-1.93%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0
2.36 KB
2.3 KB
-56 B
-2.37%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 6.79μs | 10ns | 38.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.96μs | 35ns | 135ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 10.5ns | 40.6ns | 0.488 | 0 | 0 | 3.18 KB |
| #7851 | SendAsync |
net6.0 | 6.69μs | 19.4ns | 75.2ns | 0 | 0 | 0 | 2.3 KB |
| #7851 | SendAsync |
netcoreapp3.1 | 8.77μs | 15.9ns | 61.7ns | 0 | 0 | 0 | 2.84 KB |
| #7851 | SendAsync |
net472 | 12.1μs | 7.04ns | 27.3ns | 0.483 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
250.62 KB
259.9 KB
9.28 KB
3.70%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.36 KB
43.94 KB
576 B
1.33%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
281.3 KB
2.78 KB
1.00%
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.04 KB
42.82 KB
-1.22 KB
-2.78%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
272.86 KB
257.44 KB
-15.42 KB
-5.65%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45μs | 249ns | 1.41μs | 0 | 0 | 0 | 43.36 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.4μs | 200ns | 720ns | 0 | 0 | 0 | 44.04 KB |
| master | StringConcatBenchmark |
net472 | 57.5μs | 127ns | 459ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 445μs | 2.37μs | 12.1μs | 0 | 0 | 0 | 250.62 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 528μs | 2.53μs | 10.1μs | 0 | 0 | 0 | 272.86 KB |
| master | StringConcatAspectBenchmark |
net472 | 411μs | 2.21μs | 12.5μs | 0 | 0 | 0 | 278.53 KB |
| #7851 | StringConcatBenchmark |
net6.0 | 50μs | 287ns | 1.92μs | 0 | 0 | 0 | 43.94 KB |
| #7851 | StringConcatBenchmark |
netcoreapp3.1 | 52.9μs | 534ns | 5.26μs | 0 | 0 | 0 | 42.82 KB |
| #7851 | StringConcatBenchmark |
net472 | 57.3μs | 146ns | 548ns | 0 | 0 | 0 | 57.34 KB |
| #7851 | StringConcatAspectBenchmark |
net6.0 | 457μs | 950ns | 3.43μs | 0 | 0 | 0 | 259.9 KB |
| #7851 | StringConcatAspectBenchmark |
netcoreapp3.1 | 497μs | 2.44μs | 10μs | 0 | 0 | 0 | 257.44 KB |
| #7851 | StringConcatAspectBenchmark |
net472 | 404μs | 2.13μs | 10.2μs | 0 | 0 | 0 | 281.3 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.64μs | 13.6ns | 67.9ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.56μs | 15.7ns | 60.6ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.82μs | 2.9ns | 11.2ns | 0.245 | 0 | 0 | 1.64 KB |
| #7851 | EnrichedLog |
net6.0 | 2.6μs | 12.9ns | 56ns | 0 | 0 | 0 | 1.7 KB |
| #7851 | EnrichedLog |
netcoreapp3.1 | 3.56μs | 16.2ns | 62.9ns | 0 | 0 | 0 | 1.7 KB |
| #7851 | EnrichedLog |
net472 | 3.77μs | 2.68ns | 10.4ns | 0.245 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 124μs | 129ns | 483ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 70.9ns | 256ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 168μs | 128ns | 495ns | 0 | 0 | 0 | 4.52 KB |
| #7851 | EnrichedLog |
net6.0 | 123μs | 71.7ns | 258ns | 0 | 0 | 0 | 4.31 KB |
| #7851 | EnrichedLog |
netcoreapp3.1 | 129μs | 98.7ns | 369ns | 0 | 0 | 0 | 4.31 KB |
| #7851 | EnrichedLog |
net472 | 165μs | 141ns | 547ns | 0 | 0 | 0 | 4.51 KB |
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.91μs | 23.1ns | 92.4ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.93μs | 26.5ns | 103ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.38μs | 5.92ns | 22.9ns | 0.297 | 0 | 0 | 2.08 KB |
| #7851 | EnrichedLog |
net6.0 | 5.01μs | 23.2ns | 89.8ns | 0 | 0 | 0 | 2.26 KB |
| #7851 | EnrichedLog |
netcoreapp3.1 | 6.79μs | 14.4ns | 54ns | 0 | 0 | 0 | 2.26 KB |
| #7851 | EnrichedLog |
net472 | 7.44μs | 5.68ns | 22ns | 0.295 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0
1.2 KB
1.14 KB
-56 B
-4.67%
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1
1.2 KB
1.14 KB
-56 B
-4.67%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472
1.2 KB
1.15 KB
-57 B
-4.73%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 1.94μs | 8.91ns | 34.5ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.54μs | 10.8ns | 41.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 2.96μs | 2.36ns | 8.82ns | 0.191 | 0 | 0 | 1.2 KB |
| #7851 | SendReceive |
net6.0 | 1.9μs | 9.92ns | 47.6ns | 0 | 0 | 0 | 1.14 KB |
| #7851 | SendReceive |
netcoreapp3.1 | 2.55μs | 8.85ns | 34.3ns | 0 | 0 | 0 | 1.14 KB |
| #7851 | SendReceive |
net472 | 3.03μs | 2.79ns | 10.8ns | 0.167 | 0 | 0 | 1.15 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.29μs | 1.1ns | 4.11ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.94μs | 15.6ns | 60.6ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.55μs | 5.18ns | 20.1ns | 0.293 | 0 | 0 | 2.03 KB |
| #7851 | EnrichedLog |
net6.0 | 4.3μs | 2.86ns | 10.7ns | 0 | 0 | 0 | 1.58 KB |
| #7851 | EnrichedLog |
netcoreapp3.1 | 5.5μs | 20ns | 77.4ns | 0 | 0 | 0 | 1.63 KB |
| #7851 | EnrichedLog |
net472 | 6.38μs | 8.32ns | 32.2ns | 0.32 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
696 B
640 B
-56 B
-8.05%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
696 B
640 B
-56 B
-8.05%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472
658 B
602 B
-56 B
-8.51%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
578 B
522 B
-56 B
-9.69%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
576 B
520 B
-56 B
-9.72%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
576 B
520 B
-56 B
-9.72%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 790ns | 3.61ns | 14.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 960ns | 0.356ns | 1.38ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 917ns | 0.121ns | 0.471ns | 0.0916 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 937ns | 0.434ns | 1.68ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.13μs | 5.83ns | 26.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.1μs | 0.186ns | 0.721ns | 0.0993 | 0 | 0 | 658 B |
| #7851 | StartFinishSpan |
net6.0 | 731ns | 4.07ns | 24.8ns | 0 | 0 | 0 | 520 B |
| #7851 | StartFinishSpan |
netcoreapp3.1 | 925ns | 4.59ns | 18.9ns | 0 | 0 | 0 | 520 B |
| #7851 | StartFinishSpan |
net472 | 899ns | 0.101ns | 0.377ns | 0.0811 | 0 | 0 | 522 B |
| #7851 | StartFinishScope |
net6.0 | 915ns | 4.52ns | 18.6ns | 0 | 0 | 0 | 640 B |
| #7851 | StartFinishScope |
netcoreapp3.1 | 1.1μs | 5.55ns | 24.2ns | 0 | 0 | 0 | 640 B |
| #7851 | StartFinishScope |
net472 | 1.09μs | 0.813ns | 3.15ns | 0.0927 | 0 | 0 | 602 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:
Fewer allocations :tada: in #7851
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
696 B
640 B
-56 B
-8.05%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
696 B
640 B
-56 B
-8.05%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472
658 B
602 B
-56 B
-8.51%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 1.08μs | 1.43ns | 5.15ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.38μs | 6.5ns | 25.2ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.44μs | 1.51ns | 5.85ns | 0.101 | 0 | 0 | 658 B |
| #7851 | RunOnMethodBegin |
net6.0 | 1.03μs | 5.67ns | 33.5ns | 0 | 0 | 0 | 640 B |
| #7851 | RunOnMethodBegin |
netcoreapp3.1 | 1.34μs | 6.68ns | 29.1ns | 0 | 0 | 0 | 640 B |
| #7851 | RunOnMethodBegin |
net472 | 1.37μs | 1.23ns | 4.26ns | 0.0898 | 0 | 0 | 602 B |
Execution-Time Benchmarks Report :stopwatch:
Execution-time results for samples comparing This PR (7851) and master.
✅ No regressions detected - check the details below
Full Metrics Comparison
FakeDbCommand
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 75.54 ± (75.66 - 76.57) ms | 75.19 ± (75.38 - 76.05) ms | -0.5% | ✅ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 78.44 ± (78.48 - 79.27) ms | 79.66 ± (79.65 - 80.51) ms | +1.6% | ✅⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1056.60 ± (1061.10 - 1072.97) ms | 1074.54 ± (1076.03 - 1088.80) ms | +1.7% | ✅⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 22.97 ± (22.88 - 23.06) ms | 22.98 ± (22.92 - 23.05) ms | +0.1% | ✅⬆️ |
| process.time_to_main_ms | 87.39 ± (86.98 - 87.79) ms | 87.39 ± (87.05 - 87.73) ms | -0.0% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.93 ± (10.93 - 10.94) MB | 10.92 ± (10.92 - 10.93) MB | -0.1% | ✅ |
| runtime.dotnet.threads.count | 12 ± (12 - 12) | 12 ± (12 - 12) | +0.0% | ✅ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 22.71 ± (22.65 - 22.77) ms | 22.91 ± (22.85 - 22.98) ms | +0.9% | ✅⬆️ |
| process.time_to_main_ms | 87.50 ± (87.17 - 87.84) ms | 89.71 ± (89.33 - 90.09) ms | +2.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.97 ± (10.97 - 10.97) MB | 10.96 ± (10.95 - 10.96) MB | -0.1% | ✅ |
| runtime.dotnet.threads.count | 13 ± (13 - 13) | 13 ± (13 - 13) | +0.0% | ✅ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 219.96 ± (218.38 - 221.54) ms | 220.94 ± (219.53 - 222.35) ms | +0.4% | ✅⬆️ |
| process.time_to_main_ms | 496.03 ± (494.81 - 497.24) ms | 501.82 ± (500.68 - 502.96) ms | +1.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 47.77 ± (47.75 - 47.79) MB | 47.79 ± (47.77 - 47.81) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | +0.4% | ✅⬆️ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 21.76 ± (21.68 - 21.83) ms | 21.94 ± (21.87 - 22.00) ms | +0.8% | ✅⬆️ |
| process.time_to_main_ms | 75.80 ± (75.44 - 76.15) ms | 76.86 ± (76.55 - 77.17) ms | +1.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.63 ± (10.62 - 10.63) MB | 10.64 ± (10.64 - 10.64) MB | +0.2% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 21.81 ± (21.74 - 21.88) ms | 22.13 ± (22.05 - 22.21) ms | +1.5% | ✅⬆️ |
| process.time_to_main_ms | 77.97 ± (77.66 - 78.28) ms | 79.50 ± (79.09 - 79.90) ms | +2.0% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.70 ± (10.70 - 10.71) MB | 10.68 ± (10.67 - 10.68) MB | -0.2% | ✅ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 211.50 ± (210.08 - 212.92) ms | 211.83 ± (210.13 - 213.54) ms | +0.2% | ✅⬆️ |
| process.time_to_main_ms | 467.65 ± (466.65 - 468.65) ms | 469.85 ± (468.72 - 470.99) ms | +0.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 47.99 ± (47.97 - 48.02) MB | 48.02 ± (47.99 - 48.04) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | -0.0% | ✅ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 20.16 ± (20.08 - 20.23) ms | 19.98 ± (19.92 - 20.04) ms | -0.9% | ✅ |
| process.time_to_main_ms | 76.89 ± (76.50 - 77.28) ms | 76.55 ± (76.21 - 76.90) ms | -0.4% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.67 ± (7.67 - 7.68) MB | 7.66 ± (7.65 - 7.66) MB | -0.2% | ✅ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 19.83 ± (19.77 - 19.88) ms | 20.11 ± (20.03 - 20.18) ms | +1.4% | ✅⬆️ |
| process.time_to_main_ms | 76.76 ± (76.39 - 77.13) ms | 77.34 ± (76.96 - 77.72) ms | +0.8% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.73 ± (7.72 - 7.73) MB | 7.73 ± (7.72 - 7.74) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 191.97 ± (191.08 - 192.85) ms | 193.48 ± (192.69 - 194.28) ms | +0.8% | ✅⬆️ |
| process.time_to_main_ms | 454.27 ± (453.29 - 455.25) ms | 457.97 ± (456.88 - 459.06) ms | +0.8% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 36.49 ± (36.45 - 36.53) MB | 36.42 ± (36.38 - 36.47) MB | -0.2% | ✅ |
| runtime.dotnet.threads.count | 27 ± (27 - 27) | 27 ± (27 - 27) | +0.1% | ✅⬆️ |
HttpMessageHandler
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 194.92 ± (194.70 - 195.36) ms | 198.55 ± (198.45 - 199.50) ms | +1.9% | ✅⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 198.30 ± (198.03 - 198.51) ms | 202.50 ± (202.26 - 203.40) ms | +2.1% | ✅⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1123.56 ± (1125.23 - 1133.30) ms | 1172.50 ± (1175.64 - 1184.30) ms | +4.4% | ✅⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 190.14 ± (189.82 - 190.46) ms | 195.73 ± (195.16 - 196.29) ms | +2.9% | ✅⬆️ |
| process.time_to_main_ms | 81.84 ± (81.64 - 82.03) ms | 88.10 ± (87.78 - 88.43) ms | +7.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.07 ± (16.04 - 16.09) MB | 16.30 ± (16.29 - 16.32) MB | +1.5% | ✅⬆️ |
| runtime.dotnet.threads.count | 20 ± (20 - 20) | 20 ± (20 - 20) | +1.0% | ✅⬆️ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 190.16 ± (189.76 - 190.57) ms | 194.78 ± (194.20 - 195.37) ms | +2.4% | ✅⬆️ |
| process.time_to_main_ms | 83.18 ± (82.97 - 83.39) ms | 89.15 ± (88.89 - 89.42) ms | +7.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.14 ± (16.12 - 16.16) MB | 16.30 ± (16.28 - 16.32) MB | +1.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 21 ± (20 - 21) | 21 ± (21 - 21) | +1.1% | ✅⬆️ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 407.30 ± (404.37 - 410.23) ms | 414.15 ± (411.76 - 416.54) ms | +1.7% | ✅⬆️ |
| process.time_to_main_ms | 478.02 ± (477.48 - 478.57) ms | 502.50 ± (501.19 - 503.80) ms | +5.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 58.85 ± (58.75 - 58.95) MB | 59.29 ± (59.24 - 59.34) MB | +0.8% | ✅⬆️ |
| runtime.dotnet.threads.count | 29 ± (29 - 30) | 29 ± (29 - 29) | -0.1% | ✅ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 193.89 ± (193.56 - 194.22) ms | 198.01 ± (197.56 - 198.47) ms | +2.1% | ✅⬆️ |
| process.time_to_main_ms | 70.73 ± (70.57 - 70.89) ms | 76.47 ± (76.19 - 76.75) ms | +8.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.40 ± (16.37 - 16.43) MB | 16.53 ± (16.51 - 16.55) MB | +0.8% | ✅⬆️ |
| runtime.dotnet.threads.count | 19 ± (19 - 19) | 19 ± (19 - 19) | +0.2% | ✅⬆️ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 194.00 ± (193.71 - 194.28) ms | 198.81 ± (198.28 - 199.35) ms | +2.5% | ✅⬆️ |
| process.time_to_main_ms | 72.27 ± (72.11 - 72.42) ms | 77.82 ± (77.57 - 78.07) ms | +7.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.33 ± (16.23 - 16.44) MB | 16.55 ± (16.53 - 16.56) MB | +1.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 20 ± (20 - 20) | 20 ± (20 - 20) | +2.1% | ✅⬆️ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 418.71 ± (416.09 - 421.34) ms | 426.56 ± (424.51 - 428.61) ms | +1.9% | ✅⬆️ |
| process.time_to_main_ms | 447.45 ± (446.80 - 448.09) ms | 470.47 ± (469.21 - 471.73) ms | +5.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 59.26 ± (59.16 - 59.36) MB | 59.53 ± (59.46 - 59.60) MB | +0.4% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (29 - 30) | 29 ± (29 - 29) | -0.4% | ✅ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 192.07 ± (191.81 - 192.34) ms | 197.43 ± (196.99 - 197.88) ms | +2.8% | ✅⬆️ |
| process.time_to_main_ms | 70.67 ± (70.47 - 70.87) ms | 75.57 ± (75.33 - 75.82) ms | +6.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.76 ± (11.74 - 11.78) MB | 11.89 ± (11.87 - 11.90) MB | +1.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 19 ± (18 - 19) | +2.0% | ✅⬆️ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 191.55 ± (191.29 - 191.80) ms | 195.47 ± (195.04 - 195.90) ms | +2.0% | ✅⬆️ |
| process.time_to_main_ms | 71.50 ± (71.40 - 71.60) ms | 76.26 ± (76.04 - 76.47) ms | +6.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.83 ± (11.80 - 11.85) MB | 11.99 ± (11.98 - 12.01) MB | +1.4% | ✅⬆️ |
| runtime.dotnet.threads.count | 19 ± (19 - 19) | 19 ± (19 - 19) | +0.5% | ✅⬆️ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 370.49 ± (369.13 - 371.86) ms | 375.37 ± (373.77 - 376.98) ms | +1.3% | ✅⬆️ |
| process.time_to_main_ms | 438.32 ± (437.58 - 439.07) ms | 448.30 ± (447.23 - 449.38) ms | +2.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 47.88 ± (47.84 - 47.91) MB | 47.92 ± (47.87 - 47.97) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 29 ± (29 - 29) | 29 ± (29 - 29) | -0.0% | ✅ |
Comparison explanation
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 highlighted in **red**. The following thresholds were used for comparing the execution times:
- Welch test with statistical test for significance of 5%
- Only results indicating a difference greater than 5% and 5 ms are considered.
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).
Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (76ms) : 71, 81
master - mean (76ms) : 70, 83
section Bailout
This PR (7851) - mean (80ms) : 74, 86
master - mean (79ms) : 73, 85
section CallTarget+Inlining+NGEN
This PR (7851) - mean (1,082ms) : 991, 1174
master - mean (1,067ms) : 976, 1158
FakeDbCommand (.NET Core 3.1)
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (118ms) : 110, 126
master - mean (118ms) : 111, 125
section Bailout
This PR (7851) - mean (120ms) : 112, 128
master - mean (118ms) : 111, 125
section CallTarget+Inlining+NGEN
This PR (7851) - mean (764ms) : 718, 810
master - mean (758ms) : 720, 796
FakeDbCommand (.NET 6)
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (106ms) : 100, 112
master - mean (105ms) : 98, 111
section Bailout
This PR (7851) - mean (109ms) : 102, 116
master - mean (107ms) : 100, 114
section CallTarget+Inlining+NGEN
This PR (7851) - mean (716ms) : 665, 767
master - mean (719ms) : 677, 762
FakeDbCommand (.NET 8)
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (105ms) : 98, 112
master - mean (106ms) : 98, 114
section Bailout
This PR (7851) - mean (106ms) : 98, 114
master - mean (105ms) : 98, 112
section CallTarget+Inlining+NGEN
This PR (7851) - mean (691ms) : 665, 717
master - mean (690ms) : 661, 720
HttpMessageHandler (.NET Framework 4.8)
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (199ms) : 191, 207
master - mean (195ms) : 192, 198
section Bailout
This PR (7851) - mean (203ms) : 195, 210
master - mean (198ms) : 196, 201
section CallTarget+Inlining+NGEN
This PR (7851) - mean (1,180ms) : 1117, 1243
master - mean (1,129ms) : 1071, 1188
HttpMessageHandler (.NET Core 3.1)
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (294ms) : 283, 306
master - mean (280ms) : 276, 285
section Bailout
This PR (7851) - mean (294ms) : 280, 309
master - mean (281ms) : 276, 287
section CallTarget+Inlining+NGEN
This PR (7851) - mean (980ms) : crit, 937, 1023
master - mean (924ms) : 880, 969
HttpMessageHandler (.NET 6)
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (285ms) : 274, 295
master - mean (274ms) : 267, 280
section Bailout
This PR (7851) - mean (287ms) : 275, 298
master - mean (275ms) : 270, 279
section CallTarget+Inlining+NGEN
This PR (7851) - mean (960ms) : crit, 910, 1010
master - mean (902ms) : 860, 944
HttpMessageHandler (.NET 8)
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7851) - mean (285ms) : 276, 294
master - mean (273ms) : 267, 278
section Bailout
This PR (7851) - mean (284ms) : 273, 294
master - mean (273ms) : 269, 276
section CallTarget+Inlining+NGEN
This PR (7851) - mean (887ms) : crit, 846, 928
master - mean (839ms) : 813, 865
⚠️ Warnings
🧪 28 Tests failed
TestInstrumentedUnitTestsfromDatadog.Trace.Security.IntegrationTests.Iast.IastInstrumentationUnitTests(Datadog)Expected exit code: 0, actual exit code: 1. Message: [xUnit.net 00:00:04.1222018] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated [FAIL] [xUnit.net 00:00:04.1301252] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated5 [FAIL] [xUnit.net 00:00:04.1320632] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated2 [FAIL]
TestInstrumentedUnitTestsfromDatadog.Trace.Security.IntegrationTests.Iast.IastInstrumentationUnitTests(Datadog)Expected exit code: 0, actual exit code: 1. Message: [xUnit.net 00:00:04.2902342] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated [FAIL] [xUnit.net 00:00:04.3056479] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated5 [FAIL] [xUnit.net 00:00:04.3076510] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated2 [FAIL]View all
TestInstrumentedUnitTestsfromDatadog.Trace.Security.IntegrationTests.Iast.IastInstrumentationUnitTests(Datadog)Expected exit code: 0, actual exit code: 1. Message: [xUnit.net 00:00:03.5326942] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated [FAIL] [xUnit.net 00:00:03.5475416] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated5 [FAIL] [xUnit.net 00:00:03.5483687] Samples.InstrumentedTests.Iast.Vulnerabilities.ProcessStartTests.GivenAProcess_WhenStart_SpanIsGenerated2 [FAIL]
ℹ️ Info
❄️ No new flaky tests detected
This comment will be updated automatically if new data arrives.🔗 Commit SHA: 49883b0 | Docs | Datadog PR Page | Was this helpful? Give us feedback!