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

Avro instrumentation for schema tracking

Open vandonr opened this issue 7 months ago • 4 comments
trafficstars

Summary of changes

instrument avro's serialization and deserialization methods to capture the schema for schema tracking

Reason for change

populate DSM's new schema tracking product

Implementation details

There are 2 main entry points for ser/deser, I instrumented both. One is a templatized interface which apparently we cannot instrument with our current tooling, so I fell back to an abstract class that seems to have a pretty wide coverage so that I don't think anything should fall through the cracks except in very custom setups.

Test coverage

added a sample app + tests with snapshots, works like the protobuf instrumentation

Other details

vandonr avatar Apr 23 '25 06:04 vandonr

Datadog Report

All test runs b3bf0c1 :link:

:white_check_mark: 2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Test Service View
dd-trace-dotnet 0 0 0 574667 4605 32h 36m 55.48s Link
exploration_tests 0 0 0 22085 3 2m 15.24s Link

Benchmarks

Benchmarks Report for benchmark platform :snail:

Benchmarks for #6882 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.249
  • 41 benchmarks have fewer allocations
  • 9 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: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.75 KB 5.68 KB -74 B -1.29%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 5.58 KB 5.5 KB -76 B -1.36%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 11.2μs 59.7ns 322ns 0 0 0 5.58 KB
