Skip to content

Update Datadog.Sketches vendored code #7299

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bouwkast
Copy link
Collaborator

@bouwkast bouwkast commented Jul 29, 2025

Summary of changes

Re-vendor the Datadog.Sketches code.

Reason for change

We'd like the changes from @brontosaurusgym in DataDog/sketches-dotnet#18 which fixed a bug with MergeWith() calls.

Implementation details

I opted to not cut a new release for Datadog.Sketches and just pointed it to grab from main instead to update the code.

I then undid the UpdateVendoredCode changes and re-ran to just get the correct URL back which means that if we do cut a new release it will work normally, but if we don't cut a release it won't make changes.

Main changes are the store. additions, it appears the other files haven't been run since UpdateVendoredCode has been changed.

Test coverage

Other details

Thanks @brontosaurusgym

@bouwkast bouwkast requested a review from a team as a code owner July 29, 2025 19:34
@github-actions github-actions bot added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Jul 29, 2025
@bouwkast bouwkast changed the title Force run UpdateVendoredCode on Datadog.Sketches Update Datadog.Sketches vendored code Jul 29, 2025
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

The only thing is - should we change this to permanently grab from the current main sha? I don't think we necessarily need to cut a release of the sketches repository, my only concern is if we have to re-run the vendoring for some reason, we will lose the bug fix? 🤔

@bouwkast
Copy link
Collaborator Author

So if you rerun the vendoring tool it won't change it because it still points to the 1.0.0 in the last downloaded URL (even though it isn't the latest)
But I can just have it point to main as well in the tool - seems reasonable

@bouwkast bouwkast requested a review from a team as a code owner July 30, 2025 11:38
@pr-commenter
Copy link

pr-commenter bot commented Jul 30, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7299 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.719
  • 5 benchmarks have fewer allocations
  • 7 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 ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.05 KB 6.01 KB -39 B -0.65%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 11.2μs 58.4ns 303ns 0 0 0 5.5 KB
