Skip to content

Add more alpine checks for native library#7395

Merged
andrewlock merged 3 commits into
masterfrom
andrew/more-alpine-checks
Aug 20, 2025
Merged

Add more alpine checks for native library#7395
andrewlock merged 3 commits into
masterfrom
andrew/more-alpine-checks

Conversation

@andrewlock

@andrewlock andrewlock commented Aug 15, 2025

Copy link
Copy Markdown
Member

Summary of changes

Refactors the native snapshot checks and adds explicit validation of the symbols used by the native libraries against an allowlist

Reason for change

We are shortly going to start building with alpine:3.17 instead of alpine:3.14, but we don't want to break customers, so we need to make sure we only use symbols that are available in the earlier version of musl.

We previously added snapshots for which symbols we depend on here:

That means we can see exactly when we depend on new symbols.

However, we realised that libdatadog is already building with a much later version of alpine (3.22?) and so wanted to ensure that we're not Already depending on symbols that are not available in some code paths.

Implementation details

There are two parts to this PR

  • Extract the existing symbol snapshotting out of Build.cs and into a helper class. There's some minor renaming etc, but otherwise this is just copy-paste, so you can skip the first commit.
  • Extract the symbols defined by musl 1.2.2 and libgcc (which the profiler/libdatadog use for libunwind stuff). These form the "allow list" of symbols (libgcc is allowed because .NET depends on it too).

Now when we extract the symbols for alpine/universal binaries, we check that we are only depending on symbols defined in these libraries.

Note that we ignore ddog_ and blaze_ symbols which are defined in libdatadog and required by the profiler, on the assumption that there will never be a mismatch here.

Test coverage

Tested locally with all the native libraries we produce, and all looks good, so as long as CI passes we're good.

Other details

We should probably add snapshotting of the WAF too to be safe 🤔

…e libraries, to make sure we don't accidentally use a symbol that's not defined in an earlier version of musl
@andrewlock andrewlock requested review from a team as code owners August 15, 2025 16:25
@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Aug 15, 2025
@andrewlock andrewlock force-pushed the andrew/more-alpine-checks branch from c94916d to d4792b8 Compare August 15, 2025 16:25
@pr-commenter

pr-commenter Bot commented Aug 15, 2025

Copy link
Copy Markdown

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7395 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.281
  • 2 benchmarks are slower, with geometric mean 1.546
  • 5 benchmarks have fewer allocations
  • 5 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 #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.69 KB 5.65 KB -35 B -0.62%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.09 KB 5.98 KB -105 B -1.72%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.6μs 50.4ns 202ns 0 0 0 5.49 KB
