-
Notifications
You must be signed in to change notification settings - Fork 151
Add more cleanup to benchmarks #7865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7865) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7865) - mean (77ms) : 71, 82
master - mean (76ms) : 70, 83
section Bailout
This PR (7865) - mean (80ms) : 75, 85
master - mean (79ms) : 73, 85
section CallTarget+Inlining+NGEN
This PR (7865) - mean (1,074ms) : 988, 1160
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 (7865) - mean (118ms) : 111, 124
master - mean (118ms) : 111, 125
section Bailout
This PR (7865) - mean (119ms) : 111, 127
master - mean (118ms) : 111, 125
section CallTarget+Inlining+NGEN
This PR (7865) - mean (764ms) : 717, 811
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 (7865) - mean (106ms) : 100, 113
master - mean (105ms) : 98, 111
section Bailout
This PR (7865) - mean (108ms) : 101, 114
master - mean (107ms) : 100, 114
section CallTarget+Inlining+NGEN
This PR (7865) - mean (719ms) : 667, 772
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 (7865) - mean (105ms) : 99, 111
master - mean (106ms) : 98, 114
section Bailout
This PR (7865) - mean (106ms) : 99, 114
master - mean (105ms) : 98, 112
section CallTarget+Inlining+NGEN
This PR (7865) - mean (693ms) : 661, 725
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 (7865) - mean (200ms) : 195, 206
master - mean (195ms) : 192, 198
section Bailout
This PR (7865) - mean (204ms) : 197, 210
master - mean (198ms) : 196, 201
section CallTarget+Inlining+NGEN
This PR (7865) - mean (1,150ms) : 1098, 1201
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 (7865) - mean (286ms) : 278, 294
master - mean (280ms) : 276, 285
section Bailout
This PR (7865) - mean (287ms) : 282, 291
master - mean (281ms) : 276, 287
section CallTarget+Inlining+NGEN
This PR (7865) - mean (943ms) : 909, 978
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 (7865) - mean (279ms) : 271, 286
master - mean (274ms) : 267, 280
section Bailout
This PR (7865) - mean (280ms) : 273, 287
master - mean (275ms) : 270, 279
section CallTarget+Inlining+NGEN
This PR (7865) - mean (929ms) : 882, 975
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 (7865) - mean (278ms) : 272, 284
master - mean (273ms) : 267, 278
section Bailout
This PR (7865) - mean (277ms) : 273, 280
master - mean (273ms) : 269, 276
section CallTarget+Inlining+NGEN
This PR (7865) - mean (848ms) : 826, 869
master - mean (839ms) : 813, 865
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7865 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Slower
|
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 | 1.150 | 9,823.31 | 11,298.76 |
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 |
| #7865 | StartStopWithChild |
net6.0 | 11.2μs | 55.2ns | 234ns | 0 | 0 | 0 | 5.5 KB |
| #7865 | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 69.7ns | 312ns | 0 | 0 | 0 | 5.7 KB |
| #7865 | StartStopWithChild |
net472 | 22.9μs | 110ns | 425ns | 1.01 | 0.336 | 0.112 | 6.02 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.31 KB
3.26 KB
-47 B
-1.42%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.26 KB | -47 B | -1.42% |
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 |
| #7865 | WriteAndFlushEnrichedTraces |
net6.0 | 918μs | 40ns | 150ns | 0 | 0 | 0 | 2.7 KB |
| #7865 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 60.3ns | 217ns | 0 | 0 | 0 | 2.7 KB |
| #7865 | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 117ns | 451ns | 0 | 0 | 0 | 3.26 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️
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 |
| #7865 | AllCycleSimpleBody |
net6.0 | 1.07μs | 0.469ns | 1.82ns | 0 | 0 | 0 | 1.22 KB |
| #7865 | AllCycleSimpleBody |
netcoreapp3.1 | 1.44μs | 0.462ns | 1.73ns | 0 | 0 | 0 | 1.2 KB |
| #7865 | AllCycleSimpleBody |
net472 | 1.01μs | 0.631ns | 2.36ns | 0.191 | 0 | 0 | 1.23 KB |
| #7865 | AllCycleMoreComplexBody |
net6.0 | 7.48μs | 19.7ns | 76.3ns | 0 | 0 | 0 | 4.72 KB |
| #7865 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.11μs | 20.7ns | 80.3ns | 0 | 0 | 0 | 4.62 KB |
| #7865 | AllCycleMoreComplexBody |
net472 | 7.67μs | 3.82ns | 14.8ns | 0.729 | 0 | 0 | 4.74 KB |
| #7865 | ObjectExtractorSimpleBody |
net6.0 | 330ns | 1.81ns | 10.7ns | 0 | 0 | 0 | 280 B |
| #7865 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 402ns | 2.23ns | 14.3ns | 0 | 0 | 0 | 272 B |
| #7865 | ObjectExtractorSimpleBody |
net472 | 304ns | 0.142ns | 0.549ns | 0.0444 | 0 | 0 | 281 B |
| #7865 | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 3.22ns | 12.5ns | 0 | 0 | 0 | 3.78 KB |
| #7865 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.94μs | 28.5ns | 110ns | 0 | 0 | 0 | 3.69 KB |
| #7865 | ObjectExtractorMoreComplexBody |
net472 | 6.77μs | 1.57ns | 5.43ns | 0.576 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472
2.16 KB
2.14 KB
-11 B
-0.51%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 | 2.16 KB | 2.14 KB | -11 B | -0.51% |
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 |
| #7865 | EncodeArgs |
net6.0 | 77.1μs | 226ns | 847ns | 0 | 0 | 0 | 32.4 KB |
| #7865 | EncodeArgs |
netcoreapp3.1 | 97.7μs | 303ns | 1.13μs | 0 | 0 | 0 | 32.4 KB |
| #7865 | EncodeArgs |
net472 | 108μs | 26ns | 97.2ns | 4.9 | 0 | 0 | 32.5 KB |
| #7865 | EncodeLegacyArgs |
net6.0 | 144μs | 8.58ns | 33.2ns | 0 | 0 | 0 | 2.14 KB |
| #7865 | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 161ns | 624ns | 0 | 0 | 0 | 2.14 KB |
| #7865 | EncodeLegacyArgs |
net472 | 263μs | 46.8ns | 181ns | 0 | 0 | 0 | 2.14 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
4.58 KB
4.48 KB
-104 B
-2.27%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.32 KB
2.22 KB
-104 B
-4.48%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
5.48 KB
4.55 KB
-928 B
-16.93%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
3.5 KB
2.24 KB
-1.26 KB
-36.07%
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%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 4.58 KB | 4.48 KB | -104 B | -2.27% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.32 KB | 2.22 KB | -104 B | -4.48% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 5.48 KB | 4.55 KB | -928 B | -16.93% |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 3.5 KB | 2.24 KB | -1.26 KB | -36.07% |
| 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 |
| #7865 | RunWafRealisticBenchmark |
net6.0 | 435μs | 1.88μs | 6.78μs | 0 | 0 | 0 | 4.55 KB |
| #7865 | RunWafRealisticBenchmark |
netcoreapp3.1 | 464μs | 2.72μs | 24.6μs | 0 | 0 | 0 | 4.48 KB |
| #7865 | RunWafRealisticBenchmark |
net472 | 492μs | 580ns | 2.17μs | 0 | 0 | 0 | 0 b |
| #7865 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 306μs | 633ns | 2.19μs | 0 | 0 | 0 | 2.24 KB |
| #7865 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 349μs | 3.17μs | 30.2μs | 0 | 0 | 0 | 2.22 KB |
| #7865 | RunWafRealisticBenchmarkWithAttack |
net472 | 375μs | 501ns | 1.94μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.AspNetCoreBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7865
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0
1.388
61,275.03
85,078.34
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1
1.362
71,092.38
96,805.04
More allocations ⚠️ in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0
14.52 KB
19.03 KB
4.51 KB
31.06%
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1
17.42 KB
21.25 KB
3.83 KB
22.00%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 | 1.388 | 61,275.03 | 85,078.34 | |
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 | 1.362 | 71,092.38 | 96,805.04 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 | 14.52 KB | 19.03 KB | 4.51 KB | 31.06% |
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 | 17.42 KB | 21.25 KB | 3.83 KB | 22.00% |
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 |
| #7865 | SendRequest |
net6.0 | 85.1μs | 101ns | 379ns | 0 | 0 | 0 | 19.03 KB |
| #7865 | SendRequest |
netcoreapp3.1 | 97.6μs | 364ns | 2.21μs | 0 | 0 | 0 | 21.25 KB |
| #7865 | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7865
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1
1.894
3,966,450.00
2,094,200.00
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑net472
647.17 KB
638.98 KB
-8.19 KB
-1.27%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
976 B
0 b
-976 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1
104 B
0 b
-104 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
304 B
0 b
-304 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
104 B
0 b
-104 B
-100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
8.19 KB
0 b
-8.19 KB
-100.00%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑netcoreapp3.1 | 1.894 | 3,966,450.00 | 2,094,200.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑net472 | 647.17 KB | 638.98 KB | -8.19 KB | -1.27% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 976 B | 0 b | -976 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 | 104 B | 0 b | -104 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 8.19 KB | 0 b | -8.19 KB | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 304 B | 0 b | -304 B | -100.00% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 104 B | 0 b | -104 B | -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 |
| #7865 | OriginalCharSlice |
net6.0 | 1.97ms | 407ns | 1.47μs | 0 | 0 | 0 | 640 KB |
| #7865 | OriginalCharSlice |
netcoreapp3.1 | 2.11ms | 8.2μs | 55.6μs | 0 | 0 | 0 | 640 KB |
| #7865 | OriginalCharSlice |
net472 | 2.57ms | 674ns | 2.61μs | 0 | 0 | 0 | 638.98 KB |
| #7865 | OptimizedCharSlice |
net6.0 | 1.41ms | 625ns | 2.42μs | 0 | 0 | 0 | 0 b |
| #7865 | OptimizedCharSlice |
netcoreapp3.1 | 2.77ms | 393ns | 1.36μs | 0 | 0 | 0 | 0 b |
| #7865 | OptimizedCharSlice |
net472 | 1.93ms | 783ns | 2.93μs | 0 | 0 | 0 | 0 b |
| #7865 | OptimizedCharSliceWithPool |
net6.0 | 1.02ms | 365ns | 1.32μs | 0 | 0 | 0 | 0 b |
| #7865 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.89ms | 1.48μs | 5.72μs | 0 | 0 | 0 | 0 b |
| #7865 | OptimizedCharSliceWithPool |
net472 | 1.17ms | 691ns | 2.68μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7865
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.197
625,569.95
748,523.21
multimodal
More allocations ⚠️ in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.98 KB
42.3 KB
318 B
0.76%
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.18 KB
55.64 KB
-547 B
-0.97%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.197 | 625,569.95 | 748,523.21 | multimodal |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.98 KB | 42.3 KB | 318 B | 0.76% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.18 KB | 55.64 KB | -547 B | -0.97% |
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 |
| #7865 | WriteAndFlushEnrichedTraces |
net6.0 | 673μs | 1.76μs | 6.81μs | 0 | 0 | 0 | 41.81 KB |
| #7865 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 741μs | 5.11μs | 50.3μs | 0 | 0 | 0 | 42.3 KB |
| #7865 | WriteAndFlushEnrichedTraces |
net472 | 883μs | 2.71μs | 10.5μs | 4.46 | 0 | 0 | 55.64 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 | 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 |
| #7865 | ExecuteNonQuery |
net6.0 | 1.93μs | 5.93ns | 23ns | 0 | 0 | 0 | 1.02 KB |
| #7865 | ExecuteNonQuery |
netcoreapp3.1 | 2.52μs | 7.06ns | 27.3ns | 0 | 0 | 0 | 1.02 KB |
| #7865 | ExecuteNonQuery |
net472 | 2.79μs | 2.96ns | 11.5ns | 0.151 | 0 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1
1.08 KB
1.07 KB
-8 B
-0.74%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1
1.03 KB
1.02 KB
-8 B
-0.78%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.03 KB
1.01 KB
-24 B
-2.33%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0
1.01 KB
984 B
-24 B
-2.38%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472
1.1 KB
1.07 KB
-32 B
-2.91%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472
1.04 KB
1.01 KB
-32 B
-3.07%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 | 1.08 KB | 1.07 KB | -8 B | -0.74% |
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1 | 1.03 KB | 1.02 KB | -8 B | -0.78% |
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.03 KB | 1.01 KB | -24 B | -2.33% |
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.01 KB | 984 B | -24 B | -2.38% |
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 | 1.1 KB | 1.07 KB | -32 B | -2.91% |
| Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472 | 1.04 KB | 1.01 KB | -32 B | -3.07% |
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 |
| #7865 | CallElasticsearch |
net6.0 | 1.73μs | 8.04ns | 32.2ns | 0 | 0 | 0 | 1.01 KB |
| #7865 | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 10.4ns | 40.3ns | 0 | 0 | 0 | 1.02 KB |
| #7865 | CallElasticsearch |
net472 | 3.33μs | 1.67ns | 6.25ns | 0.149 | 0 | 0 | 1.01 KB |
| #7865 | CallElasticsearchAsync |
net6.0 | 1.84μs | 6.82ns | 26.4ns | 0 | 0 | 0 | 984 B |
| #7865 | CallElasticsearchAsync |
netcoreapp3.1 | 2.45μs | 8.78ns | 34ns | 0 | 0 | 0 | 1.07 KB |
| #7865 | CallElasticsearchAsync |
net472 | 3.53μs | 0.84ns | 3.14ns | 0.157 | 0 | 0 | 1.07 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.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 |
| #7865 | ExecuteAsync |
net6.0 | 1.92μs | 4.55ns | 15.8ns | 0 | 0 | 0 | 952 B |
| #7865 | ExecuteAsync |
netcoreapp3.1 | 2.37μs | 11.3ns | 43.8ns | 0 | 0 | 0 | 952 B |
| #7865 | ExecuteAsync |
net472 | 2.72μs | 2.12ns | 7.33ns | 0.136 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0
2.36 KB
2.34 KB
-16 B
-0.68%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472
3.18 KB
3.14 KB
-41 B
-1.29%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0 | 2.36 KB | 2.34 KB | -16 B | -0.68% |
| Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472 | 3.18 KB | 3.14 KB | -41 B | -1.29% |
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 |
| #7865 | SendAsync |
net6.0 | 6.82μs | 11ns | 41.2ns | 0 | 0 | 0 | 2.34 KB |
| #7865 | SendAsync |
netcoreapp3.1 | 8.62μs | 30.7ns | 119ns | 0 | 0 | 0 | 2.89 KB |
| #7865 | SendAsync |
net472 | 12.2μs | 8.36ns | 32.4ns | 0.49 | 0 | 0 | 3.14 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7865
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
1.274
531,450.00
417,100.00
several?
More allocations ⚠️ in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
250.62 KB
276.51 KB
25.89 KB
10.33%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
272.86 KB
275.21 KB
2.35 KB
0.86%
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.36 KB
42.51 KB
-848 B
-1.96%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
270.34 KB
-8.19 KB
-2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.04 KB
42.54 KB
-1.5 KB
-3.42%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
49.15 KB
-8.19 KB
-14.29%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 1.274 | 531,450.00 | 417,100.00 | several? |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 250.62 KB | 276.51 KB | 25.89 KB | 10.33% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 272.86 KB | 275.21 KB | 2.35 KB | 0.86% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.36 KB | 42.51 KB | -848 B | -1.96% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 270.34 KB | -8.19 KB | -2.94% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 44.04 KB | 42.54 KB | -1.5 KB | -3.42% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 49.15 KB | -8.19 KB | -14.29% |
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 |
| #7865 | StringConcatBenchmark |
net6.0 | 44.2μs | 242ns | 1.33μs | 0 | 0 | 0 | 42.51 KB |
| #7865 | StringConcatBenchmark |
netcoreapp3.1 | 48.2μs | 280ns | 2.15μs | 0 | 0 | 0 | 42.54 KB |
| #7865 | StringConcatBenchmark |
net472 | 57μs | 293ns | 1.34μs | 0 | 0 | 0 | 49.15 KB |
| #7865 | StringConcatAspectBenchmark |
net6.0 | 494μs | 2.24μs | 8.09μs | 0 | 0 | 0 | 276.51 KB |
| #7865 | StringConcatAspectBenchmark |
netcoreapp3.1 | 447μs | 5.89μs | 57.4μs | 0 | 0 | 0 | 275.21 KB |
| #7865 | StringConcatAspectBenchmark |
net472 | 409μs | 2.12μs | 10.2μs | 0 | 0 | 0 | 270.34 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0
1.7 KB
1.69 KB
-16 B
-0.94%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472
1.64 KB
1.6 KB
-36 B
-2.20%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 | 1.7 KB | 1.69 KB | -16 B | -0.94% |
| Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 | 1.64 KB | 1.6 KB | -36 B | -2.20% |
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 |
| #7865 | EnrichedLog |
net6.0 | 2.67μs | 0.737ns | 2.85ns | 0 | 0 | 0 | 1.69 KB |
| #7865 | EnrichedLog |
netcoreapp3.1 | 3.42μs | 16.1ns | 64.5ns | 0 | 0 | 0 | 1.7 KB |
| #7865 | EnrichedLog |
net472 | 3.79μs | 3.41ns | 13.2ns | 0.247 | 0 | 0 | 1.6 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 | 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 |
| #7865 | EnrichedLog |
net6.0 | 128μs | 241ns | 933ns | 0 | 0 | 0 | 4.31 KB |
| #7865 | EnrichedLog |
netcoreapp3.1 | 132μs | 416ns | 1.56μs | 0 | 0 | 0 | 4.31 KB |
| #7865 | EnrichedLog |
net472 | 173μs | 433ns | 1.68μs | 0 | 0 | 0 | 4.51 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0
2.26 KB
2.24 KB
-20 B
-0.88%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472
2.08 KB
2.05 KB
-33 B
-1.59%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 | 2.26 KB | 2.24 KB | -20 B | -0.88% |
| Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 | 2.08 KB | 2.05 KB | -33 B | -1.59% |
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 |
| #7865 | EnrichedLog |
net6.0 | 5.05μs | 13.2ns | 51.2ns | 0 | 0 | 0 | 2.24 KB |
| #7865 | EnrichedLog |
netcoreapp3.1 | 7.03μs | 20.9ns | 81ns | 0 | 0 | 0 | 2.26 KB |
| #7865 | EnrichedLog |
net472 | 7.69μs | 4.06ns | 15.2ns | 0.308 | 0 | 0 | 2.05 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7865
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1
1.2 KB
1.19 KB
-8 B
-0.67%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0
1.2 KB
1.18 KB
-24 B
-2.00%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472
1.2 KB
1.17 KB
-33 B
-2.74%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 | 1.2 KB | 1.19 KB | -8 B | -0.67% |
| Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 | 1.2 KB | 1.18 KB | -24 B | -2.00% |
| Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 | 1.2 KB | 1.17 KB | -33 B | -2.74% |
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 |
| #7865 | SendReceive |
net6.0 | 1.96μs | 8.92ns | 35.7ns | 0 | 0 | 0 | 1.18 KB |
| #7865 | SendReceive |
netcoreapp3.1 | 2.48μs | 12.2ns | 50.5ns | 0 | 0 | 0 | 1.19 KB |
| #7865 | SendReceive |
net472 | 3.03μs | 1.79ns | 6.94ns | 0.177 | 0 | 0 | 1.17 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.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 |
| #7865 | EnrichedLog |
net6.0 | 4.39μs | 5.57ns | 21.6ns | 0 | 0 | 0 | 1.58 KB |
| #7865 | EnrichedLog |
netcoreapp3.1 | 5.62μs | 15.2ns | 59.1ns | 0 | 0 | 0 | 1.63 KB |
| #7865 | EnrichedLog |
net472 | 6.69μs | 5.61ns | 21.7ns | 0.302 | 0 | 0 | 2.03 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 | 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 |
| #7865 | StartFinishSpan |
net6.0 | 799ns | 0.281ns | 1.05ns | 0 | 0 | 0 | 576 B |
| #7865 | StartFinishSpan |
netcoreapp3.1 | 973ns | 4.68ns | 19.8ns | 0 | 0 | 0 | 576 B |
| #7865 | StartFinishSpan |
net472 | 909ns | 0.356ns | 1.38ns | 0.091 | 0 | 0 | 578 B |
| #7865 | StartFinishScope |
net6.0 | 957ns | 0.384ns | 1.38ns | 0 | 0 | 0 | 696 B |
| #7865 | StartFinishScope |
netcoreapp3.1 | 1.15μs | 6.28ns | 37.1ns | 0 | 0 | 0 | 696 B |
| #7865 | StartFinishScope |
net472 | 1.19μs | 2.23ns | 8.66ns | 0.101 | 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 | 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 |
| #7865 | RunOnMethodBegin |
net6.0 | 1.09μs | 1.6ns | 6.18ns | 0 | 0 | 0 | 696 B |
| #7865 | RunOnMethodBegin |
netcoreapp3.1 | 1.36μs | 6.48ns | 25.9ns | 0 | 0 | 0 | 696 B |
| #7865 | RunOnMethodBegin |
net472 | 1.46μs | 0.428ns | 1.66ns | 0.102 | 0 | 0 | 658 B |
|
Summary of changes
Reason for change
Benchmarks should be isolated to keep them consistent, but unfortunately a lot of our code has
Tracer.InstanceandSecurity.Instancescattered around. That means we need to set up global state for some of the benchmarks. Currently, we're never cleaning up that global state, which could introduce variance (flake) in the benchmarks).Similarly, new
Tracerinstances start a bunch of background tasks, such as remote configuration, telemetry, discovery service. These all have the possibility of skewing results and introducing flake.Implementation details
Tracerinstances, but anything disposable) in[GlobalCleanup]Tracerinstances in cleanupTest coverage
This is the test - we may see some variation from the current results, but hopefully the results will be more stable subsequently
Other details
I wish we could not use
Tracer.Instance(orSecurity.Instance, orIast.Instance) at all. It would make all of this much easier to reason about and reduce the chance of accidental cross-talk. That's something we'll move towards slowly, for now this is probably the best we can do.