master StartStopWithChild netcoreapp3.1 13.3μs 52.8ns 204ns 0 0 0 5.72 KB
master StartStopWithChild net472 21.4μs 114ns 601ns 0.977 0.326 0.109 6.05 KB
#7299 StartStopWithChild net6.0 10.7μs 59ns 354ns 0 0 0 5.5 KB
#7299 StartStopWithChild netcoreapp3.1 13.6μs 69.8ns 320ns 0 0 0 5.71 KB
#7299 StartStopWithChild net472 22.5μs 122ns 658ns 0.879 0.11 0 6.01 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 938μs 164ns 635ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 478ns 1.85μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.2ms 87.4ns 315ns 0 0 0 3.31 KB
#7299 WriteAndFlushEnrichedTraces net6.0 980μs 217ns 839ns 0 0 0 2.71 KB
#7299 WriteAndFlushEnrichedTraces netcoreapp3.1 1.01ms 1.34μs 5.2μs 0 0 0 2.7 KB
#7299 WriteAndFlushEnrichedTraces net472 1.21ms 230ns 892ns 0 0 0 3.31 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 334μs 273ns 1.06μs 0 0 0 197.24 KB
master AllCycleSimpleBody netcoreapp3.1 501μs 1.79μs 6.47μs 0 0 0 204.95 KB
master AllCycleSimpleBody net472 447μs 94.7ns 354ns 37.9 2.23 0 244.94 KB
master AllCycleMoreComplexBody net6.0 336μs 1.78μs 8.15μs 0 0 0 200.75 KB
master AllCycleMoreComplexBody netcoreapp3.1 497μs 2μs 7.73μs 0 0 0 208.37 KB
master AllCycleMoreComplexBody net472 456μs 73.3ns 284ns 37.9 2.23 0 248.45 KB
master ObjectExtractorSimpleBody net6.0 312ns 1.56ns 6.79ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 416ns 2.17ns 10.4ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 302ns 0.0569ns 0.213ns 0.044 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.38μs 28.3ns 110ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.81μs 34.3ns 133ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.8μs 2.73ns 10.6ns 0.578 0 0 3.8 KB
#7299 AllCycleSimpleBody net6.0 337μs 1.24μs 4.65μs 0 0 0 197.24 KB
#7299 AllCycleSimpleBody netcoreapp3.1 492μs 823ns 3.19μs 0 0 0 204.95 KB
#7299 AllCycleSimpleBody net472 447μs 127ns 474ns 37.9 2.23 0 244.94 KB
#7299 AllCycleMoreComplexBody net6.0 347μs 1.5μs 5.79μs 0 0 0 200.75 KB
#7299 AllCycleMoreComplexBody netcoreapp3.1 487μs 172ns 622ns 0 0 0 208.37 KB
#7299 AllCycleMoreComplexBody net472 458μs 107ns 399ns 37.9 2.23 0 248.45 KB
#7299 ObjectExtractorSimpleBody net6.0 313ns 1.69ns 9.09ns 0 0 0 280 B
#7299 ObjectExtractorSimpleBody netcoreapp3.1 412ns 0.202ns 0.783ns 0 0 0 272 B
#7299 ObjectExtractorSimpleBody net472 300ns 0.0621ns 0.241ns 0.0438 0 0 281 B
#7299 ObjectExtractorMoreComplexBody net6.0 6.34μs 29.1ns 113ns 0 0 0 3.78 KB
#7299 ObjectExtractorMoreComplexBody netcoreapp3.1 7.88μs 35.8ns 139ns 0 0 0 3.69 KB
#7299 ObjectExtractorMoreComplexBody net472 6.82μs 2.47ns 9.56ns 0.581 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 77.5μs 286ns 1.11μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.4μs 158ns 592ns 0 0 0 32.4 KB
master EncodeArgs net472 111μs 7.59ns 29.4ns 4.96 0 0 32.51 KB
master EncodeLegacyArgs net6.0 147μs 269ns 1.04μs 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 568ns 2.2μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 261μs 16.8ns 58.3ns 0 0 0 2.16 KB
#7299 EncodeArgs net6.0 78.1μs 72.7ns 272ns 0 0 0 32.4 KB
#7299 EncodeArgs netcoreapp3.1 97.5μs 192ns 742ns 0 0 0 32.4 KB
#7299 EncodeArgs net472 110μs 11.1ns 43.1ns 4.94 0 0 32.51 KB
#7299 EncodeLegacyArgs net6.0 145μs 13.4ns 48.4ns 0 0 0 2.15 KB
#7299 EncodeLegacyArgs netcoreapp3.1 202μs 254ns 986ns 0 0 0 2.14 KB
#7299 EncodeLegacyArgs net472 262μs 77.4ns 300ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #7299

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.433 723,220.68 297,278.51

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 392μs 83.1ns 322ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 413μs 78ns 281ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 430μs 40.3ns 156ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 287μs 55.3ns 214ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 719μs 2.91μs 11.3μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 309μs 28.7ns 111ns 0 0 0 2.29 KB
#7299 RunWafRealisticBenchmark net6.0 390μs 32.1ns 124ns 0 0 0 4.56 KB
#7299 RunWafRealisticBenchmark netcoreapp3.1 412μs 114ns 427ns 0 0 0 4.48 KB
#7299 RunWafRealisticBenchmark net472 430μs 51.6ns 200ns 0 0 0 4.66 KB
#7299 RunWafRealisticBenchmarkWithAttack net6.0 286μs 34.1ns 118ns 0 0 0 2.24 KB
#7299 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 297μs 134ns 519ns 0 0 0 2.22 KB
#7299 RunWafRealisticBenchmarkWithAttack net472 310μs 28.3ns 110ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 61.5μs 46.9ns 182ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 70.7μs 364ns 1.92μs 0 0 0 17.42 KB
master SendRequest net472 0.0127ns 0.00323ns 0.0125ns 0 0 0 0 b
#7299 SendRequest net6.0 61.3μs 107ns 415ns 0 0 0 14.52 KB
#7299 SendRequest netcoreapp3.1 72μs 181ns 702ns 0 0 0 17.42 KB
#7299 SendRequest net472 0.0123ns 0.00174ns 0.00673ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7299

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1.214 1,004,504.37 827,313.75

More allocations ⚠️ in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 0 b 73 B 73 B
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 0 b 46 B 46 B

