Skip to content

Update FeatureFlagsEvaluator and Debugger ToUUID to not violate CA1850#8303

Merged
andrewlock merged 2 commits into
masterfrom
andrew/md5-analyzer
Mar 18, 2026
Merged

Update FeatureFlagsEvaluator and Debugger ToUUID to not violate CA1850#8303
andrewlock merged 2 commits into
masterfrom
andrew/md5-analyzer

Conversation

@andrewlock

@andrewlock andrewlock commented Mar 13, 2026

Copy link
Copy Markdown
Member

Summary of changes

Enables the CA1850 analyzer, and fixes the two existing violations

Reason for change

The CA1850 analyzer says "use the static MD5.HashData instead of MD5.Create() etc. We need to use #if because it's only in .NET Core.

However, in looking at the violations, I saw there was a big opportunity for allocation and speed improvements too, so did them together

Implementation details

  • Added basic tests for existing code that was to be refactored
  • Create an Md5Helper.ComputeMd5Hash() method that takes a string, converts to UTF-8, and computes the hash, as efficiently as possibly (stackalloc where possible etc)
  • Update existing usages to use the new helper
  • "Fix" other allocatey paths that were using the hash output to be "better" 😄

Test coverage

  • Added some unit tests to ensure correctness. They're not extensive, but they're good enough I think
  • Ran some basic benchmarks, I think the results speak for themselves 😉
Method Runtime Mean Error Allocated
FeatureFlags_Original .NET 10.0 632.3 ns 5.64 ns 1120 B
FeatureFlags_Updated .NET 10.0 204.4 ns 3.78 ns -
FeatureFlags_Original .NET 6.0 672.5 ns 7.59 ns 1112 B
FeatureFlags_Updated .NET 6.0 223.7 ns 4.34 ns -
FeatureFlags_Original .NET Core 2.1 1,102.5 ns 21.09 ns 1128 B
FeatureFlags_Updated .NET Core 2.1 565.7 ns 9.12 ns 208 B
FeatureFlags_Original .NET Core 3.1 899.9 ns 17.84 ns 1112 B
FeatureFlags_Updated .NET Core 3.1 366.3 ns 7.26 ns 128 B
FeatureFlags_Original .NET Framework 4.8 2,822.1 ns 53.48 ns 1444 B
FeatureFlags_Updated .NET Framework 4.8 1,861.8 ns 36.68 ns 522 B
ToUUID_Original .NET 10.0 860.4 ns 17.27 ns 1024 B
ToUUID_Updated .NET 10.0 333.6 ns 5.05 ns 96 B
ToUUID_Original .NET 6.0 815.5 ns 14.31 ns 1016 B
ToUUID_Updated .NET 6.0 365.3 ns 2.66 ns 96 B
ToUUID_Original .NET Core 2.1 1,055.6 ns 20.77 ns 1048 B
ToUUID_Updated .NET Core 2.1 733.5 ns 13.69 ns 408 B
ToUUID_Original .NET Core 3.1 876.6 ns 13.99 ns 1016 B
ToUUID_Updated .NET Core 3.1 498.1 ns 9.36 ns 224 B
ToUUID_Original .NET Framework 4.8 2,365.0 ns 46.94 ns 1484 B
ToUUID_Updated .NET Framework 4.8 2,305.9 ns 45.79 ns 722 B

Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-813

Stacked on other analyzer enablement tests:

@andrewlock andrewlock requested review from a team as code owners March 13, 2026 15:41
@andrewlock andrewlock requested review from greghuels and typotter and removed request for a team March 13, 2026 15:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3dbf668fa0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

? stackalloc byte[512]
: new byte[maxInputSize];