master StartStopWithChild netcoreapp3.1 14.1μs 67.5ns 286ns 0 0 0 5.75 KB
master StartStopWithChild net472 22.1μs 119ns 651ns 1.03 0.411 0.103 6.09 KB
#6882 StartStopWithChild net6.0 10.5μs 58.5ns 375ns 0 0 0 5.5 KB
#6882 StartStopWithChild netcoreapp3.1 13.8μs 70.4ns 338ns 0 0 0 5.68 KB
#6882 StartStopWithChild net472 22.5μs 120ns 723ns 0.957 0.319 0 6.08 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.33 KB 3.31 KB -23 B -0.69%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 927μs 26.6ns 103ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 404ns 1.56μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.25ms 357ns 1.38μs 0 0 0 3.33 KB
#6882 WriteAndFlushEnrichedTraces net6.0 932μs 107ns 400ns 0 0 0 2.71 KB
#6882 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 60.1ns 208ns 0 0 0 2.7 KB
#6882 WriteAndFlushEnrichedTraces net472 1.23ms 74.8ns 290ns 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 236.35 KB 241.7 KB 5.35 KB 2.26%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 239.87 KB 245.22 KB 5.35 KB 2.23%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 204.77 KB 207.18 KB 2.41 KB 1.18%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 197.06 KB 199.37 KB 2.31 KB 1.17%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 208.18 KB 210.59 KB 2.41 KB 1.16%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 200.56 KB 202.88 KB 2.31 KB 1.15%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 331μs 1.76μs 8.42μs 0 0 0 197.06 KB
master AllCycleSimpleBody netcoreapp3.1 510μs 1.45μs 5.61μs 0 0 0 204.77 KB
master AllCycleSimpleBody net472 436μs 119ns 460ns 36.6 2.16 0 236.35 KB
master AllCycleMoreComplexBody net6.0 338μs 1.76μs 8.8μs 0 0 0 200.56 KB
master AllCycleMoreComplexBody netcoreapp3.1 495μs 987ns 3.56μs 0 0 0 208.18 KB
master AllCycleMoreComplexBody net472 446μs 106ns 412ns 36.6 2.16 0 239.87 KB
master ObjectExtractorSimpleBody net6.0 311ns 1.77ns 12.3ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 409ns 1.93ns 8.2ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 303ns 0.175ns 0.676ns 0.0442 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.52μs 29.5ns 110ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.76μs 36.2ns 140ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.66μs 0.89ns 3.33ns 0.599 0 0 3.8 KB
#6882 AllCycleSimpleBody net6.0 330μs 1.36μs 5.28μs 0 0 0 199.37 KB
#6882 AllCycleSimpleBody netcoreapp3.1 510μs 169ns 632ns 0 0 0 207.18 KB
#6882 AllCycleSimpleBody net472 450μs 137ns 530ns 37.9 2.23 0 241.7 KB
#6882 AllCycleMoreComplexBody net6.0 340μs 968ns 3.75μs 0 0 0 202.88 KB
#6882 AllCycleMoreComplexBody netcoreapp3.1 502μs 1.63μs 6.33μs 0 0 0 210.59 KB
#6882 AllCycleMoreComplexBody net472 454μs 104ns 404ns 37.9 2.23 0 245.22 KB
#6882 ObjectExtractorSimpleBody net6.0 312ns 0.451ns 1.75ns 0 0 0 280 B
#6882 ObjectExtractorSimpleBody netcoreapp3.1 393ns 2.2ns 13.4ns 0 0 0 272 B
#6882 ObjectExtractorSimpleBody net472 304ns 0.061ns 0.236ns 0.0433 0 0 281 B
#6882 ObjectExtractorMoreComplexBody net6.0 6.28μs 29.8ns 126ns 0 0 0 3.78 KB
#6882 ObjectExtractorMoreComplexBody netcoreapp3.1 7.75μs 36.6ns 142ns 0 0 0 3.69 KB
#6882 ObjectExtractorMoreComplexBody net472 6.91μs 2.17ns 8.39ns 0.588 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 2.16 KB 2.15 KB -11 B -0.51%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 73.3μs 263ns 984ns 0 0 0 32.41 KB
master EncodeArgs netcoreapp3.1 95.7μs 36.2ns 130ns 0 0 0 32.4 KB
master EncodeArgs net472 107μs 17.6ns 65.8ns 4.82 0 0 32.51 KB
master EncodeLegacyArgs net6.0 143μs 122ns 472ns 0 0 0 2.16 KB
master EncodeLegacyArgs netcoreapp3.1 197μs 42.5ns 147ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 261μs 66.8ns 250ns 0 0 0 2.16 KB
#6882 EncodeArgs net6.0 74.1μs 304ns 1.18μs 0 0 0 32.4 KB
#6882 EncodeArgs netcoreapp3.1 94.5μs 188ns 703ns 0 0 0 32.4 KB
#6882 EncodeArgs net472 106μs 21.9ns 84.7ns 4.81 0 0 32.51 KB
#6882 EncodeLegacyArgs net6.0 144μs 21.6ns 83.8ns 0 0 0 2.15 KB
#6882 EncodeLegacyArgs netcoreapp3.1 199μs 665ns 2.58μs 0 0 0 2.14 KB
#6882 EncodeLegacyArgs net472 262μs 29.5ns 111ns 0 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - 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 RunWafRealisticBenchmark net6.0 271μs 133ns 499ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 294μs 264ns 989ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 307μs 38.1ns 147ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 181μs 80.1ns 300ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 198μs 104ns 404ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 207μs 45.3ns 169ns 0 0 0 2.28 KB
#6882 RunWafRealisticBenchmark net6.0 271μs 54.5ns 211ns 0 0 0 4.55 KB
#6882 RunWafRealisticBenchmark netcoreapp3.1 292μs 60.3ns 226ns 0 0 0 4.48 KB
#6882 RunWafRealisticBenchmark net472 308μs 39ns 146ns 0 0 0 4.66 KB
#6882 RunWafRealisticBenchmarkWithAttack net6.0 184μs 59.2ns 229ns 0 0 0 2.24 KB
#6882 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 196μs 656ns 2.54μs 0 0 0 2.22 KB
#6882 RunWafRealisticBenchmarkWithAttack net472 208μs 38.4ns 149ns 0 0 0 2.28 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 net6.0 61.1μs 29ns 104ns 0 0 0 14.53 KB
master SendRequest netcoreapp3.1 69.9μs 118ns 440ns 0 0 0 17.42 KB
master SendRequest net472 0.0171ns 0.00147ns 0.00551ns 0 0 0 0 b
#6882 SendRequest net6.0 60.8μs 30.7ns 111ns 0 0 0 14.52 KB
#6882 SendRequest netcoreapp3.1 71μs 59.3ns 214ns 0 0 0 17.42 KB
#6882 SendRequest net472 0.0172ns 0.0021ns 0.00814ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #6882

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.175 631,437.50 741,892.19

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 645μs 512ns 1.98μs 0 0 0 41.73 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 631μs 1.67μs 6.67μs 0 0 0 41.89 KB
master WriteAndFlushEnrichedTraces net472 923μs 1.93μs 7.2μs 4.46 0 0 55.75 KB
#6882 WriteAndFlushEnrichedTraces net6.0 683μs 3.87μs 26.5μs 0 0 0 41.78 KB
#6882 WriteAndFlushEnrichedTraces netcoreapp3.1 730μs 4.2μs 34.2μs 0 0 0 41.9 KB
#6882 WriteAndFlushEnrichedTraces net472 877μs 4.29μs 17.7μs 8.33 0 0 56.01 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 1.03 KB 1.02 KB -8 B -0.78%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 1.02 KB 1.02 KB -8 B -0.78%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net472 995 B 987 B -8 B -0.80%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.99μs 10.2ns 46.8ns 0 0 0 1.03 KB
master ExecuteNonQuery netcoreapp3.1 2.53μs 3.43ns 13.3ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.7μs 2.41ns 9.34ns 0.147 0.0134 0 995 B
#6882 ExecuteNonQuery net6.0 1.98μs 1.82ns 6.79ns 0 0 0 1.02 KB
#6882 ExecuteNonQuery netcoreapp3.1 2.55μs 7.36ns 28.5ns 0 0 0 1.02 KB
#6882 ExecuteNonQuery net472 2.75μs 2.38ns 9.22ns 0.152 0.0138 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 1.11 KB 1.1 KB -8 B -0.72%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 1.09 KB 1.08 KB -8 B -0.74%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472 1.05 KB 1.04 KB -8 B -0.76%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.04 KB 1.03 KB -8 B -0.77%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1 1.04 KB 1.03 KB -8 B -0.77%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.02 KB 1.01 KB -8 B -0.79%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.83μs 5.85ns 22.7ns 0 0 0 1.04 KB
master CallElasticsearch netcoreapp3.1 2.3μs 11.8ns 56.6ns 0 0 0 1.04 KB
master CallElasticsearch net472 3.55μs 3.05ns 11.8ns 0.159 0 0 1.05 KB
master CallElasticsearchAsync net6.0 1.81μs 3.89ns 14.5ns 0 0 0 1.02 KB
master CallElasticsearchAsync netcoreapp3.1 2.35μs 7.26ns 28.1ns 0 0 0 1.09 KB
master CallElasticsearchAsync net472 3.84μs 3.19ns 12.4ns 0.169 0 0 1.11 KB
#6882 CallElasticsearch net6.0 1.8μs 7.6ns 29.4ns 0 0 0 1.03 KB
#6882 CallElasticsearch netcoreapp3.1 2.3μs 8.01ns 31ns 0 0 0 1.03 KB
#6882 CallElasticsearch net472 3.59μs 4.44ns 17.2ns 0.161 0 0 1.04 KB
#6882 CallElasticsearchAsync net6.0 1.8μs 9.17ns 44ns 0 0 0 1.01 KB
#6882 CallElasticsearchAsync netcoreapp3.1 2.52μs 4.17ns 16.1ns 0 0 0 1.08 KB
#6882 CallElasticsearchAsync net472 3.68μs 2.68ns 10ns 0.166 0 0 1.1 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 960 B 952 B -8 B -0.83%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 960 B 952 B -8 B -0.83%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 923 B 915 B -8 B -0.87%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.78μs 9.27ns 43.5ns 0 0 0 960 B
master ExecuteAsync netcoreapp3.1 2.29μs 7.45ns 25.8ns 0 0 0 960 B
master ExecuteAsync net472 2.58μs 1.78ns 6.88ns 0.143 0 0 923 B
#6882 ExecuteAsync net6.0 1.8μs 6.92ns 26.8ns 0 0 0 952 B
#6882 ExecuteAsync netcoreapp3.1 2.25μs 2.75ns 10.6ns 0 0 0 952 B
#6882 ExecuteAsync net472 2.54μs 1.61ns 6.04ns 0.141 0 0 915 B
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 net6.0 7.1μs 10.4ns 39ns 0 0 0 2.37 KB
master SendAsync netcoreapp3.1 8.69μs 14.1ns 54.6ns 0 0 0 2.9 KB
master SendAsync net472 12.5μs 10.3ns 38.5ns 0.498 0 0 3.19 KB
#6882 SendAsync net6.0 6.99μs 4.92ns 19ns 0 0 0 2.36 KB
#6882 SendAsync netcoreapp3.1 8.24μs 30ns 112ns 0 0 0 2.9 KB
#6882 SendAsync net472 12.6μs 11.8ns 45.5ns 0.504 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower :warning: More allocations :warning:

