dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

Fix several errors on probes with optimized code

Open dudikeleti opened this issue 3 years ago • 3 comments

Summary of changes

Fix several errors with probes (specially async probes) in optimized code

dudikeleti avatar Sep 21 '22 08:09 dudikeleti

Benchmarks Report :snail:

Benchmarks for #3236 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same 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.AgentWriterBenchmark - 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 WriteAndFlushEnrichedTraces net472 713μs 386ns 1.44μs 0.355 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 461μs 156ns 582ns 0 0 0 2.58 KB
#3236 WriteAndFlushEnrichedTraces net472 715μs 685ns 2.65μs 0.357 0 0 3.18 KB
#3236 WriteAndFlushEnrichedTraces netcoreapp3.1 475μs 153ns 594ns 0 0 0 2.58 KB
Benchmarks.Trace.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 net472 191ns 0.16ns 0.578ns 0.0675 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 235ns 0.266ns 0.994ns 0.00587 0 0 424 B
master AllCycleMoreComplexBody net472 180ns 0.159ns 0.614ns 0.0638 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 236ns 0.217ns 0.841ns 0.00545 0 0 400 B
master BodyExtractorSimpleBody net472 259ns 0.321ns 1.2ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 219ns 0.17ns 0.658ns 0.00374 0 0 272 B
master BodyExtractorMoreComplexBody net472 14.7μs 11.4ns 42.5ns 1.2 0.0219 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 11.9μs 10.8ns 40.4ns 0.0894 0 0 6.75 KB
#3236 AllCycleSimpleBody net472 183ns 0.134ns 0.502ns 0.0675 9.2E-05 0 425 B
#3236 AllCycleSimpleBody netcoreapp3.1 235ns 0.167ns 0.625ns 0.00581 0 0 424 B
#3236 AllCycleMoreComplexBody net472 181ns 0.168ns 0.649ns 0.0637 0 0 401 B
#3236 AllCycleMoreComplexBody netcoreapp3.1 235ns 0.225ns 0.873ns 0.00553 0 0 400 B
#3236 BodyExtractorSimpleBody net472 262ns 0.335ns 1.3ns 0.0574 0 0 361 B
#3236 BodyExtractorSimpleBody netcoreapp3.1 222ns 0.37ns 1.43ns 0.0037 0 0 272 B
#3236 BodyExtractorMoreComplexBody net472 14.4μs 13.4ns 51.9ns 1.21 0.0217 0 7.62 KB
#3236 BodyExtractorMoreComplexBody netcoreapp3.1 12.1μs 18.2ns 70.4ns 0.0902 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown :shrug: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 179μs 134ns 517ns 0.268 0 0 20.6 KB
#3236 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3236 SendRequest netcoreapp3.1 181μs 172ns 665ns 0.181 0 0 20.58 KB
Benchmarks.Trace.DbCommandBenchmark - 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 ExecuteNonQuery net472 1.86μs 1.05ns 4.08ns 0.15 0.000939 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.39μs 0.796ns 2.98ns 0.0127 0 0 936 B
#3236 ExecuteNonQuery net472 1.87μs 1.32ns 4.94ns 0.15 0 0 947 B
#3236 ExecuteNonQuery netcoreapp3.1 1.46μs 1.27ns 4.93ns 0.0123 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - 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 CallElasticsearch net472 2.59μs 2.43ns 9.43ns 0.184 0.00129 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.53μs 0.414ns 1.49ns 0.0145 0 0 1.1 KB
master CallElasticsearchAsync net472 2.66μs 2.09ns 8.11ns 0.205 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.64μs 0.735ns 2.65ns 0.0164 0 0 1.22 KB
#3236 CallElasticsearch net472 2.65μs 2.24ns 8.66ns 0.184 0 0 1.16 KB
#3236 CallElasticsearch netcoreapp3.1 1.51μs 1.97ns 7.61ns 0.0151 0 0 1.1 KB
#3236 CallElasticsearchAsync net472 2.74μs 1.8ns 6.97ns 0.205 0 0 1.29 KB
#3236 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.811ns 3.03ns 0.0163 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - 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 ExecuteAsync net472 2.87μs 4.48ns 17.3ns 0.225 0 0 1.42 KB
master ExecuteAsync netcoreapp3.1 1.8μs 0.769ns 2.98ns 0.018 0 0 1.34 KB
#3236 ExecuteAsync net472 2.94μs 2.18ns 8.45ns 0.226 0 0 1.42 KB
#3236 ExecuteAsync netcoreapp3.1 1.74μs 3.26ns 12.6ns 0.0182 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - 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 SendAsync net472 5.9μs 2.99ns 11.2ns 0.44 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.77μs 1.82ns 7.05ns 0.0358 0 0 2.6 KB
#3236 SendAsync net472 5.84μs 2.48ns 9.59ns 0.44 0 0 2.77 KB
#3236 SendAsync netcoreapp3.1 3.72μs 1.22ns 4.58ns 0.0353 0 0 2.6 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 net472 3.25μs 15.5ns 59.8ns 0.287 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.48μs 13.5ns 109ns 0.0242 0 0 1.85 KB
#3236 EnrichedLog net472 3.2μs 1.95ns 7.57ns 0.288 0 0 1.81 KB
#3236 EnrichedLog netcoreapp3.1 2.43μs 1.41ns 5.28ns 0.0254 0 0 1.85 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 net472 152μs 199ns 770ns 0.682 0.227 0 4.65 KB
master EnrichedLog netcoreapp3.1 119μs 138ns 535ns 0 0 0 4.49 KB
#3236 EnrichedLog net472 153μs 141ns 546ns 0.687 0.229 0 4.65 KB
#3236 EnrichedLog netcoreapp3.1 117μs 264ns 986ns 0.0574 0 0 4.5 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 net472 5.73μs 12.3ns 47.6ns 0.57 0.00292 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.35μs 1.73ns 6.48ns 0.0531 0 0 3.91 KB
#3236 EnrichedLog net472 5.9μs 1.8ns 6.73ns 0.57 0.00297 0 3.59 KB
#3236 EnrichedLog netcoreapp3.1 4.57μs 8.51ns 31.8ns 0.0526 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - 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 SendReceive net472 2.23μs 2.36ns 9.15ns 0.217 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.82μs 0.922ns 3.57ns 0.0174 0 0 1.32 KB
#3236 SendReceive net472 2.24μs 1.31ns 4.74ns 0.218 0 0 1.37 KB
#3236 SendReceive netcoreapp3.1 1.84μs 0.789ns 2.95ns 0.0175 0 0 1.32 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 net472 5.13μs 1.7ns 6.37ns 0.353 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.33μs 1.36ns 5.08ns 0.0239 0 0 1.8 KB
#3236 EnrichedLog net472 4.97μs 2.25ns 8.41ns 0.353 0.00249 0 2.23 KB
#3236 EnrichedLog netcoreapp3.1 4.44μs 1.31ns 4.92ns 0.0225 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - 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 StartFinishSpan net472 1.24μs 0.732ns 2.74ns 0.129 0 0 810 B
master StartFinishSpan netcoreapp3.1 966ns 1.16ns 4.18ns 0.01 0 0 760 B
master StartFinishScope net472 1.41μs 1.06ns 4.12ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.05μs 0.383ns 1.38ns 0.0119 0 0 880 B
#3236 StartFinishSpan net472 1.29μs 0.563ns 2.03ns 0.129 0 0 810 B
#3236 StartFinishSpan netcoreapp3.1 939ns 0.485ns 1.88ns 0.0104 0 0 760 B
#3236 StartFinishScope net472 1.39μs 1.06ns 4.09ns 0.141 0 0 891 B
#3236 StartFinishScope netcoreapp3.1 1.09μs 0.447ns 1.73ns 0.012 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - 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 RunOnMethodBegin net472 1.51μs 1.08ns 4.17ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.16μs 0.387ns 1.45ns 0.0122 0 0 880 B
#3236 RunOnMethodBegin net472 1.48μs 0.631ns 2.36ns 0.142 0 0 891 B
#3236 RunOnMethodBegin netcoreapp3.1 1.17μs 0.319ns 1.19ns 0.0117 0 0 880 B