Fewer allocations 🎉 in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 5 B 3 B -2 B -40.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 4 B 2 B -2 B -50.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1 B 0 b -1 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.9ms 792ns 2.96μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.08ms 5.17μs 19.3μs 0 0 0 640 KB
master OriginalCharSlice net472 2.71ms 154ns 577ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.36ms 442ns 1.71μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.68ms 703ns 2.72μs 0 0 0 1 B
master OptimizedCharSlice net472 1.96ms 561ns 2.17μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 802μs 43.7ns 169ns 0 0 0 5 B
master OptimizedCharSliceWithPool netcoreapp3.1 1ms 1.8μs 6.95μs 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.17ms 78.8ns 305ns 0 0 0 0 b
#7299 OriginalCharSlice net6.0 1.94ms 2.82μs 10.9μs 0 0 0 640.01 KB
#7299 OriginalCharSlice netcoreapp3.1 2.11ms 7.12μs 27.6μs 0 0 0 640 KB
#7299 OriginalCharSlice net472 2.6ms 285ns 1.1μs 100 0 0 641.95 KB
#7299 OptimizedCharSlice net6.0 1.47ms 3.16μs 12.2μs 0 0 0 2 B
#7299 OptimizedCharSlice netcoreapp3.1 1.77ms 762ns 2.95μs 0 0 0 1 B
#7299 OptimizedCharSlice net472 2.03ms 438ns 1.64μs 0 0 0 73 B
#7299 OptimizedCharSliceWithPool net6.0 820μs 215ns 834ns 0 0 0 3 B
#7299 OptimizedCharSliceWithPool netcoreapp3.1 827μs 63.3ns 245ns 0 0 0 0 b
#7299 OptimizedCharSliceWithPool net472 1.13ms 54.8ns 205ns 0 0 0 46 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.93 KB 42.26 KB 334 B 0.80%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 723μs 4.41μs 43.6μs 0 0 0 41.83 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 748μs 3.71μs 17μs 0 0 0 41.93 KB
master WriteAndFlushEnrichedTraces net472 915μs 1.93μs 7.46μs 4.46 0 0 56.1 KB
#7299 WriteAndFlushEnrichedTraces net6.0 674μs 3.9μs 30.9μs 0 0 0 41.8 KB
#7299 WriteAndFlushEnrichedTraces netcoreapp3.1 692μs 2.43μs 9.42μs 0 0 0 42.26 KB
#7299 WriteAndFlushEnrichedTraces net472 860μs 2.16μs 8.37μs 8.33 0 0 55.91 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 0.82ns 3.07ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.48μs 12.1ns 52.6ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.76μs 4.35ns 16.9ns 0.151 0.0137 0 987 B
#7299 ExecuteNonQuery net6.0 2.03μs 7.4ns 28.7ns 0 0 0 1.02 KB
#7299 ExecuteNonQuery netcoreapp3.1 2.52μs 4.87ns 18.8ns 0 0 0 1.02 KB
#7299 ExecuteNonQuery net472 2.74μs 3.57ns 13.8ns 0.15 0.0136 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.75μs 4.71ns 17ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.39μs 7.69ns 29.8ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.34μs 1.25ns 4.69ns 0.151 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.81μs 4.35ns 16.8ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.53μs 2.47ns 9.25ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.72μs 3.05ns 11.8ns 0.166 0 0 1.1 KB
#7299 CallElasticsearch net6.0 1.73μs 7.84ns 30.3ns 0 0 0 1.03 KB
#7299 CallElasticsearch netcoreapp3.1 2.37μs 6.72ns 24.2ns 0 0 0 1.03 KB
#7299 CallElasticsearch net472 3.55μs 6.19ns 24ns 0.159 0 0 1.04 KB
#7299 CallElasticsearchAsync net6.0 1.84μs 2.6ns 10.1ns 0 0 0 1.01 KB
#7299 CallElasticsearchAsync netcoreapp3.1 2.5μs 9.54ns 35.7ns 0 0 0 1.08 KB
#7299 CallElasticsearchAsync net472 3.7μs 6.49ns 25.1ns 0.164 0 0 1.1 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.8μs 2.45ns 9.48ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.38μs 7.41ns 28.7ns 0 0 0 952 B
master ExecuteAsync net472 2.68μs 3.99ns 15.5ns 0.134 0 0 915 B
#7299 ExecuteAsync net6.0 1.91μs 7.24ns 28.1ns 0 0 0 952 B
#7299 ExecuteAsync netcoreapp3.1 2.28μs 1.56ns 6.02ns 0 0 0 952 B
#7299 ExecuteAsync net472 2.68μs 2.05ns 7.93ns 0.134 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.78μs 5.6ns 20.9ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.61μs 22.8ns 85.2ns 0 0 0 2.9 KB
master SendAsync net472 12.7μs 9.73ns 37.7ns 0.504 0 0 3.18 KB
#7299 SendAsync net6.0 6.59μs 14ns 52.4ns 0 0 0 2.36 KB
#7299 SendAsync netcoreapp3.1 8.64μs 8.65ns 33.5ns 0 0 0 2.9 KB
#7299 SendAsync net472 12.3μs 10.8ns 41.8ns 0.49 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 57.34 KB 65.54 KB 8.19 KB 14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 257.1 KB 278.34 KB 21.23 KB 8.26%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 294.91 KB 16.38 KB 5.88%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.1 KB 43.77 KB 664 B 1.54%

Fewer allocations 🎉 in #7299

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 276.44 KB 258.72 KB -17.72 KB -6.41%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.9μs 250ns 1.48μs 0 0 0 43.1 KB
master StringConcatBenchmark netcoreapp3.1 49.5μs 275ns 1.72μs 0 0 0 44.13 KB
master StringConcatBenchmark net472 57.6μs 279ns 1.08μs 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 445μs 2.02μs 7.28μs 0 0 0 257.1 KB
master StringConcatAspectBenchmark netcoreapp3.1 531μs 1.95μs 7.31μs 0 0 0 276.44 KB
master StringConcatAspectBenchmark net472 413μs 2.23μs 11.8μs 0 0 0 278.53 KB
#7299 StringConcatBenchmark net6.0 41.4μs 180ns 673ns 0 0 0 43.77 KB
#7299 StringConcatBenchmark netcoreapp3.1 44.9μs 204ns 735ns 0 0 0 44.02 KB
#7299 StringConcatBenchmark net472 56.8μs 108ns 373ns 0 0 0 65.54 KB
#7299 StringConcatAspectBenchmark net6.0 493μs 2.1μs 7.56μs 0 0 0 278.34 KB
#7299 StringConcatAspectBenchmark netcoreapp3.1 509μs 1.5μs 5.8μs 0 0 0 258.72 KB
#7299 StringConcatAspectBenchmark net472 400μs 2.01μs 9.01μs 0 0 0 294.91 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.57μs 14.2ns 81.5ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.44μs 15.1ns 58.6ns 0 0 0 1.7 KB
master EnrichedLog net472 3.85μs 2.84ns 11ns 0.25 0 0 1.64 KB
#7299 EnrichedLog net6.0 2.66μs 3.23ns 12.5ns 0 0 0 1.7 KB
#7299 EnrichedLog netcoreapp3.1 3.48μs 17ns 70.1ns 0 0 0 1.7 KB
#7299 EnrichedLog net472 3.96μs 3.57ns 13.8ns 0.258 0 0 1.64 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 122μs 52.1ns 202ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 128μs 294ns 1.02μs 0 0 0 4.31 KB
master EnrichedLog net472 167μs 67.6ns 253ns 0 0 0 4.52 KB
#7299 EnrichedLog net6.0 124μs 75.4ns 282ns 0 0 0 4.31 KB
#7299 EnrichedLog netcoreapp3.1 129μs 387ns 1.45μs 0 0 0 4.31 KB
#7299 EnrichedLog net472 167μs 60ns 233ns 0 0 0 4.52 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.93μs 4.13ns 16ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.7μs 17ns 65.9ns 0 0 0 2.26 KB
master EnrichedLog net472 7.55μs 6.77ns 26.2ns 0.302 0 0 2.08 KB
#7299 EnrichedLog net6.0 4.87μs 23.9ns 95.5ns 0 0 0 2.26 KB
#7299 EnrichedLog netcoreapp3.1 6.76μs 23.1ns 89.3ns 0 0 0 2.26 KB
#7299 EnrichedLog net472 7.53μs 6.78ns 26.2ns 0.299 0 0 2.08 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 2μs 8.96ns 34.7ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.62μs 8.68ns 31.3ns 0 0 0 1.2 KB
master SendReceive net472 3.27μs 5.96ns 23.1ns 0.18 0 0 1.2 KB
#7299 SendReceive net6.0 2.08μs 1.15ns 4.43ns 0 0 0 1.2 KB
#7299 SendReceive netcoreapp3.1 2.63μs 12.9ns 51.8ns 0 0 0 1.2 KB
#7299 SendReceive net472 3.22μs 1.75ns 6.77ns 0.177 0 0 1.2 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.32μs 9.06ns 35.1ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.76μs 7.09ns 27.5ns 0 0 0 1.63 KB
master EnrichedLog net472 6.51μs 6.33ns 24.5ns 0.293 0 0 2.03 KB
#7299 EnrichedLog net6.0 4.26μs 3.3ns 12.3ns 0 0 0 1.58 KB
#7299 EnrichedLog netcoreapp3.1 5.66μs 8.57ns 32.1ns 0 0 0 1.63 KB
#7299 EnrichedLog net472 6.35μs 8.3ns 32.2ns 0.318 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 757ns 4.11ns 23.3ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 951ns 5.07ns 28.2ns 0 0 0 576 B
master StartFinishSpan net472 965ns 0.298ns 1.15ns 0.0873 0 0 578 B
master StartFinishScope net6.0 916ns 4.49ns 19.6ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.15μs 5.67ns 21.2ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.651ns 2.52ns 0.103 0 0 658 B
#7299 StartFinishSpan net6.0 763ns 0.244ns 0.945ns 0 0 0 576 B
#7299 StartFinishSpan netcoreapp3.1 965ns 4.96ns 24.3ns 0 0 0 576 B
#7299 StartFinishSpan net472 1.04μs 0.882ns 3.3ns 0.0871 0 0 578 B
#7299 StartFinishScope net6.0 948ns 0.315ns 1.22ns 0 0 0 696 B
#7299 StartFinishScope netcoreapp3.1 1.14μs 6.11ns 34.5ns 0 0 0 696 B
#7299 StartFinishScope net472 1.11μs 0.125ns 0.482ns 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.05μs 4.87ns 20.1ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.4μs 7.05ns 29.9ns 0 0 0 696 B
master RunOnMethodBegin net472 1.43μs 2.47ns 9.56ns 0.102 0 0 658 B
#7299 RunOnMethodBegin net6.0 1.06μs 0.265ns 0.993ns 0 0 0 696 B
#7299 RunOnMethodBegin netcoreapp3.1 1.37μs 7.04ns 33.7ns 0 0 0 696 B
#7299 RunOnMethodBegin net472 1.37μs 0.684ns 2.65ns 0.102 0 0 658 B