var encodeCount = EncodingHelpers.Utf8NoBom.GetBytes(input, inputBuffer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep MD5 input encoding tolerant of invalid surrogates

Using EncodingHelpers.Utf8NoBom.GetBytes(...) here changes behavior from the previous Encoding.UTF8.GetBytes(...): Utf8NoBom is configured with throwOnInvalidBytes: true, so inputs containing unpaired UTF-16 surrogates now throw EncoderFallbackException instead of being replacement-encoded and hashed. In this commit that affects both feature-flag sharding and debugger UUID generation, meaning certain user-provided keys that previously hashed deterministically now trigger error/default paths.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Interesting 🤔 That's probably still what we want, but I didn't realise it was different...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do the callers handle the error-path change correctly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do the callers handle the error-path change correctly?

In short "no", but there's no actual change to the error-path. The throwOnInvalidBytes:true case will only throw when you're trying to get a string from a byte[]. In this case we're going the other way - we have a valid string, so we can always convert it to a byte[], there can't be any issues with unpaired surrogates I believe

@pr-commenter

pr-commenter Bot commented Mar 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-17 16:06:55

Comparing candidate commit 419d7ed in PR branch andrew/md5-analyzer with baseline commit efb6c5c in branch master.

Found 6 performance improvements and 5 performance regressions! Performance is the same for 166 metrics, 15 unstable metrics.

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+19.084ms; +19.142ms] or [+18.459%; +18.515%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟩 execution_time [-17.443ms; -11.881ms] or [-8.150%; -5.551%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 execution_time [+11.046ms; +17.088ms] or [+5.639%; +8.724%]
  • 🟥 throughput [-87400.781op/s; -65956.636op/s] or [-12.100%; -9.131%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+26.798ms; +35.222ms] or [+14.919%; +19.608%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟩 execution_time [-28.112ms; -23.568ms] or [-16.786%; -14.073%]
  • 🟩 throughput [+220.151op/s; +262.860op/s] or [+16.423%; +19.609%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟩 execution_time [-96.943µs; -92.151µs] or [-8.665%; -8.236%]
  • 🟩 throughput [+80.375op/s; +84.636op/s] or [+8.993%; +9.469%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟩 execution_time [-32.753ms; -27.525ms] or [-15.922%; -13.380%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟥 execution_time [+12.495ms; +18.263ms] or [+6.282%; +9.182%]

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Mar 13, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8303) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.96 ± (74.93 - 75.29) ms75.96 ± (75.85 - 76.20) ms+1.3%✅⬆️
.NET Framework 4.8 - Bailout
duration78.90 ± (78.74 - 79.15) ms81.12 ± (80.94 - 81.36) ms+2.8%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1096.19 ± (1095.62 - 1101.62) ms1108.41 ± (1107.63 - 1114.14) ms+1.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms23.42 ± (23.37 - 23.47) ms23.35 ± (23.30 - 23.40) ms-0.3%
process.time_to_main_ms88.25 ± (88.05 - 88.45) ms88.97 ± (88.76 - 89.18) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.90 ± (10.89 - 10.90) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.31 ± (23.26 - 23.37) ms23.38 ± (23.32 - 23.45) ms+0.3%✅⬆️
process.time_to_main_ms89.64 ± (89.41 - 89.86) ms91.48 ± (91.24 - 91.72) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.93 ± (10.93 - 10.94) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms226.29 ± (225.11 - 227.48) ms224.53 ± (223.06 - 226.01) ms-0.8%
process.time_to_main_ms504.46 ± (503.58 - 505.35) ms506.35 ± (505.29 - 507.41) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.23 ± (47.21 - 47.25) MB47.15 ± (47.13 - 47.18) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms21.80 ± (21.77 - 21.83) ms21.97 ± (21.93 - 22.01) ms+0.8%✅⬆️
process.time_to_main_ms76.12 ± (75.94 - 76.29) ms76.97 ± (76.77 - 77.16) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.62 - 10.63) MB10.63 ± (10.63 - 10.64) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.67 ± (21.63 - 21.72) ms21.89 ± (21.86 - 21.93) ms+1.0%✅⬆️
process.time_to_main_ms77.12 ± (76.92 - 77.32) ms78.07 ± (77.87 - 78.26) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.74) MB10.74 ± (10.74 - 10.74) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.27 ± (210.45 - 214.09) ms211.92 ± (210.40 - 213.45) ms-0.2%
process.time_to_main_ms500.38 ± (499.54 - 501.22) ms506.27 ± (505.52 - 507.02) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.24 ± (49.21 - 49.26) MB49.21 ± (49.19 - 49.24) MB-0.0%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms20.17 ± (20.13 - 20.21) ms20.48 ± (20.44 - 20.53) ms+1.5%✅⬆️
process.time_to_main_ms76.18 ± (76.00 - 76.36) ms77.62 ± (77.42 - 77.83) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.68 ± (7.68 - 7.69) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.20 ± (20.15 - 20.25) ms20.19 ± (20.14 - 20.24) ms-0.0%
process.time_to_main_ms77.32 ± (77.15 - 77.48) ms77.34 ± (77.18 - 77.49) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.75) MB7.72 ± (7.71 - 7.72) MB-0.3%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms168.75 ± (167.88 - 169.63) ms170.14 ± (169.18 - 171.11) ms+0.8%✅⬆️
process.time_to_main_ms483.46 ± (482.59 - 484.33) ms487.06 ± (486.36 - 487.76) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.54 ± (36.52 - 36.56) MB36.56 ± (36.55 - 36.58) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.73 ± (193.65 - 194.51) ms197.33 ± (197.25 - 198.27) ms+1.9%✅⬆️
.NET Framework 4.8 - Bailout
duration198.39 ± (198.09 - 198.79) ms200.75 ± (200.37 - 201.20) ms+1.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1148.37 ± (1151.59 - 1159.74) ms1175.26 ± (1174.09 - 1185.55) ms+2.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms188.30 ± (187.90 - 188.70) ms190.79 ± (190.34 - 191.23) ms+1.3%✅⬆️
process.time_to_main_ms81.12 ± (80.89 - 81.36) ms82.14 ± (81.94 - 82.35) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.14 - 16.19) MB16.03 ± (16.01 - 16.05) MB-0.8%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms187.56 ± (187.18 - 187.95) ms190.00 ± (189.61 - 190.38) ms+1.3%✅⬆️
process.time_to_main_ms82.12 ± (81.94 - 82.29) ms83.28 ± (83.12 - 83.44) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.24 - 16.32) MB16.16 ± (16.14 - 16.19) MB-0.7%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.1%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms396.63 ± (394.63 - 398.64) ms394.68 ± (392.89 - 396.47) ms-0.5%
process.time_to_main_ms474.05 ± (473.43 - 474.67) ms480.40 ± (479.50 - 481.30) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.96 ± (57.81 - 58.12) MB57.97 ± (57.83 - 58.11) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms192.80 ± (192.42 - 193.19) ms194.44 ± (194.06 - 194.81) ms+0.8%✅⬆️
process.time_to_main_ms70.38 ± (70.18 - 70.57) ms71.33 ± (71.11 - 71.54) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.04 - 16.28) MB16.37 ± (16.34 - 16.39) MB+1.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+2.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.84 ± (191.51 - 192.17) ms194.11 ± (193.65 - 194.57) ms+1.2%✅⬆️
process.time_to_main_ms71.15 ± (71.04 - 71.25) ms72.30 ± (72.14 - 72.45) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.12 - 16.35) MB16.16 ± (16.03 - 16.29) MB-0.5%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+1.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms431.79 ± (430.02 - 433.57) ms428.95 ± (427.45 - 430.45) ms-0.7%
process.time_to_main_ms477.66 ± (476.77 - 478.56) ms479.99 ± (479.12 - 480.87) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.20 ± (60.10 - 60.30) MB60.24 ± (60.17 - 60.30) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 31)30 ± (30 - 30)-0.0%
.NET 8 - Baseline
process.internal_duration_ms189.76 ± (189.40 - 190.12) ms190.80 ± (190.38 - 191.22) ms+0.5%✅⬆️
process.time_to_main_ms69.53 ± (69.35 - 69.71) ms70.20 ± (70.03 - 70.37) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.80) MB11.83 ± (11.81 - 11.86) MB+0.5%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.8%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.38 ± (188.95 - 189.82) ms190.39 ± (190.08 - 190.71) ms+0.5%✅⬆️
process.time_to_main_ms70.95 ± (70.82 - 71.09) ms71.31 ± (71.18 - 71.44) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.73 - 11.82) MB11.88 ± (11.84 - 11.91) MB+0.9%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.3%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms355.09 ± (353.70 - 356.48) ms355.96 ± (354.69 - 357.24) ms+0.2%✅⬆️
process.time_to_main_ms453.16 ± (452.45 - 453.88) ms456.19 ± (455.40 - 456.98) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.45 ± (48.42 - 48.49) MB48.46 ± (48.43 - 48.49) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
Comparison explanation

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

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (76ms)  : 73, 79
    master - mean (75ms)  : 72, 78

    section Bailout
    This PR (8303) - mean (81ms)  : 78, 84
    master - mean (79ms)  : 77, 81

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (1,111ms)  : 1064, 1158
    master - mean (1,099ms)  : 1063, 1135

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (120ms)  : 116, 123
    master - mean (119ms)  : 115, 122

    section Bailout
    This PR (8303) - mean (122ms)  : 119, 125
    master - mean (120ms)  : 117, 123

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (767ms)  : 744, 791
    master - mean (769ms)  : 746, 791

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (106ms)  : 103, 108
    master - mean (105ms)  : 102, 107

    section Bailout
    This PR (8303) - mean (106ms)  : 103, 110
    master - mean (105ms)  : 103, 108

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (756ms)  : 719, 792
    master - mean (750ms)  : 703, 796

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (106ms)  : 102, 111
    master - mean (104ms)  : 101, 108

    section Bailout
    This PR (8303) - mean (105ms)  : 103, 107
    master - mean (105ms)  : 103, 108

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (699ms)  : 674, 725
    master - mean (694ms)  : 670, 718

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (198ms)  : 190, 205
    master - mean (194ms)  : 189, 199

    section Bailout
    This PR (8303) - mean (201ms)  : 197, 205
    master - mean (198ms)  : 195, 202

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (1,180ms)  : 1105, 1254
    master - mean (1,156ms)  : 1097, 1214

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (282ms)  : 273, 291
    master - mean (278ms)  : 272, 285

    section Bailout
    This PR (8303) - mean (282ms)  : 277, 287
    master - mean (278ms)  : 273, 283

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (910ms)  : 875, 945
    master - mean (901ms)  : 872, 931

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (274ms)  : 268, 280
    master - mean (271ms)  : 265, 278

    section Bailout
    This PR (8303) - mean (274ms)  : 269, 280
    master - mean (271ms)  : 266, 276

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (942ms)  : 906, 979
    master - mean (942ms)  : 918, 965

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8303) - mean (271ms)  : 264, 278
    master - mean (269ms)  : 264, 274

    section Bailout
    This PR (8303) - mean (271ms)  : 267, 275
    master - mean (270ms)  : 264, 275

    section CallTarget+Inlining+NGEN
    This PR (8303) - mean (844ms)  : 821, 868
    master - mean (839ms)  : 816, 862