andrewlock avatar Sep 21 '22 08:09 andrewlock

Benchmarks Report :snail:

Benchmarks for #3236 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same 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.AgentWriterBenchmark - 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 WriteAndFlushEnrichedTraces net472 710μs 506ns 1.96μs 0.357 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 459μs 275ns 1.06μs 0 0 0 2.58 KB
#3236 WriteAndFlushEnrichedTraces net472 717μs 502ns 1.95μs 0.359 0 0 3.18 KB
#3236 WriteAndFlushEnrichedTraces netcoreapp3.1 463μs 458ns 1.77μs 0 0 0 2.58 KB
Benchmarks.Trace.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 net472 182ns 0.155ns 0.599ns 0.0675 9.18E-05 0 425 B
master AllCycleSimpleBody netcoreapp3.1 239ns 0.154ns 0.575ns 0.00577 0 0 424 B
master AllCycleMoreComplexBody net472 182ns 0.179ns 0.67ns 0.0637 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 245ns 0.304ns 1.18ns 0.00557 0 0 400 B
master BodyExtractorSimpleBody net472 255ns 0.209ns 0.783ns 0.0574 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 216ns 0.251ns 0.938ns 0.00367 0 0 272 B
master BodyExtractorMoreComplexBody net472 14.8μs 9.99ns 36ns 1.21 0.0148 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 12μs 18.8ns 72.7ns 0.09 0 0 6.75 KB
#3236 AllCycleSimpleBody net472 186ns 0.263ns 1.02ns 0.0675 0 0 425 B
#3236 AllCycleSimpleBody netcoreapp3.1 236ns 0.153ns 0.551ns 0.00584 0 0 424 B
#3236 AllCycleMoreComplexBody net472 181ns 0.143ns 0.537ns 0.0637 0 0 401 B
#3236 AllCycleMoreComplexBody netcoreapp3.1 240ns 0.298ns 1.16ns 0.00552 0 0 400 B
#3236 BodyExtractorSimpleBody net472 254ns 0.144ns 0.52ns 0.0573 0 0 361 B
#3236 BodyExtractorSimpleBody netcoreapp3.1 227ns 0.245ns 0.948ns 0.00367 0 0 272 B
#3236 BodyExtractorMoreComplexBody net472 14.9μs 14.6ns 56.6ns 1.21 0.0148 0 7.62 KB
#3236 BodyExtractorMoreComplexBody netcoreapp3.1 11.9μs 15.2ns 58.8ns 0.088 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown :shrug: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 178μs 163ns 588ns 0.268 0 0 20.58 KB
#3236 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3236 SendRequest netcoreapp3.1 183μs 212ns 822ns 0.182 0 0 20.58 KB
Benchmarks.Trace.DbCommandBenchmark - 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 ExecuteNonQuery net472 1.84μs 1.08ns 4.17ns 0.15 0 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.55μs 1.26ns 4.87ns 0.0129 0 0 936 B
#3236 ExecuteNonQuery net472 1.84μs 0.507ns 1.96ns 0.15 0 0 947 B
#3236 ExecuteNonQuery netcoreapp3.1 1.5μs 0.87ns 3.14ns 0.0127 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - 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 CallElasticsearch net472 2.5μs 1.45ns 5.43ns 0.183 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.56μs 0.979ns 3.66ns 0.0148 0 0 1.1 KB
master CallElasticsearchAsync net472 2.59μs 1.71ns 6.61ns 0.205 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.69μs 0.671ns 2.42ns 0.0162 0 0 1.22 KB
#3236 CallElasticsearch net472 2.62μs 1.86ns 7.22ns 0.183 0 0 1.16 KB
#3236 CallElasticsearch netcoreapp3.1 1.61μs 1.48ns 5.72ns 0.0144 0 0 1.1 KB
#3236 CallElasticsearchAsync net472 2.78μs 1.89ns 7.32ns 0.204 0 0 1.29 KB
#3236 CallElasticsearchAsync netcoreapp3.1 1.71μs 1.66ns 6.42ns 0.0161 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - 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 ExecuteAsync net472 2.82μs 11ns 42.7ns 0.225 0 0 1.42 KB
master ExecuteAsync netcoreapp3.1 1.71μs 1.27ns 4.91ns 0.0179 0 0 1.34 KB
#3236 ExecuteAsync net472 2.79μs 1.42ns 5.31ns 0.226 0 0 1.42 KB
#3236 ExecuteAsync netcoreapp3.1 1.79μs 0.588ns 2.2ns 0.018 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - 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 SendAsync net472 5.85μs 3.31ns 12.8ns 0.438 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.66μs 3.8ns 14.2ns 0.0349 0 0 2.6 KB
#3236 SendAsync net472 5.73μs 9.37ns 36.3ns 0.438 0 0 2.77 KB
#3236 SendAsync netcoreapp3.1 3.61μs 5.13ns 19.2ns 0.0346 0 0 2.6 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 net472 3.24μs 3.36ns 13ns 0.288 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.52μs 1.48ns 5.74ns 0.0252 0 0 1.85 KB
#3236 EnrichedLog net472 3.35μs 2.78ns 10.4ns 0.288 0 0 1.81 KB
#3236 EnrichedLog netcoreapp3.1 2.55μs 1.16ns 4.33ns 0.0253 0 0 1.85 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 net472 152μs 155ns 600ns 0.685 0.228 0 4.65 KB
master EnrichedLog netcoreapp3.1 118μs 213ns 823ns 0.0579 0 0 4.49 KB
#3236 EnrichedLog net472 156μs 282ns 1.09μs 0.699 0.233 0 4.66 KB
#3236 EnrichedLog netcoreapp3.1 118μs 172ns 620ns 0 0 0 4.49 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 net472 5.72μs 14ns 54.3ns 0.57 0.00285 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.39μs 3.4ns 12.3ns 0.0532 0.00213 0 3.91 KB
#3236 EnrichedLog net472 5.92μs 10.7ns 39.9ns 0.568 0.0029 0 3.59 KB
#3236 EnrichedLog netcoreapp3.1 4.53μs 3.25ns 12.2ns 0.0518 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - 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 SendReceive net472 2.38μs 3.65ns 14.1ns 0.218 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.76μs 0.62ns 2.4ns 0.0185 0 0 1.32 KB
#3236 SendReceive net472 2.28μs 1.97ns 7.64ns 0.217 0 0 1.37 KB
#3236 SendReceive netcoreapp3.1 1.79μs 1.19ns 4.46ns 0.0179 0 0 1.32 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 net472 4.95μs 1.44ns 4.97ns 0.353 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.3μs 3.04ns 11.4ns 0.0236 0 0 1.8 KB
#3236 EnrichedLog net472 5.08μs 2.06ns 7.99ns 0.352 0.00253 0 2.23 KB
#3236 EnrichedLog netcoreapp3.1 4.32μs 2.64ns 10.2ns 0.0237 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - 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 StartFinishSpan net472 1.15μs 0.711ns 2.75ns 0.129 0 0 810 B
master StartFinishSpan netcoreapp3.1 985ns 0.614ns 2.38ns 0.0103 0 0 760 B
master StartFinishScope net472 1.45μs 0.422ns 1.52ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.05μs 0.371ns 1.44ns 0.0116 0 0 880 B
#3236 StartFinishSpan net472 1.09μs 0.503ns 1.95ns 0.129 0 0 810 B
#3236 StartFinishSpan netcoreapp3.1 916ns 0.413ns 1.55ns 0.0104 0 0 760 B
#3236 StartFinishScope net472 1.39μs 0.739ns 2.86ns 0.141 0 0 891 B
#3236 StartFinishScope netcoreapp3.1 1.08μs 0.502ns 1.88ns 0.0124 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - 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 RunOnMethodBegin net472 1.58μs 1.19ns 4.62ns 0.142 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.18μs 0.571ns 2.21ns 0.0118 0 0 880 B
#3236 RunOnMethodBegin net472 1.51μs 1.19ns 4.13ns 0.141 0 0 891 B
#3236 RunOnMethodBegin netcoreapp3.1 1.15μs 0.435ns 1.68ns 0.0121 0 0 880 B