@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

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

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

  • 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 Bailout
    This PR (7299) - mean (73ms)  : 71, 74
     .   : milestone, 73,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7299) - mean (69ms)  : 66, 72
     .   : milestone, 69,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (1,062ms)  : 1034, 1090
     .   : milestone, 1062,
    master - mean (1,056ms)  : 1027, 1085
     .   : milestone, 1056,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (108ms)  : 107, 110
     .   : milestone, 108,
    master - mean (108ms)  : 106, 109
     .   : milestone, 108,

    section Baseline
    This PR (7299) - mean (108ms)  : 105, 111
     .   : milestone, 108,
    master - mean (107ms)  : 104, 110
     .   : milestone, 107,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (731ms)  : 716, 747
     .   : milestone, 731,
    master - mean (732ms)  : 717, 748
     .   : milestone, 732,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (96ms)  : 95, 97
     .   : milestone, 96,
    master - mean (95ms)  : 94, 97
     .   : milestone, 95,

    section Baseline
    This PR (7299) - mean (95ms)  : 93, 97
     .   : milestone, 95,
    master - mean (95ms)  : 93, 97
     .   : milestone, 95,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (691ms)  : 674, 707
     .   : milestone, 691,
    master - mean (698ms)  : 682, 714
     .   : milestone, 698,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (95ms)  : 93, 96
     .   : milestone, 95,
    master - mean (95ms)  : 94, 96
     .   : milestone, 95,

    section Baseline
    This PR (7299) - mean (94ms)  : 91, 96
     .   : milestone, 94,
    master - mean (94ms)  : 92, 96
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (627ms)  : 619, 635
     .   : milestone, 627,
    master - mean (634ms)  : 621, 647
     .   : milestone, 634,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (194ms)  : 187, 201
     .   : milestone, 194,
    master - mean (193ms)  : 186, 200
     .   : milestone, 193,

    section Baseline
    This PR (7299) - mean (190ms)  : 179, 201
     .   : milestone, 190,
    master - mean (189ms)  : 181, 197
     .   : milestone, 189,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (1,150ms)  : 1112, 1188
     .   : milestone, 1150,
    master - mean (1,146ms)  : 1114, 1179
     .   : milestone, 1146,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (273ms)  : 266, 281
     .   : milestone, 273,
    master - mean (275ms)  : 267, 284
     .   : milestone, 275,

    section Baseline
    This PR (7299) - mean (274ms)  : 265, 283
     .   : milestone, 274,
    master - mean (273ms)  : 264, 282
     .   : milestone, 273,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (911ms)  : 878, 944
     .   : milestone, 911,
    master - mean (917ms)  : 891, 943
     .   : milestone, 917,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (269ms)  : 260, 278
     .   : milestone, 269,
    master - mean (270ms)  : 259, 281
     .   : milestone, 270,

    section Baseline
    This PR (7299) - mean (272ms)  : 261, 283
     .   : milestone, 272,
    master - mean (270ms)  : 259, 281
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (902ms)  : 874, 930
     .   : milestone, 902,
    master - mean (908ms)  : 876, 941
     .   : milestone, 908,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7299) - mean (267ms)  : 257, 277
     .   : milestone, 267,
    master - mean (274ms)  : 268, 279
     .   : milestone, 274,

    section Baseline
    This PR (7299) - mean (267ms)  : 257, 277
     .   : milestone, 267,
    master - mean (267ms)  : 258, 276
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (7299) - mean (819ms)  : 795, 842
     .   : milestone, 819,
    master - mean (824ms)  : 804, 843
     .   : milestone, 824,

Loading

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jul 30, 2025

⚠️ Tests

⚠️ Warnings

🧪 1 Test failed

VersionConflict1X from Datadog.Trace.Tools.dd_dotnet.ArtifactTests.Checks.ProcessBasicChecksTests (Datadog)
Expected errorOutput "Running checks on process 4428 Process name: Samples.VersionConflict.1x  ---- STARTING TRACER SETUP CHECKS ----- Target process is running with .NET Framework 1. Checking Modules Needed so the Tracer Loads:  [SUCCESS]: The native library version 3.23.0.0 is loaded into the process. Error: System.IO.FileNotFoundException: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Datadog.Trace\v4.0_3.23.0.0__def86d06 1d0d2eeb\Datadog.Trace.dll    at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) + 0x72    at System.Linq.Enumerable.SelectEnumerableIterator\`2.MoveNext() + 0x74    at System.Linq.Enumerable.<DistinctByIterator>d__85\`2.MoveNext() + 0x70    at System.Collections.Generic.LargeArrayBuilder\`1.AddRange(IEnumerable\`1) + 0x48    at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable\`1) + 0xa6    at Datadog.Trace.Tools.dd_dotnet.Checks.ProcessBasicCheck.Run(ProcessInfo, IRegistryService) + 0x37f    at Datadog.Trace.Tools.dd_dotnet.CheckProcessCommand.<ExecuteAsync>d__2.MoveNext() + 0x142 --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Invocation.AnonymousCommandHandler.<InvokeAsync>d__6.MoveNext () + 0x1ca --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Invocation.AnonymousCommandHandler.SyncUsingAsync(InvocationC ontext) + 0x2b    at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInv ocationChain>b__0>d.MoveNext() + 0x100 --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<< UseParseErrorReporting>b__0>d.MoveNext() + 0xf2 --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<< UseHelp>b__0>d.MoveNext() + 0xbf --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTer mination>b__1_0>d.MoveNext() + 0x14d --- End of stack trace from previous location ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task, ConfigureAwaitOptions) + 0x4b    at System.CommandLine.Invocation.InvocationPipeline.<Invoke>g__FullInvocationChain| 3_0(InvocationContext) + 0x77    at Datadog.Trace.Tools.dd_dotnet.Program.Main(String[] args) + 0x2dc " to contain the strings: {"Tracer version 1.x can't be loaded simultaneously with other versions and will produce orphaned traces. Make sure to synchronize the Datadog.Trace NuGet version with the installed automatic instrumentation package version.", "Found multiple instances of Datadog.Trace.dll in the target process. Detected versions: 1.29.0.0 3.23.0.0 "}.

ℹ️ Info

❄️ No new flaky tests detected

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants