-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor refactor in ThreadAbortCodeFixProvider
#6673
Conversation
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:
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.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (69ms) : 66, 71
. : milestone, 69,
master - mean (69ms) : 66, 71
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (1,000ms) : 978, 1022
. : milestone, 1000,
master - mean (996ms) : 972, 1019
. : milestone, 996,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (102ms) : 99, 104
. : milestone, 102,
master - mean (101ms) : 99, 103
. : milestone, 101,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (672ms) : 653, 691
. : milestone, 672,
master - mean (675ms) : 660, 691
. : milestone, 675,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (89ms) : 87, 90
. : milestone, 89,
master - mean (89ms) : 87, 91
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (634ms) : 606, 662
. : milestone, 634,
master - mean (634ms) : 614, 654
. : milestone, 634,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (191ms) : 188, 195
. : milestone, 191,
master - mean (191ms) : 187, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (1,109ms) : 1079, 1138
. : milestone, 1109,
master - mean (1,113ms) : 1085, 1140
. : milestone, 1113,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (272ms) : 267, 277
. : milestone, 272,
master - mean (271ms) : 266, 276
. : milestone, 271,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (863ms) : 837, 889
. : milestone, 863,
master - mean (868ms) : 837, 898
. : milestone, 868,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6673) - mean (263ms) : 260, 267
. : milestone, 263,
master - mean (262ms) : 258, 267
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (6673) - mean (845ms) : 809, 881
. : milestone, 845,
master - mean (848ms) : 818, 878
. : milestone, 848,
|
Benchmarks Report for tracer 🐌Benchmarks for #6673 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.115 | 605.69 | 543.24 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 397ns | 0.466ns | 1.8ns | 0.00815 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 607ns | 0.892ns | 3.45ns | 0.0076 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 589ns | 0.939ns | 3.51ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 485ns | 0.717ns | 2.78ns | 0.00983 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 742ns | 2.23ns | 8.62ns | 0.00941 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 828ns | 1.73ns | 6.72ns | 0.104 | 0 | 0 | 658 B |
#6673 | StartFinishSpan |
net6.0 | 410ns | 0.638ns | 2.47ns | 0.00812 | 0 | 0 | 576 B |
#6673 | StartFinishSpan |
netcoreapp3.1 | 543ns | 0.943ns | 3.65ns | 0.00795 | 0 | 0 | 576 B |
#6673 | StartFinishSpan |
net472 | 577ns | 0.851ns | 3.3ns | 0.0917 | 0 | 0 | 578 B |
#6673 | StartFinishScope |
net6.0 | 479ns | 0.881ns | 3.41ns | 0.00975 | 0 | 0 | 696 B |
#6673 | StartFinishScope |
netcoreapp3.1 | 742ns | 1.05ns | 4.06ns | 0.00908 | 0 | 0 | 696 B |
#6673 | StartFinishScope |
net472 | 792ns | 1.4ns | 5.43ns | 0.104 | 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 | 643ns | 0.873ns | 3.38ns | 0.0096 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 947ns | 1.87ns | 7.23ns | 0.00917 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.09μs | 2.22ns | 8.29ns | 0.105 | 0 | 0 | 658 B |
#6673 | RunOnMethodBegin |
net6.0 | 620ns | 0.368ns | 1.42ns | 0.00988 | 0 | 0 | 696 B |
#6673 | RunOnMethodBegin |
netcoreapp3.1 | 885ns | 0.325ns | 1.26ns | 0.00933 | 0 | 0 | 696 B |
#6673 | RunOnMethodBegin |
net472 | 1.06μs | 0.4ns | 1.5ns | 0.104 | 0 | 0 | 658 B |
Summary of changes
Don't re-do work in code fix
Reason for change
Was looking at something else, and noticed that this was doing more work than necessary
Implementation details
The diagnostic is already located at the "problematic" catch, so we don't need to try finding it again in the code fix
Test coverage
There are existing unit tests for this, and they all pass, so