andrewlock avatar Sep 21 '22 14:09 andrewlock

Benchmarks Report :snail:

Benchmarks for #3236 compared to master:

  • All benchmarks have the same speed
  • All benchmarks have the same 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.AgentWriterBenchmark - 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 WriteAndFlushEnrichedTraces net472 719μs 583ns 2.26μs 0.359 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 459μs 199ns 769ns 0 0 0 2.59 KB
#3236 WriteAndFlushEnrichedTraces net472 723μs 491ns 1.9μs 0.357 0 0 3.18 KB
#3236 WriteAndFlushEnrichedTraces netcoreapp3.1 464μs 170ns 659ns 0 0 0 2.58 KB
Benchmarks.Trace.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 net472 199ns 0.35ns 1.36ns 0.0676 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 253ns 0.0874ns 0.327ns 0.00587 0 0 424 B
master AllCycleMoreComplexBody net472 196ns 0.042ns 0.163ns 0.0637 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 276ns 0.102ns 0.393ns 0.00551 0 0 400 B
master BodyExtractorSimpleBody net472 299ns 0.456ns 1.77ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 238ns 0.192ns 0.744ns 0.00371 0 0 272 B
master BodyExtractorMoreComplexBody net472 15.7μs 10.5ns 40.6ns 1.21 0.0158 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 12.4μs 3.82ns 14.3ns 0.0925 0 0 6.75 KB
#3236 AllCycleSimpleBody net472 196ns 0.151ns 0.566ns 0.0676 0 0 425 B
#3236 AllCycleSimpleBody netcoreapp3.1 252ns 0.161ns 0.58ns 0.00581 0 0 424 B
#3236 AllCycleMoreComplexBody net472 195ns 0.0605ns 0.226ns 0.0637 0 0 401 B
#3236 AllCycleMoreComplexBody netcoreapp3.1 256ns 0.145ns 0.521ns 0.00538 0 0 400 B
#3236 BodyExtractorSimpleBody net472 277ns 0.244ns 0.946ns 0.0574 0 0 361 B
#3236 BodyExtractorSimpleBody netcoreapp3.1 246ns 0.185ns 0.717ns 0.00368 0 0 272 B
#3236 BodyExtractorMoreComplexBody net472 15.8μs 14.1ns 54.8ns 1.21 0.0158 0 7.62 KB
#3236 BodyExtractorMoreComplexBody netcoreapp3.1 12.4μs 5.59ns 21.7ns 0.093 0 0 6.75 KB
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 net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 180μs 226ns 845ns 0.273 0 0 20.58 KB
#3236 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3236 SendRequest netcoreapp3.1 179μs 205ns 765ns 0.274 0 0 20.58 KB
Benchmarks.Trace.DbCommandBenchmark - 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 ExecuteNonQuery net472 1.87μs 1.19ns 4.46ns 0.15 0 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.41μs 0.622ns 2.24ns 0.0127 0 0 936 B
#3236 ExecuteNonQuery net472 1.81μs 0.651ns 2.52ns 0.15 0 0 947 B
#3236 ExecuteNonQuery netcoreapp3.1 1.47μs 0.52ns 2.01ns 0.0124 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - 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 CallElasticsearch net472 2.6μs 2.18ns 8.45ns 0.183 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.51μs 1.49ns 5.58ns 0.0143 0 0 1.1 KB
master CallElasticsearchAsync net472 2.65μs 1.68ns 6.5ns 0.204 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.775ns 2.9ns 0.0168 0 0 1.22 KB
#3236 CallElasticsearch net472 2.66μs 1.84ns 7.11ns 0.183 0 0 1.16 KB
#3236 CallElasticsearch netcoreapp3.1 1.56μs 1.59ns 6.15ns 0.0149 0 0 1.1 KB
#3236 CallElasticsearchAsync net472 2.82μs 0.848ns 3.06ns 0.204 0 0 1.29 KB
#3236 CallElasticsearchAsync netcoreapp3.1 1.65μs 1.05ns 3.92ns 0.016 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - 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 ExecuteAsync net472 2.85μs 3.84ns 19.2ns 0.225 0 0 1.42 KB
master ExecuteAsync netcoreapp3.1 1.69μs 1.4ns 5.06ns 0.018 0 0 1.34 KB
#3236 ExecuteAsync net472 2.79μs 1.4ns 5.41ns 0.225 0.0014 0 1.42 KB
#3236 ExecuteAsync netcoreapp3.1 1.72μs 0.557ns 2.08ns 0.018 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - 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 SendAsync net472 5.91μs 2.59ns 10ns 0.439 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.66μs 2ns 7.49ns 0.0348 0 0 2.6 KB
#3236 SendAsync net472 5.99μs 3.66ns 14.2ns 0.44 0 0 2.77 KB
#3236 SendAsync netcoreapp3.1 3.64μs 1.94ns 7.51ns 0.0365 0 0 2.6 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 net472 3.17μs 3.19ns 12.3ns 0.287 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.61μs 1.07ns 4.13ns 0.0249 0 0 1.85 KB
#3236 EnrichedLog net472 3.16μs 2.55ns 9.53ns 0.287 0.00158 0 1.81 KB
#3236 EnrichedLog netcoreapp3.1 2.46μs 2.97ns 11.1ns 0.0246 0 0 1.85 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 net472 149μs 95.7ns 345ns 0.67 0.223 0 4.65 KB
master EnrichedLog netcoreapp3.1 116μs 245ns 949ns 0.0582 0 0 4.49 KB
#3236 EnrichedLog net472 150μs 154ns 574ns 0.677 0.226 0 4.67 KB
#3236 EnrichedLog netcoreapp3.1 117μs 130ns 505ns 0 0 0 4.49 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 net472 5.98μs 2.69ns 10.4ns 0.569 0.003 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.4μs 2.56ns 9.92ns 0.0525 0 0 3.91 KB
#3236 EnrichedLog net472 5.97μs 1.8ns 6.98ns 0.567 0.00297 0 3.59 KB
#3236 EnrichedLog netcoreapp3.1 4.57μs 1.51ns 5.86ns 0.055 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - 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 SendReceive net472 2.19μs 1.61ns 6.24ns 0.217 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.82μs 1.1ns 4.24ns 0.0182 0 0 1.32 KB
#3236 SendReceive net472 2.19μs 1.63ns 6.09ns 0.218 0 0 1.37 KB
#3236 SendReceive netcoreapp3.1 1.8μs 1.14ns 4.4ns 0.0179 0 0 1.32 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 net472 5.04μs 2.87ns 11.1ns 0.354 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.48μs 1.89ns 6.81ns 0.0246 0 0 1.8 KB
#3236 EnrichedLog net472 4.94μs 2.16ns 8.1ns 0.353 0 0 2.23 KB
#3236 EnrichedLog netcoreapp3.1 4.31μs 3.76ns 14.6ns 0.0237 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - 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 StartFinishSpan net472 1.16μs 0.421ns 1.52ns 0.128 0 0 810 B
master StartFinishSpan netcoreapp3.1 974ns 0.436ns 1.69ns 0.0102 0 0 760 B
master StartFinishScope net472 1.41μs 0.965ns 3.48ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.1μs 0.241ns 0.902ns 0.0115 0 0 880 B
#3236 StartFinishSpan net472 1.2μs 0.511ns 1.84ns 0.128 0 0 810 B
#3236 StartFinishSpan netcoreapp3.1 941ns 0.437ns 1.63ns 0.0103 0 0 760 B
#3236 StartFinishScope net472 1.44μs 1.01ns 3.9ns 0.141 0 0 891 B
#3236 StartFinishScope netcoreapp3.1 1.08μs 0.8ns 2.88ns 0.0119 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - 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 RunOnMethodBegin net472 1.43μs 1ns 3.75ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.2μs 0.437ns 1.63ns 0.012 0 0 880 B
#3236 RunOnMethodBegin net472 1.49μs 0.714ns 2.76ns 0.141 0 0 891 B
#3236 RunOnMethodBegin netcoreapp3.1 1.14μs 0.384ns 1.49ns 0.0115 0 0 880 B

andrewlock avatar Sep 22 '22 08:09 andrewlock

Hi @dudikeleti, is this PR still relevant? I'm wondering if we can close it

zacharycmontoya avatar Jan 04 '24 18:01 zacharycmontoya