Slower :warning: in #6882

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.327 413,700.00 548,850.00

More allocations :warning: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 259.96 KB 275.89 KB 15.93 KB 6.13%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.83 KB 44.72 KB 888 B 2.03%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 274.93 KB 276.42 KB 1.49 KB 0.54%

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 286.72 KB 276.6 KB -10.12 KB -3.53%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.6μs 212ns 1.6μs 0 0 0 43.83 KB
master StringConcatBenchmark netcoreapp3.1 47.2μs 224ns 838ns 0 0 0 42.64 KB
master StringConcatBenchmark net472 56.8μs 259ns 968ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 458μs 1.08μs 3.89μs 0 0 0 259.96 KB
master StringConcatAspectBenchmark netcoreapp3.1 447μs 6.44μs 63.7μs 0 0 0 274.93 KB
master StringConcatAspectBenchmark net472 410μs 2.07μs 9.27μs 0 0 0 286.72 KB
#6882 StringConcatBenchmark net6.0 46.7μs 250ns 1.3μs 0 0 0 44.72 KB
#6882 StringConcatBenchmark netcoreapp3.1 47.5μs 259ns 1.59μs 0 0 0 42.68 KB
#6882 StringConcatBenchmark net472 57.2μs 154ns 556ns 0 0 0 57.34 KB
#6882 StringConcatAspectBenchmark net6.0 473μs 2.17μs 8.69μs 0 0 0 275.89 KB
#6882 StringConcatAspectBenchmark netcoreapp3.1 549μs 1.54μs 5.56μs 0 0 0 276.42 KB
#6882 StringConcatAspectBenchmark net472 400μs 2.22μs 18.6μs 0 0 0 276.6 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.76 KB 1.7 KB -56 B -3.18%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1 1.76 KB 1.7 KB -56 B -3.18%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 1.69 KB 1.64 KB -56 B -3.31%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.63μs 2.6ns 10.1ns 0 0 0 1.76 KB
master EnrichedLog netcoreapp3.1 3.44μs 4.38ns 17ns 0 0 0 1.76 KB
master EnrichedLog net472 4.05μs 4.83ns 18.7ns 0.265 0 0 1.69 KB
#6882 EnrichedLog net6.0 2.58μs 12ns 49.6ns 0 0 0 1.7 KB
#6882 EnrichedLog netcoreapp3.1 3.5μs 17.1ns 68.3ns 0 0 0 1.7 KB
#6882 EnrichedLog net472 3.96μs 4.36ns 16.9ns 0.259 0 0 1.64 KB
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net472 4.57 KB 4.52 KB -55 B -1.20%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net6.0 4.37 KB 4.31 KB -56 B -1.28%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1 4.37 KB 4.31 KB -58 B -1.33%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 123μs 145ns 563ns 0 0 0 4.37 KB
master EnrichedLog netcoreapp3.1 126μs 330ns 1.24μs 0 0 0 4.37 KB
master EnrichedLog net472 167μs 161ns 603ns 0 0 0 4.57 KB
#6882 EnrichedLog net6.0 124μs 49.4ns 185ns 0 0 0 4.31 KB
#6882 EnrichedLog netcoreapp3.1 127μs 97ns 336ns 0 0 0 4.31 KB
#6882 EnrichedLog net472 167μs 63.4ns 237ns 0 0 0 4.52 KB
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 2.32 KB 2.26 KB -56 B -2.41%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑netcoreapp3.1 2.32 KB 2.26 KB -56 B -2.41%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 2.14 KB 2.08 KB -56 B -2.62%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.94μs 19.3ns 74.6ns 0 0 0 2.32 KB
master EnrichedLog netcoreapp3.1 6.77μs 22.2ns 79.9ns 0 0 0 2.32 KB
master EnrichedLog net472 7.45μs 8.04ns 31.1ns 0.335 0 0 2.14 KB
#6882 EnrichedLog net6.0 5.03μs 5.14ns 19.2ns 0 0 0 2.26 KB
#6882 EnrichedLog netcoreapp3.1 6.88μs 16.1ns 62.5ns 0 0 0 2.26 KB
#6882 EnrichedLog net472 7.58μs 4.99ns 19.3ns 0.302 0 0 2.08 KB
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 1.21 KB 1.2 KB -8 B -0.66%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 1.21 KB 1.2 KB -8 B -0.66%
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 1.21 KB 1.2 KB -8 B -0.66%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 2.04μs 10.5ns 49.4ns 0 0 0 1.21 KB
master SendReceive netcoreapp3.1 2.53μs 11.8ns 47.4ns 0 0 0 1.21 KB
master SendReceive net472 3.28μs 2.71ns 10.5ns 0.178 0 0 1.21 KB
#6882 SendReceive net6.0 2.04μs 10.5ns 50.3ns 0 0 0 1.2 KB
#6882 SendReceive netcoreapp3.1 2.7μs 10.6ns 41.1ns 0 0 0 1.2 KB
#6882 SendReceive net472 3.27μs 2.77ns 10.4ns 0.181 0 0 1.2 KB
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net472 2.08 KB 2.03 KB -56 B -2.69%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1 1.69 KB 1.63 KB -56 B -3.32%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 1.64 KB 1.58 KB -56 B -3.41%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.18μs 0.92ns 3.44ns 0 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 5.64μs 23ns 89.3ns 0 0 0 1.69 KB
master EnrichedLog net472 6.67μs 7.28ns 27.3ns 0.298 0 0 2.08 KB
#6882 EnrichedLog net6.0 4.18μs 4.97ns 19.2ns 0 0 0 1.58 KB
#6882 EnrichedLog netcoreapp3.1 5.64μs 13.2ns 51.1ns 0 0 0 1.63 KB
#6882 EnrichedLog net472 6.58μs 5.01ns 17.4ns 0.297 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 704 B 696 B -8 B -1.14%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 704 B 696 B -8 B -1.14%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 666 B 658 B -8 B -1.20%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 586 B 578 B -8 B -1.37%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 584 B 576 B -8 B -1.37%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 584 B 576 B -8 B -1.37%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 751ns 3.97ns 22.4ns 0 0 0 584 B
master StartFinishSpan netcoreapp3.1 953ns 4.42ns 17.7ns 0 0 0 584 B
master StartFinishSpan net472 914ns 0.809ns 3.13ns 0.0912 0 0 586 B
master StartFinishScope net6.0 918ns 0.479ns 1.73ns 0 0 0 704 B
master StartFinishScope netcoreapp3.1 1.15μs 6.24ns 34.2ns 0 0 0 704 B
master StartFinishScope net472 1.09μs 0.174ns 0.652ns 0.104 0 0 666 B
#6882 StartFinishSpan net6.0 757ns 3.17ns 12.3ns 0 0 0 576 B
#6882 StartFinishSpan netcoreapp3.1 956ns 1.03ns 3.99ns 0 0 0 576 B
#6882 StartFinishSpan net472 918ns 0.296ns 1.15ns 0.0916 0 0 578 B
#6882 StartFinishScope net6.0 923ns 4.71ns 22.1ns 0 0 0 696 B
#6882 StartFinishScope netcoreapp3.1 1.17μs 6.03ns 28.3ns 0 0 0 696 B
#6882 StartFinishScope net472 1.13μs 0.341ns 1.32ns 0.101 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Fewer allocations :tada:

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 704 B 696 B -8 B -1.14%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 704 B 696 B -8 B -1.14%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 666 B 658 B -8 B -1.20%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.02μs 5.36ns 26.8ns 0 0 0 704 B
master RunOnMethodBegin netcoreapp3.1 1.38μs 2.28ns 8.82ns 0 0 0 704 B
master RunOnMethodBegin net472 1.36μs 0.141ns 0.544ns 0.102 0 0 666 B
#6882 RunOnMethodBegin net6.0 1.03μs 5.32ns 24.4ns 0 0 0 696 B
#6882 RunOnMethodBegin netcoreapp3.1 1.38μs 7.15ns 35ns 0 0 0 696 B
#6882 RunOnMethodBegin net472 1.37μs 0.533ns 2ns 0.104 0 0 658 B

pr-commenter[bot] avatar Apr 23 '25 07:04 pr-commenter[bot]

Execution-Time Benchmarks Report :stopwatch:

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (68ms)  : 66, 70
     .   : milestone, 68,
    master - mean (69ms)  : 63, 74
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (1,020ms)  : 1007, 1033
     .   : milestone, 1020,
    master - mean (1,023ms)  : 1008, 1038
     .   : milestone, 1023,

gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (102ms)  : 100, 104
     .   : milestone, 102,
    master - mean (102ms)  : 100, 105
     .   : milestone, 102,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (696ms)  : 686, 706
     .   : milestone, 696,
    master - mean (697ms)  : 686, 709
     .   : milestone, 697,

gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (89ms)  : 87, 91
     .   : milestone, 89,
    master - mean (89ms)  : 87, 91
     .   : milestone, 89,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (667ms)  : 647, 687
     .   : milestone, 667,
    master - mean (669ms)  : 650, 689
     .   : milestone, 669,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (189ms)  : 186, 193
     .   : milestone, 189,
    master - mean (189ms)  : 185, 192
     .   : milestone, 189,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (1,162ms)  : 1146, 1179
     .   : milestone, 1162,
    master - mean (1,165ms)  : 1147, 1182
     .   : milestone, 1165,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (269ms)  : 266, 273
     .   : milestone, 269,
    master - mean (268ms)  : 263, 273
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (928ms)  : 915, 941
     .   : milestone, 928,
    master - mean (927ms)  : 911, 943
     .   : milestone, 927,

gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6882) - mean (262ms)  : 258, 265
     .   : milestone, 262,
    master - mean (261ms)  : 256, 266
     .   : milestone, 261,

    section CallTarget+Inlining+NGEN
    This PR (6882) - mean (922ms)  : 910, 935
     .   : milestone, 922,
    master - mean (925ms)  : 909, 942
     .   : milestone, 925,

andrewlock avatar Apr 23 '25 07:04 andrewlock

Benchmarks Report for tracer :snail:

Benchmarks for #6882 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.422
  • 1 benchmarks have fewer allocations
  • 2 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 #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.72 KB 5.8 KB 81 B 1.42%

Fewer allocations :tada: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.19 KB 6.1 KB -90 B -1.45%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.11μs 141ns 1.41μs 0 0 0 5.56 KB
master StartStopWithChild netcoreapp3.1 10.5μs 125ns 1.25μs 0 0 0 5.72 KB
master StartStopWithChild net472 15.3μs 87.5ns 649ns 0.929 0.214 0 6.19 KB
#6882 StartStopWithChild net6.0 7.94μs 134ns 1.34μs 0 0 0 5.56 KB
#6882 StartStopWithChild netcoreapp3.1 10.5μs 107ns 1.06μs 0 0 0 5.8 KB
#6882 StartStopWithChild net472 15.5μs 86.2ns 565ns 1 0.287 0.0718 6.1 KB
Benchmarks.Trace.AgentWriterBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #6882

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 2.167 1,046,306.25 482,914.84

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 1.04ms 5.39μs 25.8μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 638μs 605ns 2.18μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 847μs 500ns 1.8μs 0 0 0 3.31 KB
#6882 WriteAndFlushEnrichedTraces net6.0 486μs 1.63μs 6.11μs 0 0 0 2.7 KB
#6882 WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 2.62μs 10.5μs 0 0 0 2.7 KB
#6882 WriteAndFlushEnrichedTraces net472 875μs 562ns 2.18μs 0 0 0 3.31 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 net6.0 127μs 725ns 5.76μs 0 0 0 14.48 KB
master SendRequest netcoreapp3.1 148μs 508ns 1.97μs 0 0 0 17.28 KB
master SendRequest net472 0.00266ns 0.00105ns 0.00406ns 0 0 0 0 b
#6882 SendRequest net6.0 132μs 755ns 5.44μs 0 0 0 14.48 KB
#6882 SendRequest netcoreapp3.1 149μs 467ns 1.62μs 0 0 0 17.28 KB
#6882 SendRequest net472 0.000241ns 0.000164ns 0.000635ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #6882

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.56 KB 41.82 KB 259 B 0.62%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 549μs 2.81μs 19.6μs 0 0 0 41.58 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 764μs 7.52μs 74.1μs 0 0 0 41.56 KB
master WriteAndFlushEnrichedTraces net472 932μs 6.09μs 60.6μs 8.33 0 0 53.42 KB
#6882 WriteAndFlushEnrichedTraces net6.0 566μs 3.29μs 27.9μs 0 0 0 41.63 KB
#6882 WriteAndFlushEnrichedTraces netcoreapp3.1 671μs 3.82μs 26.2μs 0 0 0 41.82 KB
#6882 WriteAndFlushEnrichedTraces net472 871μs 5.16μs 51.6μs 7.81 3.91 0 53.28 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 net6.0 1.25μs 1.11ns 4.01ns 0.0126 0 0 1.03 KB
master ExecuteNonQuery netcoreapp3.1 1.89μs 3.45ns 12.9ns 0.00929 0 0 1.02 KB
master ExecuteNonQuery net472 2.08μs 4.88ns 18.9ns 0.155 0.0103 0 995 B
#6882 ExecuteNonQuery net6.0 1.26μs 3.38ns 13.1ns 0.0123 0 0 1.03 KB
#6882 ExecuteNonQuery netcoreapp3.1 1.79μs 4.86ns 18.2ns 0.00881 0 0 1.02 KB
#6882 ExecuteNonQuery net472 2.15μs 3.98ns 15.4ns 0.149 0.0107 0 995 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 net6.0 1.33μs 1.52ns 5.88ns 0.0129 0 0 984 B
master CallElasticsearch netcoreapp3.1 1.54μs 1.63ns 5.86ns 0.00773 0 0 984 B
master CallElasticsearch net472 2.48μs 1.68ns 6.52ns 0.149 0 0 1 KB
master CallElasticsearchAsync net6.0 1.25μs 1.15ns 4.32ns 0.0125 0 0 960 B
master CallElasticsearchAsync netcoreapp3.1 1.65μs 2.22ns 8.31ns 0.00818 0 0 1.03 KB
master CallElasticsearchAsync net472 2.75μs 1.43ns 5.53ns 0.165 0 0 1.06 KB
#6882 CallElasticsearch net6.0 1.23μs 1.67ns 6.48ns 0.0124 0 0 984 B
#6882 CallElasticsearch netcoreapp3.1 1.54μs 1.24ns 4.63ns 0.00774 0 0 984 B
#6882 CallElasticsearch net472 2.52μs 1.54ns 5.75ns 0.152 0 0 1 KB
#6882 CallElasticsearchAsync net6.0 1.27μs 1.14ns 4.43ns 0.0127 0 0 960 B
#6882 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.848ns 3.28ns 0.00821 0 0 1.03 KB
#6882 CallElasticsearchAsync net472 2.64μs 0.858ns 3.09ns 0.158 0 0 1.06 KB
Benchmarks.Trace.GraphQLBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #6882

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.133 1,462.93 1,291.49

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.46μs 0.885ns 3.43ns 0.00712 0 0 960 B
master ExecuteAsync netcoreapp3.1 1.67μs 1.22ns 4.39ns 0.00833 0 0 960 B
master ExecuteAsync net472 1.79μs 0.767ns 2.87ns 0.143 0 0 923 B
#6882 ExecuteAsync net6.0 1.29μs 1.03ns 4ns 0.0131 0 0 960 B
#6882 ExecuteAsync netcoreapp3.1 1.68μs 1.12ns 4.03ns 0.00834 0 0 960 B
#6882 ExecuteAsync net472 1.82μs 0.769ns 2.88ns 0.145 0 0 923 B
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 net6.0 4.34μs 3.42ns 12.8ns 0.0221 0 0 2.32 KB
master SendAsync netcoreapp3.1 5.29μs 3.48ns 13.5ns 0.0263 0 0 2.86 KB
master SendAsync net472 7.51μs 6.94ns 26.9ns 0.487 0 0 3.13 KB
#6882 SendAsync net6.0 4.33μs 2.16ns 8.37ns 0.0216 0 0 2.32 KB
#6882 SendAsync netcoreapp3.1 5.25μs 4.34ns 16.2ns 0.0262 0 0 2.86 KB
#6882 SendAsync net472 7.47μs 4.27ns 16ns 0.485 0 0 3.13 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 1.54μs 7.35ns 31.2ns 0.0231 0 0 1.71 KB
master EnrichedLog netcoreapp3.1 2.28μs 3.53ns 12.7ns 0.0114 0 0 1.71 KB
master EnrichedLog net472 2.56μs 4.45ns 16.7ns 0.253 0 0 1.64 KB
#6882 EnrichedLog net6.0 1.49μs 2.54ns 9.85ns 0.0227 0 0 1.71 KB
#6882 EnrichedLog netcoreapp3.1 2.19μs 1.83ns 6.86ns 0.0218 0 0 1.71 KB
#6882 EnrichedLog net472 2.69μs 1.67ns 6.23ns 0.257 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 112μs 165ns 639ns 0 0 0 4.32 KB
master EnrichedLog netcoreapp3.1 115μs 185ns 717ns 0 0 0 4.32 KB
master EnrichedLog net472 149μs 266ns 1.03μs 0 0 0 4.51 KB
#6882 EnrichedLog net6.0 111μs 75.5ns 262ns 0 0 0 4.32 KB
#6882 EnrichedLog netcoreapp3.1 117μs 409ns 1.53μs 0 0 0 4.32 KB
#6882 EnrichedLog net472 149μs 180ns 698ns 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 3.17μs 2.22ns 8.32ns 0.0315 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 4.16μs 1.93ns 7.21ns 0.0209 0 0 2.26 KB
master EnrichedLog net472 4.98μs 4.07ns 15.7ns 0.322 0 0 2.09 KB
#6882 EnrichedLog net6.0 3.13μs 2.25ns 8.7ns 0.0315 0 0 2.26 KB
#6882 EnrichedLog netcoreapp3.1 4.37μs 3.93ns 15.2ns 0.022 0 0 2.26 KB
#6882 EnrichedLog net472 4.84μs 2.71ns 10.5ns 0.316 0 0 2.09 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 net6.0 1.33μs 0.838ns 3.14ns 0.0133 0 0 1.15 KB
master SendReceive netcoreapp3.1 1.8μs 1.61ns 6.03ns 0.00901 0 0 1.15 KB
master SendReceive net472 2.01μs 2.61ns 10.1ns 0.18 0 0 1.16 KB
#6882 SendReceive net6.0 1.31μs 0.692ns 2.5ns 0.013 0 0 1.15 KB
#6882 SendReceive netcoreapp3.1 1.67μs 2.25ns 8.1ns 0.00831 0 0 1.15 KB
#6882 SendReceive net472 2.1μs 2.02ns 7.81ns 0.178 0 0 1.16 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 2.75μs 1.72ns 6.68ns 0.0137 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 4.03μs 4.29ns 16ns 0.0201 0 0 1.69 KB
master EnrichedLog net472 4.46μs 3.37ns 13ns 0.313 0 0 2.08 KB
#6882 EnrichedLog net6.0 2.81μs 2.37ns 8.86ns 0.014 0 0 1.64 KB
#6882 EnrichedLog netcoreapp3.1 4.03μs 6.63ns 23.9ns 0.0201 0 0 1.69 KB
#6882 EnrichedLog net472 4.52μs 3.6ns 13.9ns 0.315 0 0 2.08 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 net6.0 415ns 0.358ns 1.34ns 0.00832 0 0 584 B
master StartFinishSpan netcoreapp3.1 555ns 0.665ns 2.49ns 0.00555 0 0 584 B
master StartFinishSpan net472 654ns 0.393ns 1.42ns 0.0927 0 0 586 B
master StartFinishScope net6.0 503ns 0.393ns 1.42ns 0.0101 0 0 704 B
master StartFinishScope netcoreapp3.1 731ns 2.1ns 7.26ns 0.00733 0 0 704 B
master StartFinishScope net472 835ns 0.54ns 2.02ns 0.104 0 0 666 B
#6882 StartFinishSpan net6.0 414ns 0.87ns 3.26ns 0.00827 0 0 584 B
#6882 StartFinishSpan netcoreapp3.1 568ns 0.615ns 2.3ns 0.00568 0 0 584 B
#6882 StartFinishSpan net472 613ns 0.216ns 0.808ns 0.0919 0 0 586 B
#6882 StartFinishScope net6.0 522ns 0.246ns 0.952ns 0.00801 0 0 704 B
#6882 StartFinishScope netcoreapp3.1 681ns 0.419ns 1.57ns 0.00729 0 0 704 B
#6882 StartFinishScope net472 865ns 0.295ns 1.14ns 0.106 0 0 666 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #6882

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.172 697.79 595.36

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 699ns 0.968ns 3.49ns 0.00702 0 0 704 B
master RunOnMethodBegin netcoreapp3.1 895ns 1.12ns 4.2ns 0.00897 0 0 704 B
master RunOnMethodBegin net472 1.04μs 0.328ns 1.23ns 0.104 0 0 666 B
#6882 RunOnMethodBegin net6.0 596ns 0.532ns 2.06ns 0.00901 0 0 704 B
#6882 RunOnMethodBegin netcoreapp3.1 966ns 1.42ns 5.52ns 0.00963 0 0 704 B
#6882 RunOnMethodBegin net472 1.09μs 0.553ns 2.07ns 0.104 0 0 666 B

andrewlock avatar Apr 23 '25 07:04 andrewlock

⚠️ Tests

⚠️ Warnings

🧪 5 Tests failed

TagTraces from Datadog.Trace.ClrProfiler.IntegrationTests.AvroTests (Datadog)
The test method expected 3 parameter values, but 0 parameter values were provided.
TagTraces from Datadog.Trace.ClrProfiler.IntegrationTests.AvroTests (Datadog) (✨ Fix with BitsAI)
The test method expected 3 parameter values, but 0 parameter values were provided.
TagTraces from Datadog.Trace.ClrProfiler.IntegrationTests.AvroTests (Datadog) (✨ Fix with BitsAI)
The test method expected 3 parameter values, but 0 parameter values were provided.
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: cc740a2 | Docs | Was this helpful? Give us feedback!