Split IDuckTypeTask into separate Task and ValueTask duck types#8389
Split IDuckTypeTask into separate Task and ValueTask duck types#8389
Conversation
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
BenchmarksBenchmark execution time: 2026-03-30 20:38:05 Comparing candidate commit 8d69c1c in PR branch Found 7 performance improvements and 11 performance regressions! Performance is the same for 258 metrics, 12 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8389) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8389) - mean (72ms) : 70, 74
master - mean (72ms) : 70, 74
section Bailout
This PR (8389) - mean (76ms) : 75, 78
master - mean (76ms) : 74, 78
section CallTarget+Inlining+NGEN
This PR (8389) - mean (1,083ms) : 1019, 1148
master - mean (1,078ms) : 1030, 1127
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 (8389) - mean (112ms) : 108, 115
master - mean (112ms) : 108, 116
section Bailout
This PR (8389) - mean (113ms) : 110, 116
master - mean (113ms) : 110, 116
section CallTarget+Inlining+NGEN
This PR (8389) - mean (796ms) : 779, 814
master - mean (795ms) : 778, 812
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8389) - mean (99ms) : 96, 102
master - mean (100ms) : 95, 105
section Bailout
This PR (8389) - mean (100ms) : 97, 103
master - mean (100ms) : 98, 103
section CallTarget+Inlining+NGEN
This PR (8389) - mean (944ms) : 901, 986
master - mean (948ms) : 907, 989
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8389) - mean (99ms) : 95, 103
master - mean (98ms) : 95, 102
section Bailout
This PR (8389) - mean (101ms) : 98, 103
master - mean (100ms) : 97, 102
section CallTarget+Inlining+NGEN
This PR (8389) - mean (831ms) : 791, 871
master - mean (829ms) : 795, 862
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 (8389) - mean (214ms) : 208, 220
master - mean (214ms) : 209, 219
section Bailout
This PR (8389) - mean (217ms) : 214, 220
master - mean (217ms) : 211, 223
section CallTarget+Inlining+NGEN
This PR (8389) - mean (1,242ms) : 1186, 1297
master - mean (1,258ms) : 1211, 1305
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 (8389) - mean (305ms) : 298, 312
master - mean (310ms) : 303, 316
section Bailout
This PR (8389) - mean (310ms) : 303, 317
master - mean (312ms) : 305, 320
section CallTarget+Inlining+NGEN
This PR (8389) - mean (1,038ms) : 1013, 1063
master - mean (1,035ms) : 1001, 1070
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8389) - mean (302ms) : 293, 312
master - mean (305ms) : 296, 315
section Bailout
This PR (8389) - mean (300ms) : 294, 306
master - mean (304ms) : 298, 310
section CallTarget+Inlining+NGEN
This PR (8389) - mean (1,200ms) : 1164, 1236
master - mean (1,205ms) : 1169, 1242
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8389) - mean (299ms) : 291, 307
master - mean (301ms) : 291, 311
section Bailout
This PR (8389) - mean (299ms) : 294, 305
master - mean (302ms) : 294, 310
section CallTarget+Inlining+NGEN
This PR (8389) - mean (1,128ms) : 1000, 1255
master - mean (1,127ms) : 1013, 1241
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary of changes
Create
IDuckTypeValueTask<T>/IDuckTypeValueTaskforValueTasktargets, and re-addTaskStatus StatustoIDuckTypeTaskfor Task targets. Update XUnit V3 to use the ValueTask variant.Reason for change
This is a follow up to #8366 in which Kafka was failing on .NET Framework due to not having access to the
IsCompletedSuccessfullyproperty on the Task. Initially, I attempted to swap to use aTaskStatus Statusinstead, but that then caused the xUnit integration tests to start failing as they are actuallyValueTaskand notTaskwhichValueTasklack theTaskStatusImplementation details
TaskStatusto theIDuckTask/IDuckTask<T>IValueTaskDuck/IValueTaskDuck<T>withIsCompletedSuccessfullyIValueTaskDuckKafkaHelperto useTaskStatusTest coverage
Other details
#8366