master StartStopWithChild netcoreapp3.1 13.6μs 67ns 292ns 0 0 0 5.69 KB
master StartStopWithChild net472 21.8μs 125ns 928ns 0.965 0.214 0 6.09 KB
#7395 StartStopWithChild net6.0 10.8μs 59.3ns 351ns 0 0 0 5.48 KB
#7395 StartStopWithChild netcoreapp3.1 13.6μs 65.7ns 286ns 0 0 0 5.65 KB
#7395 StartStopWithChild net472 21.7μs 123ns 875ns 0.962 0.427 0.107 5.98 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 920μs 41.5ns 144ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 419ns 1.62μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 101ns 391ns 0 0 0 3.31 KB
#7395 WriteAndFlushEnrichedTraces net6.0 927μs 77.7ns 291ns 0 0 0 2.7 KB
#7395 WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 116ns 420ns 0 0 0 2.7 KB
#7395 WriteAndFlushEnrichedTraces net472 1.21ms 47ns 176ns 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 319μs 1.53μs 6.3μs 0 0 0 173.45 KB
master AllCycleSimpleBody netcoreapp3.1 508μs 2.6μs 12.2μs 0 0 0 175.64 KB
master AllCycleSimpleBody net472 425μs 120ns 448ns 29.2 0 0 195.79 KB
master AllCycleMoreComplexBody net6.0 330μs 232ns 900ns 0 0 0 176.95 KB
master AllCycleMoreComplexBody netcoreapp3.1 476μs 548ns 2.12μs 0 0 0 179.06 KB
master AllCycleMoreComplexBody net472 437μs 98.9ns 383ns 30.2 0 0 199.31 KB
master ObjectExtractorSimpleBody net6.0 331ns 1.63ns 7.98ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 408ns 0.356ns 1.38ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 306ns 0.0279ns 0.104ns 0.0443 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.52μs 3.12ns 12.1ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.69μs 28.9ns 108ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.67μs 1.11ns 4.31ns 0.602 0 0 3.8 KB
#7395 AllCycleSimpleBody net6.0 322μs 309ns 1.2μs 0 0 0 173.45 KB
#7395 AllCycleSimpleBody netcoreapp3.1 473μs 1.38μs 5.33μs 0 0 0 175.64 KB
#7395 AllCycleSimpleBody net472 430μs 148ns 575ns 29.2 0 0 195.79 KB
#7395 AllCycleMoreComplexBody net6.0 328μs 783ns 3.03μs 0 0 0 176.95 KB
#7395 AllCycleMoreComplexBody netcoreapp3.1 483μs 139ns 537ns 0 0 0 179.06 KB
#7395 AllCycleMoreComplexBody net472 436μs 99.2ns 371ns 30.2 0 0 199.31 KB
#7395 ObjectExtractorSimpleBody net6.0 317ns 1.8ns 11.4ns 0 0 0 280 B
#7395 ObjectExtractorSimpleBody netcoreapp3.1 415ns 0.807ns 3.13ns 0 0 0 272 B
#7395 ObjectExtractorSimpleBody net472 307ns 0.0499ns 0.193ns 0.0433 0 0 281 B
#7395 ObjectExtractorMoreComplexBody net6.0 6.27μs 32.1ns 144ns 0 0 0 3.78 KB
#7395 ObjectExtractorMoreComplexBody netcoreapp3.1 7.65μs 37.4ns 163ns 0 0 0 3.69 KB
#7395 ObjectExtractorMoreComplexBody net472 6.76μs 6.37ns 24.7ns 0.572 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.4μs 206ns 797ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.8μs 106ns 383ns 0 0 0 32.4 KB
master EncodeArgs net472 109μs 15.4ns 57.5ns 4.92 0 0 32.51 KB
master EncodeLegacyArgs net6.0 143μs 128ns 494ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 197μs 203ns 785ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 34.2ns 128ns 0 0 0 2.16 KB
#7395 EncodeArgs net6.0 77.9μs 61.3ns 221ns 0 0 0 32.4 KB
#7395 EncodeArgs netcoreapp3.1 96.8μs 330ns 1.28μs 0 0 0 32.4 KB
#7395 EncodeArgs net472 109μs 5.53ns 20ns 4.93 0 0 32.5 KB
#7395 EncodeLegacyArgs net6.0 146μs 134ns 517ns 0 0 0 2.15 KB
#7395 EncodeLegacyArgs netcoreapp3.1 199μs 166ns 644ns 0 0 0 2.14 KB
#7395 EncodeLegacyArgs net472 261μs 25.6ns 95.7ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7395

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.068 415,763.47 859,683.44

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 397μs 76.8ns 287ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 416μs 117ns 437ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 438μs 106ns 411ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 289μs 129ns 481ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 303μs 245ns 919ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 316μs 78.1ns 302ns 0 0 0 2.29 KB
#7395 RunWafRealisticBenchmark net6.0 400μs 59.4ns 222ns 0 0 0 4.55 KB
#7395 RunWafRealisticBenchmark netcoreapp3.1 810μs 14.1μs 138μs 0 0 0 4.48 KB
#7395 RunWafRealisticBenchmark net472 435μs 88.7ns 344ns 0 0 0 4.66 KB
#7395 RunWafRealisticBenchmarkWithAttack net6.0 289μs 32ns 124ns 0 0 0 2.24 KB
#7395 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 303μs 405ns 1.57μs 0 0 0 2.22 KB
#7395 RunWafRealisticBenchmarkWithAttack net472 314μs 103ns 400ns 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.6μs 296ns 1.22μs 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 70.3μs 84.6ns 317ns 0 0 0 17.42 KB
master SendRequest net472 0.0129ns 0.00178ns 0.00689ns 0 0 0 0 b
#7395 SendRequest net6.0 61μs 29.3ns 113ns 0 0 0 14.52 KB
#7395 SendRequest netcoreapp3.1 71.7μs 103ns 399ns 0 0 0 17.42 KB
#7395 SendRequest net472 0.0067ns 0.00174ns 0.00673ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7395

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1.156 798,196.40 922,618.69

More allocations ⚠️ in #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 2 B 5 B 3 B 150.00%

Fewer allocations 🎉 in #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 3 B 1 B -2 B -66.67%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.92ms 700ns 2.71μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.18ms 2.16μs 8.35μs 0 0 0 640 KB
master OriginalCharSlice net472 2.63ms 701ns 2.62μs 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.36ms 450ns 1.69μs 0 0 0 2 B
master OptimizedCharSlice netcoreapp3.1 1.78ms 363ns 1.41μs 0 0 0 1 B
master OptimizedCharSlice net472 1.95ms 448ns 1.74μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 846μs 51ns 197ns 0 0 0 3 B
master OptimizedCharSliceWithPool netcoreapp3.1 798μs 83.2ns 311ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.22ms 48.2ns 187ns 0 0 0 0 b
#7395 OriginalCharSlice net6.0 1.96ms 4.77μs 17.2μs 0 0 0 640.01 KB
#7395 OriginalCharSlice netcoreapp3.1 2.11ms 7.96μs 30.8μs 0 0 0 640 KB
#7395 OriginalCharSlice net472 2.7ms 163ns 633ns 100 0 0 641.95 KB
#7395 OptimizedCharSlice net6.0 1.47ms 239ns 924ns 0 0 0 5 B
#7395 OptimizedCharSlice netcoreapp3.1 1.68ms 1.01μs 3.92μs 0 0 0 1 B
#7395 OptimizedCharSlice net472 1.97ms 446ns 1.73μs 0 0 0 0 b
#7395 OptimizedCharSliceWithPool net6.0 802μs 34.4ns 133ns 0 0 0 1 B
#7395 OptimizedCharSliceWithPool netcoreapp3.1 926μs 1.1μs 4.25μs 0 0 0 0 b
#7395 OptimizedCharSliceWithPool net472 1.16ms 19.7ns 76.2ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7395

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.281 1,074,502.01 838,839.73 bimodal

More allocations ⚠️ in #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56 KB 56.39 KB 391 B 0.70%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 699μs 3.47μs 15.5μs 0 0 0 41.67 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 732μs 3.88μs 21.3μs 0 0 0 42.06 KB
master WriteAndFlushEnrichedTraces net472 1.04ms 7.91μs 78.3μs 4.46 0 0 56 KB
#7395 WriteAndFlushEnrichedTraces net6.0 698μs 441ns 1.71μs 0 0 0 41.64 KB
#7395 WriteAndFlushEnrichedTraces netcoreapp3.1 669μs 2.85μs 11μs 0 0 0 42.1 KB
#7395 WriteAndFlushEnrichedTraces net472 839μs 3.08μs 11.9μs 8.93 0 0 56.39 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.81μs 8.56ns 34.2ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.63μs 5.38ns 20.1ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.86μs 14.7ns 73.4ns 0.156 0.0142 0 987 B
#7395 ExecuteNonQuery net6.0 1.81μs 9.6ns 44ns 0 0 0 1.02 KB
#7395 ExecuteNonQuery netcoreapp3.1 2.53μs 10ns 37.6ns 0 0 0 1.02 KB
#7395 ExecuteNonQuery net472 2.77μs 4.07ns 15.2ns 0.153 0.0139 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.7μs 8.33ns 34.4ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.31μs 9.94ns 38.5ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.67μs 4.22ns 16.3ns 0.164 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.73μs 0.865ns 3.24ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.42μs 10.3ns 38.4ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.96μs 3.48ns 13.5ns 0.157 0 0 1.1 KB
#7395 CallElasticsearch net6.0 1.72μs 4.66ns 17.4ns 0 0 0 1.03 KB
#7395 CallElasticsearch netcoreapp3.1 2.26μs 9.02ns 34.9ns 0 0 0 1.03 KB
#7395 CallElasticsearch net472 3.69μs 5.64ns 21.8ns 0.148 0 0 1.04 KB
#7395 CallElasticsearchAsync net6.0 1.82μs 9.37ns 41.9ns 0 0 0 1.01 KB
#7395 CallElasticsearchAsync netcoreapp3.1 2.42μs 7.45ns 28.9ns 0 0 0 1.08 KB
#7395 CallElasticsearchAsync net472 3.86μs 4.19ns 15.7ns 0.174 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.81μs 5.77ns 22.4ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.3μs 0.742ns 2.68ns 0 0 0 952 B
master ExecuteAsync net472 2.54μs 3.18ns 12.3ns 0.14 0 0 915 B
#7395 ExecuteAsync net6.0 1.79μs 2.84ns 11ns 0 0 0 952 B
#7395 ExecuteAsync netcoreapp3.1 2.3μs 7.37ns 27.6ns 0 0 0 952 B
#7395 ExecuteAsync net472 2.61μs 3.22ns 12.5ns 0.143 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.84μs 23ns 89.2ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.67μs 14.4ns 53.9ns 0 0 0 2.9 KB
master SendAsync net472 12.4μs 7.49ns 29ns 0.493 0 0 3.18 KB
#7395 SendAsync net6.0 7.15μs 10.2ns 39.4ns 0 0 0 2.36 KB
#7395 SendAsync netcoreapp3.1 8.43μs 21.9ns 84.8ns 0 0 0 2.9 KB
#7395 SendAsync net472 12.1μs 8.51ns 32.9ns 0.483 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 257.06 KB 272.07 KB 15.01 KB 5.84%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 275.07 KB 286.72 KB 11.65 KB 4.23%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.44 KB 44.05 KB 608 B 1.40%

Fewer allocations 🎉 in #7395

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 43.11 KB 42.82 KB -296 B -0.69%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 65.54 KB 57.34 KB -8.19 KB -12.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.5μs 237ns 1.28μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 55.4μs 710ns 6.99μs 0 0 0 43.11 KB
master StringConcatBenchmark net472 57.7μs 187ns 726ns 0 0 0 65.54 KB
master StringConcatAspectBenchmark net6.0 482μs 1.86μs 6.45μs 0 0 0 274.98 KB
master StringConcatAspectBenchmark netcoreapp3.1 455μs 5.64μs 54.7μs 0 0 0 257.06 KB
master StringConcatAspectBenchmark net472 404μs 1.77μs 7.53μs 0 0 0 275.07 KB
#7395 StringConcatBenchmark net6.0 44.4μs 237ns 1.52μs 0 0 0 44.05 KB
#7395 StringConcatBenchmark netcoreapp3.1 50.5μs 398ns 3.8μs 0 0 0 42.82 KB
#7395 StringConcatBenchmark net472 58.2μs 282ns 1.13μs 0 0 0 57.34 KB
#7395 StringConcatAspectBenchmark net6.0 469μs 1.74μs 6.03μs 0 0 0 273.64 KB
#7395 StringConcatAspectBenchmark netcoreapp3.1 502μs 2.65μs 13.2μs 0 0 0 272.07 KB
#7395 StringConcatAspectBenchmark net472 406μs 1.72μs 6.86μs 0 0 0 286.72 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.52μs 11.7ns 45.2ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.34μs 15.8ns 63.3ns 0 0 0 1.7 KB
master EnrichedLog net472 3.91μs 1.82ns 6.56ns 0.254 0 0 1.64 KB
#7395 EnrichedLog net6.0 2.55μs 13.9ns 77.6ns 0 0 0 1.7 KB
#7395 EnrichedLog netcoreapp3.1 3.47μs 16.2ns 64.8ns 0 0 0 1.7 KB
#7395 EnrichedLog net472 3.86μs 4.59ns 17.8ns 0.251 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 128μs 698ns 3.95μs 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 133μs 695ns 3.55μs 0 0 0 4.31 KB
master EnrichedLog net472 175μs 935ns 5.03μs 0 0 0 4.52 KB
#7395 EnrichedLog net6.0 123μs 240ns 866ns 0 0 0 4.31 KB
#7395 EnrichedLog netcoreapp3.1 129μs 465ns 1.8μs 0 0 0 4.31 KB
#7395 EnrichedLog net472 167μs 111ns 431ns 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.88μs 22.7ns 85ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.89μs 8.52ns 33ns 0 0 0 2.26 KB
master EnrichedLog net472 7.59μs 4.53ns 17.6ns 0.304 0 0 2.08 KB
#7395 EnrichedLog net6.0 4.9μs 23.4ns 93.8ns 0 0 0 2.26 KB
#7395 EnrichedLog netcoreapp3.1 6.73μs 15.6ns 60.5ns 0 0 0 2.26 KB
#7395 EnrichedLog net472 7.45μs 12ns 46.4ns 0.297 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 1.93μs 9.03ns 36.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.61μs 12ns 46.4ns 0 0 0 1.2 KB
master SendReceive net472 3.2μs 2.48ns 9.6ns 0.191 0 0 1.2 KB
#7395 SendReceive net6.0 1.96μs 9.58ns 42.9ns 0 0 0 1.2 KB
#7395 SendReceive netcoreapp3.1 2.57μs 11.7ns 45.3ns 0 0 0 1.2 KB
#7395 SendReceive net472 3.15μs 2.53ns 9.81ns 0.189 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.15μs 18.4ns 71.4ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.6μs 13ns 50.4ns 0 0 0 1.63 KB
master EnrichedLog net472 6.77μs 7.63ns 29.5ns 0.302 0 0 2.03 KB
#7395 EnrichedLog net6.0 4.23μs 9.41ns 36.4ns 0 0 0 1.58 KB
#7395 EnrichedLog netcoreapp3.1 5.45μs 25.3ns 104ns 0 0 0 1.63 KB
#7395 EnrichedLog net472 6.67μs 6.19ns 24ns 0.3 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 741ns 0.0946ns 0.354ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 973ns 5ns 23.5ns 0 0 0 576 B
master StartFinishSpan net472 895ns 0.324ns 1.21ns 0.091 0 0 578 B
master StartFinishScope net6.0 905ns 4.79ns 23.9ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.11μs 5.43ns 21.7ns 0 0 0 696 B
master StartFinishScope net472 1.11μs 0.177ns 0.686ns 0.101 0 0 658 B
#7395 StartFinishSpan net6.0 737ns 0.164ns 0.592ns 0 0 0 576 B
#7395 StartFinishSpan netcoreapp3.1 942ns 4.32ns 16.7ns 0 0 0 576 B
#7395 StartFinishSpan net472 918ns 0.883ns 3.42ns 0.0877 0 0 578 B
#7395 StartFinishScope net6.0 882ns 4.24ns 17.5ns 0 0 0 696 B
#7395 StartFinishScope netcoreapp3.1 1.12μs 5.33ns 20.6ns 0 0 0 696 B
#7395 StartFinishScope net472 1.09μs 0.194ns 0.726ns 0.103 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 994ns 5.1ns 25.5ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.4μs 4.05ns 15.7ns 0 0 0 696 B
master RunOnMethodBegin net472 1.38μs 1.08ns 4.04ns 0.104 0 0 658 B
#7395 RunOnMethodBegin net6.0 1.04μs 0.938ns 3.38ns 0 0 0 696 B
#7395 RunOnMethodBegin netcoreapp3.1 1.37μs 5.62ns 21.8ns 0 0 0 696 B
#7395 RunOnMethodBegin net472 1.41μs 0.763ns 2.86ns 0.0983 0 0 658 B

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

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 (7395) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (72ms)  : 70, 74
     .   : milestone, 72,

    section Baseline
    This PR (7395) - mean (68ms)  : 65, 71
     .   : milestone, 68,
    master - mean (68ms)  : 65, 72
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (997ms)  : 967, 1026
     .   : milestone, 997,
    master - mean (1,004ms)  : 983, 1025
     .   : milestone, 1004,

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

    section Baseline
    This PR (7395) - mean (107ms)  : 105, 108
     .   : milestone, 107,
    master - mean (106ms)  : 103, 109
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (708ms)  : 701, 715
     .   : milestone, 708,
    master - mean (713ms)  : 703, 723
     .   : milestone, 713,

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

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

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (664ms)  : 652, 676
     .   : milestone, 664,
    master - mean (668ms)  : 657, 679
     .   : milestone, 668,

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

    section Baseline
    This PR (7395) - mean (92ms)  : 90, 95
     .   : milestone, 92,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (598ms)  : 588, 609
     .   : milestone, 598,
    master - mean (603ms)  : 594, 612
     .   : milestone, 603,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7395) - mean (195ms)  : 192, 198
     .   : milestone, 195,
    master - mean (193ms)  : 190, 196
     .   : milestone, 193,

    section Baseline
    This PR (7395) - mean (191ms)  : 186, 195
     .   : milestone, 191,
    master - mean (190ms)  : 183, 196
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (1,113ms)  : 1089, 1137
     .   : milestone, 1113,
    master - mean (1,100ms)  : 1068, 1132
     .   : milestone, 1100,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7395) - mean (276ms)  : 273, 280
     .   : milestone, 276,
    master - mean (274ms)  : 271, 278
     .   : milestone, 274,

    section Baseline
    This PR (7395) - mean (277ms)  : 270, 284
     .   : milestone, 277,
    master - mean (273ms)  : 269, 278
     .   : milestone, 273,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (904ms)  : 881, 927
     .   : milestone, 904,
    master - mean (898ms)  : 873, 924
     .   : milestone, 898,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7395) - mean (269ms)  : 265, 273
     .   : milestone, 269,
    master - mean (265ms)  : 262, 268
     .   : milestone, 265,

    section Baseline
    This PR (7395) - mean (268ms)  : 265, 272
     .   : milestone, 268,
    master - mean (266ms)  : 260, 273
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (889ms)  : 863, 916
     .   : milestone, 889,
    master - mean (884ms)  : 855, 913
     .   : milestone, 884,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7395) - mean (268ms)  : 265, 272
     .   : milestone, 268,
    master - mean (265ms)  : 262, 268
     .   : milestone, 265,

    section Baseline
    This PR (7395) - mean (269ms)  : 263, 274
     .   : milestone, 269,
    master - mean (266ms)  : 259, 273
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (7395) - mean (798ms)  : 779, 816
     .   : milestone, 798,
    master - mean (794ms)  : 776, 811
     .   : milestone, 794,

Loading

@andrewlock andrewlock added the area:tests unit tests, integration tests label Aug 19, 2025
@andrewlock andrewlock merged commit 505a0f3 into master Aug 20, 2025
150 checks passed
@andrewlock andrewlock deleted the andrew/more-alpine-checks branch August 20, 2025 08:03
@github-actions github-actions Bot added this to the vNext-v3 milestone Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants