[Code Origin] Improve ASP.NET Core code origin endpoint detection#8595
Conversation
andrewlock
left a comment
There was a problem hiding this comment.
Thanks for extracting this from #8272, makes it much easier to reason about!
One thing that's tricky to follow (not your fault, just the way it works 😅) is whether for MVC apps we're running the code origin code twice - once in onendpointrouting and once in mvcbeforeaction? 🤔 If so, we can probably skip the latter if/when we know the former has executed?
BenchmarksBenchmark execution time: 2026-05-11 13:05:42 Comparing candidate commit 432aa38 in PR branch 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 💥💥💥 Scenarios present only in baseline:
Found 1 performance improvements and 5 performance regressions! Performance is the same for 47 metrics, 19 unstable metrics, 89 known flaky benchmarks, 37 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8595) 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 (8595) - mean (73ms) : 70, 76
master - mean (75ms) : 70, 79
section Bailout
This PR (8595) - mean (78ms) : 74, 83
master - mean (78ms) : 76, 80
section CallTarget+Inlining+NGEN
This PR (8595) - mean (1,131ms) : 1081, 1181
master - mean (1,124ms) : 1081, 1168
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 (8595) - mean (116ms) : 111, 122
master - mean (113ms) : 110, 117
section Bailout
This PR (8595) - mean (118ms) : 109, 127
master - mean (118ms) : 112, 124
section CallTarget+Inlining+NGEN
This PR (8595) - mean (807ms) : 779, 834
master - mean (810ms) : 782, 838
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8595) - mean (104ms) : 98, 110
master - mean (102ms) : 98, 106
section Bailout
This PR (8595) - mean (105ms) : 99, 111
master - mean (104ms) : 99, 110
section CallTarget+Inlining+NGEN
This PR (8595) - mean (950ms) : 914, 987
master - mean (944ms) : 909, 980
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8595) - mean (99ms) : 97, 102
master - mean (100ms) : 97, 104
section Bailout
This PR (8595) - mean (103ms) : 98, 108
master - mean (103ms) : 99, 108
section CallTarget+Inlining+NGEN
This PR (8595) - mean (836ms) : 782, 891
master - mean (833ms) : 792, 874
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 (8595) - mean (194ms) : 190, 197
master - mean (196ms) : 192, 199
section Bailout
This PR (8595) - mean (198ms) : 195, 201
master - mean (198ms) : 196, 201
section CallTarget+Inlining+NGEN
This PR (8595) - mean (1,216ms) : 1176, 1257
master - mean (1,209ms) : 1158, 1259
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 (8595) - mean (279ms) : 272, 285
master - mean (279ms) : 274, 285
section Bailout
This PR (8595) - mean (277ms) : 273, 281
master - mean (279ms) : 276, 283
section CallTarget+Inlining+NGEN
This PR (8595) - mean (958ms) : 938, 977
master - mean (962ms) : 934, 990
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8595) - mean (271ms) : 267, 276
master - mean (271ms) : 267, 275
section Bailout
This PR (8595) - mean (272ms) : 268, 276
master - mean (271ms) : 268, 274
section CallTarget+Inlining+NGEN
This PR (8595) - mean (1,151ms) : 1112, 1191
master - mean (1,147ms) : 1107, 1187
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8595) - mean (269ms) : 265, 274
master - mean (273ms) : 267, 278
section Bailout
This PR (8595) - mean (269ms) : 266, 272
master - mean (269ms) : 266, 273
section CallTarget+Inlining+NGEN
This PR (8595) - mean (1,024ms) : 981, 1067
master - mean (1,022ms) : 986, 1059
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a70f0aa to
432aa38
Compare
Summary of changes
AspNetCoreEndpointCodeOriginhelper used by both ASP.NET Core diagnostic observers.[AcceptVerbs]or method-level[Route].Reason for change
[AcceptVerbs]or method-level[Route]were missing from endpoint method detection.Implementation details
RequestDelegate.Methodpath and adds the reviewed fallback throughRequestDelegate.Target.handler.EndpointDetectorto matchAcceptVerbsAttributeandRouteAttribute.Test coverage
AspNetCoreDiagnosticObserverTests