Loading

@andrewlock andrewlock force-pushed the andrew/md5-analyzer branch from 3dbf668 to 1e96d16 Compare March 13, 2026 17:23
@andrewlock andrewlock requested review from a team as code owners March 13, 2026 17:23
@andrewlock andrewlock requested review from link04 and shreyamalpani and removed request for a team March 13, 2026 17:23
@andrewlock andrewlock force-pushed the andrew/more-analyzers branch from c344219 to 5c769bb Compare March 13, 2026 17:23
@andrewlock andrewlock force-pushed the andrew/md5-analyzer branch from 1e96d16 to d7a3f14 Compare March 17, 2026 14:57
Base automatically changed from andrew/more-analyzers to master March 17, 2026 14:59

@dudikeleti dudikeleti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM👍. Left one question.

@andrewlock andrewlock force-pushed the andrew/md5-analyzer branch from d7a3f14 to 419d7ed Compare March 17, 2026 15:23
var intFromHash = Convert.ToInt64(first8Chars, 16);
#if NETCOREAPP
// MD5 always produces a 16 byte hash
Span<byte> hashBytes = stackalloc byte[16];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice :)

@daniel-romano-DD daniel-romano-DD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot

@andrewlock andrewlock added type:performance Performance, speed, latency, resource usage (CPU, memory) area:builds project files, build scripts, pipelines, versioning, releases, packages labels Mar 17, 2026
@andrewlock andrewlock enabled auto-merge (squash) March 17, 2026 16:41

@NachoEchevarria NachoEchevarria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@andrewlock andrewlock merged commit 2a80e17 into master Mar 18, 2026
146 of 147 checks passed
@andrewlock andrewlock deleted the andrew/md5-analyzer branch March 18, 2026 10:28
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 18, 2026
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 type:performance Performance, speed, latency, resource usage (CPU, memory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants