Skip to content

Fix off-by-one error in ASM Encoder#8637

Merged
andrewlock merged 2 commits into
masterfrom
andrew/fix-off-by-one-error-in-encoder
May 19, 2026
Merged

Fix off-by-one error in ASM Encoder#8637
andrewlock merged 2 commits into
masterfrom
andrew/fix-off-by-one-error-in-encoder

Conversation

@andrewlock

@andrewlock andrewlock commented May 14, 2026

Copy link
Copy Markdown
Member

Summary of changes

Fix off-by-one error in the Encoder when encoding an IEnumerable that doesn't implement IList

Reason for change

There's an off by one error in the encoder

Implementation details

  • Create a PR to repro
  • Fix the off-by-one error

Test coverage

Added a unit test to demonstrate the error and fix it.

Note that the legacy encoder's switch has no IEnumerable<object> case, it falls through to EncodeUnknownType (which just calls .ToString()), so the tests are skipped for that case.

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 14, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8637) 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.22 ± (74.13 - 74.76) ms72.49 ± (72.55 - 72.93) ms-2.3%
.NET Framework 4.8 - Bailout
duration77.77 ± (77.69 - 78.13) ms76.91 ± (76.83 - 77.17) ms-1.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1097.23 ± (1096.07 - 1103.80) ms1103.01 ± (1101.15 - 1107.42) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.73 ± (22.67 - 22.78) ms22.30 ± (22.26 - 22.33) ms-1.9%
process.time_to_main_ms84.81 ± (84.55 - 85.07) ms83.51 ± (83.33 - 83.69) ms-1.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.92 ± (10.91 - 10.92) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.44 ± (22.40 - 22.48) ms22.62 ± (22.57 - 22.68) ms+0.8%✅⬆️
process.time_to_main_ms85.51 ± (85.26 - 85.76) ms86.97 ± (86.65 - 87.28) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.88 ± (10.88 - 10.89) MB10.95 ± (10.94 - 10.95) MB+0.6%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms213.18 ± (212.27 - 214.08) ms213.64 ± (212.30 - 214.97) ms+0.2%✅⬆️
process.time_to_main_ms536.75 ± (535.41 - 538.10) ms537.79 ± (536.33 - 539.25) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.34 ± (48.31 - 48.38) MB48.41 ± (48.37 - 48.45) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-1.0%
.NET 6 - Baseline
process.internal_duration_ms21.59 ± (21.53 - 21.64) ms21.21 ± (21.18 - 21.25) ms-1.7%
process.time_to_main_ms75.47 ± (75.20 - 75.75) ms73.31 ± (73.15 - 73.47) ms-2.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.64) MB10.63 ± (10.63 - 10.63) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.22 ± (21.18 - 21.26) ms21.18 ± (21.13 - 21.22) ms-0.2%
process.time_to_main_ms75.00 ± (74.80 - 75.20) ms74.26 ± (74.08 - 74.43) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.73) MB10.75 ± (10.75 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms380.71 ± (378.30 - 383.11) ms378.48 ± (376.52 - 380.44) ms-0.6%
process.time_to_main_ms536.88 ± (535.76 - 538.00) ms539.69 ± (538.36 - 541.03) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.76 ± (49.74 - 49.79) MB49.90 ± (49.87 - 49.93) MB+0.3%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.6%
.NET 8 - Baseline
process.internal_duration_ms19.27 ± (19.23 - 19.31) ms19.71 ± (19.65 - 19.77) ms+2.3%✅⬆️
process.time_to_main_ms71.57 ± (71.41 - 71.73) ms75.03 ± (74.73 - 75.33) ms+4.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.69 ± (7.68 - 7.70) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.34 ± (19.30 - 19.39) ms20.23 ± (20.18 - 20.28) ms+4.6%✅⬆️
process.time_to_main_ms73.93 ± (73.68 - 74.18) ms77.21 ± (77.02 - 77.39) ms+4.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.72 - 7.73) MB7.73 ± (7.73 - 7.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms293.77 ± (291.55 - 296.00) ms297.03 ± (294.75 - 299.32) ms+1.1%✅⬆️
process.time_to_main_ms493.29 ± (492.22 - 494.36) ms498.44 ± (497.01 - 499.87) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.92 ± (36.89 - 36.95) MB36.91 ± (36.88 - 36.94) MB-0.0%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.4%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration199.77 ± (199.04 - 199.92) ms197.98 ± (197.87 - 198.85) ms-0.9%
.NET Framework 4.8 - Bailout
duration201.60 ± (201.09 - 201.94) ms202.56 ± (202.03 - 202.99) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1198.57 ± (1200.13 - 1207.14) ms1196.15 ± (1196.23 - 1204.21) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms195.90 ± (195.44 - 196.36) ms193.02 ± (192.51 - 193.52) ms-1.5%
process.time_to_main_ms84.00 ± (83.75 - 84.24) ms83.33 ± (83.01 - 83.65) ms-0.8%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.07 - 16.10) MB16.05 ± (16.02 - 16.08) MB-0.2%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms195.40 ± (194.93 - 195.88) ms192.15 ± (191.67 - 192.63) ms-1.7%
process.time_to_main_ms85.47 ± (85.17 - 85.76) ms84.68 ± (84.42 - 84.93) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.18) MB16.09 ± (16.07 - 16.11) MB-0.4%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+0.3%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms387.78 ± (386.48 - 389.08) ms387.07 ± (385.52 - 388.62) ms-0.2%
process.time_to_main_ms537.06 ± (535.80 - 538.32) ms529.57 ± (528.37 - 530.77) ms-1.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.54 ± (57.35 - 57.73) MB57.71 ± (57.47 - 57.94) MB+0.3%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.4%
.NET 6 - Baseline
process.internal_duration_ms199.63 ± (199.17 - 200.09) ms197.02 ± (196.62 - 197.42) ms-1.3%
process.time_to_main_ms73.04 ± (72.76 - 73.32) ms72.37 ± (72.08 - 72.66) ms-0.9%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.33 ± (16.30 - 16.35) MB16.44 ± (16.41 - 16.47) MB+0.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.4%
.NET 6 - Bailout
process.internal_duration_ms199.00 ± (198.54 - 199.47) ms196.28 ± (195.85 - 196.71) ms-1.4%
process.time_to_main_ms73.93 ± (73.67 - 74.18) ms73.13 ± (72.94 - 73.33) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.35 ± (16.33 - 16.37) MB16.45 ± (16.42 - 16.48) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.4%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms596.70 ± (594.24 - 599.16) ms594.06 ± (591.84 - 596.27) ms-0.4%
process.time_to_main_ms537.60 ± (536.49 - 538.71) ms535.00 ± (533.86 - 536.15) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.56 ± (61.47 - 61.66) MB61.41 ± (61.30 - 61.52) MB-0.2%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.1%
.NET 8 - Baseline
process.internal_duration_ms196.26 ± (195.79 - 196.73) ms196.70 ± (196.27 - 197.13) ms+0.2%✅⬆️
process.time_to_main_ms72.16 ± (71.91 - 72.42) ms71.59 ± (71.35 - 71.84) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.74 ± (11.73 - 11.76) MB11.71 ± (11.69 - 11.72) MB-0.3%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.4%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms195.42 ± (194.93 - 195.92) ms194.31 ± (193.85 - 194.77) ms-0.6%
process.time_to_main_ms72.97 ± (72.76 - 73.18) ms72.69 ± (72.46 - 72.92) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.75 - 11.80) MB11.74 ± (11.72 - 11.77) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms514.46 ± (511.47 - 517.45) ms516.06 ± (513.54 - 518.58) ms+0.3%✅⬆️
process.time_to_main_ms492.19 ± (491.44 - 492.94) ms489.35 ± (488.51 - 490.18) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.68 ± (50.65 - 50.72) MB50.58 ± (50.54 - 50.62) MB-0.2%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.5%✅⬆️
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 (8637) - mean (73ms)  : 70, 76
    master - mean (74ms)  : 70, 79

    section Bailout
    This PR (8637) - mean (77ms)  : 75, 79
    master - mean (78ms)  : 74, 81

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (1,104ms)  : 1060, 1149
    master - mean (1,100ms)  : 1043, 1157

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 (8637) - mean (112ms)  : 109, 116
    master - mean (115ms)  : 110, 119

    section Bailout
    This PR (8637) - mean (117ms)  : 110, 124
    master - mean (115ms)  : 111, 118

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (789ms)  : 769, 809
    master - mean (787ms)  : 758, 816

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8637) - mean (101ms)  : 97, 105
    master - mean (104ms)  : 98, 109

    section Bailout
    This PR (8637) - mean (102ms)  : 99, 104
    master - mean (103ms)  : 99, 106

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (947ms)  : 912, 981
    master - mean (945ms)  : 904, 986

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8637) - mean (103ms)  : 97, 109
    master - mean (98ms)  : 95, 102

    section Bailout
    This PR (8637) - mean (106ms)  : 103, 109
    master - mean (101ms)  : 97, 105

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (827ms)  : 788, 865
    master - mean (819ms)  : 774, 865

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 (8637) - mean (198ms)  : 191, 206
    master - mean (199ms)  : 195, 204

    section Bailout
    This PR (8637) - mean (203ms)  : 198, 207
    master - mean (202ms)  : 197, 206

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (1,200ms)  : 1140, 1260
    master - mean (1,204ms)  : 1154, 1253

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 (8637) - mean (285ms)  : 276, 294
    master - mean (289ms)  : 278, 299

    section Bailout
    This PR (8637) - mean (285ms)  : 277, 294
    master - mean (290ms)  : 281, 298

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (955ms)  : 931, 979
    master - mean (965ms)  : 948, 982

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8637) - mean (278ms)  : 273, 284
    master - mean (281ms)  : 273, 289

    section Bailout
    This PR (8637) - mean (278ms)  : 273, 283
    master - mean (281ms)  : 274, 289

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (1,160ms)  : 1123, 1196
    master - mean (1,170ms)  : 1132, 1208

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

    section Bailout
    This PR (8637) - mean (277ms)  : 272, 282
    master - mean (279ms)  : 271, 286

    section CallTarget+Inlining+NGEN
    This PR (8637) - mean (1,037ms)  : 990, 1085
    master - mean (1,039ms)  : 993, 1084

Loading

@pr-commenter

pr-commenter Bot commented May 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-15 09:18:55

Comparing candidate commit 4091ae5 in PR branch andrew/fix-off-by-one-error-in-encoder with baseline commit 9c344fa in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472

Found 5 performance improvements and 2 performance regressions! Performance is the same for 50 metrics, 15 unstable metrics, 88 known flaky benchmarks, 38 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_SetActive net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-7.321%; -7.312%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 throughput [-64084.956op/s; -57734.113op/s] or [-43.534%; -39.220%]
  • 🟩 execution_time [-54.155ms; -40.695ms] or [-26.874%; -20.195%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟩 execution_time [-98.120ms; -95.878ms] or [-49.001%; -47.881%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0

  • 🟥 throughput [-60099.241op/s; -45008.300op/s] or [-30.134%; -22.567%]
  • 🟩 execution_time [-72.542ms; -53.430ms] or [-36.687%; -27.021%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0

  • unstable execution_time [-30.486ms; +17.166ms] or [-19.940%; +11.228%]
  • unstable throughput [-54607.315op/s; -3628.370op/s] or [-26.268%; -1.745%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [-33.690ms; -8.778ms] or [-30.128%; -7.850%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-32.190ms; +4.771ms] or [-20.656%; +3.062%]
  • unstable throughput [-9213.465op/s; +14850.250op/s] or [-6.228%; +10.039%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [+10.527ms; +35.013ms] or [+11.775%; +39.166%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-72.519ms; -42.218ms] or [-37.531%; -21.850%]
  • unstable throughput [+24537.738op/s; +40768.475op/s] or [+22.849%; +37.963%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-32.989ms; -7.416ms] or [-29.767%; -6.692%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [+2.356ms; +29.869ms] or [+1.680%; +21.295%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [-19.344ms; +16.518ms] or [-17.450%; +14.901%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-14.509ms; +24.341ms] or [-9.391%; +15.755%]
  • unstable throughput [-14085.184op/s; +17728.344op/s] or [-8.726%; +10.984%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-33.932ms; -8.667ms] or [-30.415%; -7.768%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • unstable execution_time [+22.844ms; +54.910ms] or [+17.722%; +42.598%]
  • unstable throughput [-35491.977op/s; -13213.156op/s] or [-20.766%; -7.731%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [-44.199ms; -4.727ms] or [-32.884%; -3.517%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-7.698%; -7.691%]
  • unstable execution_time [-11.204ms; +17.727ms] or [-7.306%; +11.559%]
  • unstable throughput [-12379.100op/s; +6061.096op/s] or [-8.715%; +4.267%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [-15.209ms; +20.259ms] or [-13.981%; +18.624%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-6.896ms; +17.113ms] or [-5.016%; +12.447%]
  • unstable throughput [+2051.338op/s; +18221.925op/s] or [+1.269%; +11.274%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-5.210%; -5.202%]
  • unstable execution_time [+59.098ms; +95.563ms] or [+50.807%; +82.157%]
  • unstable throughput [-55946.305op/s; -30925.922op/s] or [-44.237%; -24.453%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [+9.060ms; +38.721ms] or [+6.409%; +27.393%]
  • unstable throughput [-18581.417op/s; -4182.293op/s] or [-14.545%; -3.274%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-11.417ms; +13.759ms] or [-8.184%; +9.862%]
  • unstable throughput [-29697.903op/s; -6955.173op/s] or [-16.541%; -3.874%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [+51.534ms; +83.231ms] or [+57.622%; +93.064%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [+36.098ms; +76.468ms] or [+25.797%; +54.646%]
  • unstable throughput [-38448.663op/s; -8275.451op/s] or [-23.173%; -4.988%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-40.451ms; -0.547ms] or [-30.620%; -0.414%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7254.822op/s; -6098.781op/s] or [-8.602%; -7.231%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • unstable execution_time [-47.625ms; -12.986ms] or [-23.760%; -6.479%]
  • unstable throughput [-53968.169op/s; -37940.529op/s] or [-45.362%; -31.891%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • unstable execution_time [-71.079ms; -42.767ms] or [-35.750%; -21.510%]
  • 🟥 throughput [-6316.990op/s; -5140.026op/s] or [-6.423%; -5.226%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+316.776ms; +332.367ms] or [+157.195%; +164.932%]
  • 🟥 throughput [-56.357op/s; -43.632op/s] or [-10.140%; -7.850%]

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

  • unstable execution_time [+106.131ms; +123.437ms] or [+83.850%; +97.523%]

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

  • 🟥 execution_time [+83.436ms; +84.527ms] or [+73.838%; +74.803%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • unstable execution_time [-63.447ms; -40.626ms] or [-29.632%; -18.974%]
  • unstable throughput [-22558.949op/s; -7567.241op/s] or [-16.467%; -5.524%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-47.501ms; -27.483ms] or [-22.620%; -13.087%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-263229.632op/s; -254502.152op/s] or [-26.877%; -25.986%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-86.179ms; -54.535ms] or [-38.432%; -24.320%]
  • unstable throughput [-277459.082op/s; -149493.025op/s] or [-29.641%; -15.971%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-64.249ms; -39.484ms] or [-32.070%; -19.709%]
  • 🟥 throughput [-118483.080op/s; -102453.270op/s] or [-17.024%; -14.721%]

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

  • 🟩 execution_time [-34.205ms; -15.690ms] or [-17.258%; -7.916%]
  • 🟥 throughput [-27433.841op/s; -13086.465op/s] or [-17.456%; -8.327%]

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

  • 🟩 execution_time [-71.589ms; -67.425ms] or [-36.498%; -34.376%]
  • 🟩 throughput [+11675.303op/s; +14353.540op/s] or [+9.301%; +11.434%]

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

  • unstable execution_time [-58.715ms; -37.481ms] or [-29.030%; -18.532%]
  • unstable throughput [-222083.508op/s; +146081.040op/s] or [-7.405%; +4.871%]

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

  • 🟩 execution_time [-45.290ms; -24.531ms] or [-20.877%; -11.308%]
  • 🟩 throughput [+172475.489op/s; +228347.634op/s] or [+6.846%; +9.064%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+302.053ms; +316.447ms] or [+150.925%; +158.118%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • unstable execution_time [+205.102ms; +254.258ms] or [+103.433%; +128.223%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • unstable execution_time [+214.470ms; +259.808ms] or [+108.034%; +130.871%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+298.959ms; +312.706ms] or [+146.837%; +153.589%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+244.803ms; +261.074ms] or [+119.675%; +127.629%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+276.357ms; +291.343ms] or [+138.123%; +145.613%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+21.054µs; +44.819µs] or [+6.722%; +14.308%]
  • 🟥 throughput [-418.238op/s; -218.309op/s] or [-13.038%; -6.805%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.118ms; +300.851ms] or [+149.789%; +150.156%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • unstable execution_time [+356.829ms; +370.865ms] or [+387.709%; +402.960%]
  • 🟥 throughput [-6843.529op/s; -6661.874op/s] or [-56.234%; -54.742%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+278.661ms; +320.419ms] or [+211.585%; +243.291%]
  • 🟥 throughput [-1270.618op/s; -1046.027op/s] or [-12.300%; -10.126%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+301.194ms; +316.744ms] or [+138.486%; +145.636%]
  • 🟥 throughput [-685.709op/s; -668.469op/s] or [-62.132%; -60.570%]

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

  • unstable execution_time [-52.754ms; +80.911ms] or [-22.481%; +34.481%]
  • 🟥 throughput [-703.165op/s; -613.038op/s] or [-46.901%; -40.890%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+337.363ms; +345.462ms] or [+201.782%; +206.626%]
  • 🟥 throughput [-723.061op/s; -689.101op/s] or [-50.346%; -47.981%]

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

  • 🟥 execution_time [+107.009µs; +128.404µs] or [+7.351%; +8.821%]
  • 🟥 throughput [-55.318op/s; -46.790op/s] or [-8.052%; -6.811%]

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

  • 🟩 throughput [+48.275op/s; +56.834op/s] or [+5.205%; +6.128%]

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

  • 🟩 execution_time [-197.639µs; -169.294µs] or [-10.012%; -8.576%]
  • 🟩 throughput [+48.065op/s; +56.594op/s] or [+9.488%; +11.172%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+307.186ms; +321.307ms] or [+154.693%; +161.804%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+241.483ms; +259.687ms] or [+121.007%; +130.130%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+301.112ms; +309.312ms] or [+151.266%; +155.385%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+305.851ms; +319.777ms] or [+153.588%; +160.582%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • unstable execution_time [+217.835ms; +241.044ms] or [+107.710%; +119.185%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+306.202ms; +313.809ms] or [+155.197%; +159.052%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.151ms; +313.562ms] or [+151.652%; +157.380%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+303.087ms; +309.830ms] or [+151.061%; +154.422%]
  • 🟩 throughput [+32218.700op/s; +42136.348op/s] or [+6.398%; +8.367%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+301.001ms; +308.681ms] or [+149.745%; +153.566%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • unstable execution_time [-70.458ms; -42.307ms] or [-32.763%; -19.673%]
  • unstable throughput [-140173.293op/s; -93315.230op/s] or [-38.453%; -25.599%]

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

  • unstable execution_time [-88.384ms; -65.352ms] or [-44.335%; -32.781%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-24.746KB; -24.724KB] or [-9.027%; -9.019%]
  • unstable execution_time [-64.845µs; -7.741µs] or [-12.816%; -1.530%]
  • unstable throughput [+49.462op/s; +257.036op/s] or [+2.468%; +12.826%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 throughput [+94.140op/s; +246.002op/s] or [+5.378%; +14.054%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472

  • 🟥 allocated_mem [+8.190KB; +8.196KB] or [+16.663%; +16.675%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+2.693µs; +7.418µs] or [+6.365%; +17.533%]
  • 🟥 throughput [-3380.638op/s; -1404.248op/s] or [-14.231%; -5.911%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-11.870µs; -1.928µs] or [-18.416%; -2.992%]
  • unstable throughput [+708.222op/s; +2735.452op/s] or [+4.345%; +16.783%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+304.965ms; +318.716ms] or [+154.146%; +161.097%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+304.083ms; +310.893ms] or [+154.777%; +158.244%]

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

  • 🟥 execution_time [+297.998ms; +303.331ms] or [+149.185%; +151.855%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • unstable execution_time [-64.109ms; -33.783ms] or [-32.045%; -16.886%]
  • unstable throughput [-205249.249op/s; -119468.501op/s] or [-38.849%; -22.613%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • unstable execution_time [-58.407ms; -27.071ms] or [-29.607%; -13.722%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.562ms; +313.268ms] or [+149.803%; +156.136%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+305.220ms; +311.048ms] or [+153.267%; +156.193%]

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

  • 🟥 execution_time [+301.211ms; +307.893ms] or [+152.755%; +156.144%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.806ms; +300.544ms] or [+149.545%; +149.913%]
  • 🟩 throughput [+60066937.569op/s; +60381789.809op/s] or [+43.744%; +43.974%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • unstable execution_time [+374.324ms; +401.381ms] or [+465.539%; +499.189%]
  • 🟥 throughput [-7558.836op/s; -7232.853op/s] or [-58.434%; -55.914%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+303.257ms; +306.076ms] or [+151.258%; +152.664%]
  • 🟥 throughput [-29992109.900op/s; -28583431.346op/s] or [-13.285%; -12.661%]

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

  • 🟩 execution_time [-102.312ms; -100.944ms] or [-50.110%; -49.441%]
  • 🟩 throughput [+70720.098op/s; +82834.406op/s] or [+6.603%; +7.734%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 execution_time [-99.864ms; -95.744ms] or [-50.532%; -48.447%]
  • 🟩 throughput [+57039.479op/s; +77451.833op/s] or [+6.602%; +8.965%]

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

  • unstable execution_time [-78.182ms; -55.065ms] or [-40.733%; -28.689%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • unstable execution_time [-54.401ms; -27.132ms] or [-26.728%; -13.330%]
  • 🟩 throughput [+87609.386op/s; +99904.202op/s] or [+8.701%; +9.922%]

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

  • unstable execution_time [-26.176ms; +0.278ms] or [-13.072%; +0.139%]
  • unstable throughput [-174711.996op/s; -93584.172op/s] or [-31.725%; -16.993%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • unstable execution_time [-70.470ms; -43.645ms] or [-35.407%; -21.929%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • unstable execution_time [-98.818ms; -75.831ms] or [-49.427%; -37.929%]
  • unstable throughput [-92699.815op/s; +21810.694op/s] or [-10.357%; +2.437%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • unstable execution_time [-76.028ms; -47.167ms] or [-38.614%; -23.955%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

foreach (var val in enumerable)
{
if (idx > childrenCount)
if (idx >= childrenCount)

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.

I would say that this fixes a bug that could be serious especially in an unsafe context. idx could keep climbing past childrenCount and write past the end of childrenData, right?

@andrewlock
andrewlock merged commit ae56c84 into master May 19, 2026
136 checks passed
@andrewlock
andrewlock deleted the andrew/fix-off-by-one-error-in-encoder branch May 19, 2026 11:12
@github-actions github-actions Bot added this to the vNext-v3 milestone May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants