-
Notifications
You must be signed in to change notification settings - Fork 150
Use RuntimeHelpers.GetHashCode in IndexObject #7678
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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.
ℹ️ 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".
This comment has been minimized.
This comment has been minimized.
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.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (75ms) : 73, 78
. : milestone, 75,
master - mean (75ms) : 74, 76
. : milestone, 75,
section Baseline
This PR (7678) - mean (71ms) : 69, 73
. : milestone, 71,
master - mean (71ms) : 69, 73
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (1,065ms) : 1005, 1125
. : milestone, 1065,
master - mean (1,069ms) : 1007, 1131
. : milestone, 1069,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (112ms) : 109, 114
. : milestone, 112,
master - mean (112ms) : 109, 114
. : milestone, 112,
section Baseline
This PR (7678) - mean (111ms) : 108, 113
. : milestone, 111,
master - mean (111ms) : 108, 113
. : milestone, 111,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (776ms) : 728, 825
. : milestone, 776,
master - mean (761ms) : 735, 788
. : milestone, 761,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (102ms) : 101, 104
. : milestone, 102,
master - mean (103ms) : 101, 105
. : milestone, 103,
section Baseline
This PR (7678) - mean (100ms) : 96, 104
. : milestone, 100,
master - mean (100ms) : 96, 104
. : milestone, 100,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (720ms) : 678, 762
. : milestone, 720,
master - mean (721ms) : 681, 761
. : milestone, 721,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (98ms) : 96, 100
. : milestone, 98,
master - mean (98ms) : 96, 101
. : milestone, 98,
section Baseline
This PR (7678) - mean (97ms) : 93, 102
. : milestone, 97,
master - mean (97ms) : 94, 100
. : milestone, 97,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (669ms) : 658, 680
. : milestone, 669,
master - mean (679ms) : 664, 693
. : milestone, 679,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (197ms) : 194, 200
. : milestone, 197,
master - mean (197ms) : 194, 200
. : milestone, 197,
section Baseline
This PR (7678) - mean (194ms) : 189, 199
. : milestone, 194,
master - mean (194ms) : 190, 197
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (1,173ms) : 1098, 1249
. : milestone, 1173,
master - mean (1,166ms) : 1111, 1220
. : milestone, 1166,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (278ms) : 274, 281
. : milestone, 278,
section Baseline
This PR (7678) - mean (277ms) : 273, 281
. : milestone, 277,
master - mean (278ms) : 273, 283
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (943ms) : 894, 991
. : milestone, 943,
master - mean (947ms) : 898, 996
. : milestone, 947,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (271ms) : 267, 274
. : milestone, 271,
master - mean (271ms) : 268, 274
. : milestone, 271,
section Baseline
This PR (7678) - mean (270ms) : 266, 275
. : milestone, 270,
master - mean (272ms) : 266, 278
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (926ms) : 875, 976
. : milestone, 926,
master - mean (935ms) : 873, 996
. : milestone, 935,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7678) - mean (270ms) : 267, 274
. : milestone, 270,
master - mean (271ms) : 266, 276
. : milestone, 271,
section Baseline
This PR (7678) - mean (271ms) : 265, 277
. : milestone, 271,
master - mean (269ms) : 265, 274
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (7678) - mean (853ms) : 831, 875
. : milestone, 853,
master - mean (861ms) : 836, 886
. : milestone, 861,
|
|
@bouwkast, wondering why you closed this one? There was a bug in the implementation (highlighted by codex) that would explain why the tests failed, if that's the reason? |
I'm not confident that what I'm doing here makes sense is mainly why I closed it. |
|
@codex review |
There was a problem hiding this comment.
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.
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
c31c21c to
c4d854e
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7678 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 ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 | 5.51 KB | 5.48 KB | -33 B | -0.60% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.6μs | 57ns | 317ns | 0 | 0 | 0 | 5.51 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 14.5μs | 74ns | 331ns | 0 | 0 | 0 | 5.68 KB |
| master | StartStopWithChild |
net472 | 22.3μs | 124ns | 849ns | 0.861 | 0.215 | 0 | 6.06 KB |
| #7678 | StartStopWithChild |
net6.0 | 10.4μs | 59.2ns | 443ns | 0 | 0 | 0 | 5.48 KB |
| #7678 | StartStopWithChild |
netcoreapp3.1 | 13.9μs | 73.6ns | 368ns | 0 | 0 | 0 | 5.66 KB |
| #7678 | StartStopWithChild |
net472 | 21.4μs | 120ns | 796ns | 0.982 | 0.327 | 0.109 | 6.05 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 938μs | 255ns | 988ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.05ms | 224ns | 840ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.18ms | 90.7ns | 327ns | 0 | 0 | 0 | 3.31 KB |
| #7678 | WriteAndFlushEnrichedTraces |
net6.0 | 945μs | 149ns | 515ns | 0 | 0 | 0 | 2.71 KB |
| #7678 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 221ns | 858ns | 0 | 0 | 0 | 2.7 KB |
| #7678 | WriteAndFlushEnrichedTraces |
net472 | 1.18ms | 391ns | 1.46μs | 0 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 More allocations ⚠️
More allocations ⚠️ in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0
0 b
179.56 KB
179.56 KB
∞
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1
0 b
185.32 KB
185.32 KB
∞
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472
0 b
205.41 KB
205.41 KB
∞
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0
0 b
183.08 KB
183.08 KB
∞
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1
0 b
188.75 KB
188.75 KB
∞
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472
0 b
208.94 KB
208.94 KB
∞
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 | 0 b | 179.56 KB | 179.56 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 | 0 b | 185.32 KB | 185.32 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 | 0 b | 205.41 KB | 205.41 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 | 0 b | 183.08 KB | 183.08 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 | 0 b | 188.75 KB | 188.75 KB | ∞ |
| Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 | 0 b | 208.94 KB | 208.94 KB | ∞ |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleSimpleBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | AllCycleMoreComplexBody |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | ObjectExtractorSimpleBody |
net6.0 | 320ns | 0.151ns | 0.566ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 397ns | 2.1ns | 10.7ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 300ns | 1.07ns | 3.87ns | 0.0446 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.46μs | 6.85ns | 26.5ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.9μs | 1.36ns | 5.25ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.71μs | 2.98ns | 10.7ns | 0.572 | 0 | 0 | 3.8 KB |
| #7678 | AllCycleSimpleBody |
net6.0 | 352μs | 994ns | 3.72μs | 0 | 0 | 0 | 179.56 KB |
| #7678 | AllCycleSimpleBody |
netcoreapp3.1 | 501μs | 1.46μs | 5.65μs | 0 | 0 | 0 | 185.32 KB |
| #7678 | AllCycleSimpleBody |
net472 | 467μs | 119ns | 463ns | 32.4 | 0 | 0 | 205.41 KB |
| #7678 | AllCycleMoreComplexBody |
net6.0 | 362μs | 1.54μs | 5.75μs | 0 | 0 | 0 | 183.08 KB |
| #7678 | AllCycleMoreComplexBody |
netcoreapp3.1 | 529μs | 1.51μs | 5.24μs | 0 | 0 | 0 | 188.75 KB |
| #7678 | AllCycleMoreComplexBody |
net472 | 478μs | 82.8ns | 321ns | 32.4 | 0 | 0 | 208.94 KB |
| #7678 | ObjectExtractorSimpleBody |
net6.0 | 323ns | 1.8ns | 11.5ns | 0 | 0 | 0 | 280 B |
| #7678 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 400ns | 2.09ns | 10.7ns | 0 | 0 | 0 | 272 B |
| #7678 | ObjectExtractorSimpleBody |
net472 | 305ns | 0.0144ns | 0.052ns | 0.0438 | 0 | 0 | 281 B |
| #7678 | ObjectExtractorMoreComplexBody |
net6.0 | 6.29μs | 17.4ns | 67.4ns | 0 | 0 | 0 | 3.78 KB |
| #7678 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.81μs | 26.9ns | 100ns | 0 | 0 | 0 | 3.69 KB |
| #7678 | ObjectExtractorMoreComplexBody |
net472 | 6.64μs | 3.46ns | 13.4ns | 0.598 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.6μs | 136ns | 526ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.7μs | 277ns | 1.07μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 109μs | 13.9ns | 53.7ns | 4.91 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 142μs | 50ns | 194ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 273ns | 1.06μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 262μs | 150ns | 579ns | 0 | 0 | 0 | 2.16 KB |
| #7678 | EncodeArgs |
net6.0 | 76.5μs | 32.6ns | 126ns | 0 | 0 | 0 | 32.4 KB |
| #7678 | EncodeArgs |
netcoreapp3.1 | 96.3μs | 249ns | 965ns | 0 | 0 | 0 | 32.4 KB |
| #7678 | EncodeArgs |
net472 | 108μs | 11.3ns | 42.4ns | 4.86 | 0 | 0 | 32.51 KB |
| #7678 | EncodeLegacyArgs |
net6.0 | 145μs | 117ns | 439ns | 0 | 0 | 0 | 2.14 KB |
| #7678 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 210ns | 787ns | 0 | 0 | 0 | 2.14 KB |
| #7678 | EncodeLegacyArgs |
net472 | 272μs | 24.3ns | 94.1ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7678
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.108
410,639.27
865,678.02
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.108 | 410,639.27 | 865,678.02 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 390μs | 52.6ns | 197ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 294ns | 1.14μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 430μs | 40.9ns | 158ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 45.8ns | 177ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 300μs | 367ns | 1.27μs | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 311μs | 30.8ns | 119ns | 0 | 0 | 0 | 2.29 KB |
| #7678 | RunWafRealisticBenchmark |
net6.0 | 392μs | 67.5ns | 253ns | 0 | 0 | 0 | 4.55 KB |
| #7678 | RunWafRealisticBenchmark |
netcoreapp3.1 | 842μs | 8.14μs | 80.6μs | 0 | 0 | 0 | 4.48 KB |
| #7678 | RunWafRealisticBenchmark |
net472 | 428μs | 68.9ns | 267ns | 0 | 0 | 0 | 4.66 KB |
| #7678 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 32.4ns | 125ns | 0 | 0 | 0 | 2.24 KB |
| #7678 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 301μs | 51.5ns | 193ns | 0 | 0 | 0 | 2.22 KB |
| #7678 | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 29.3ns | 106ns | 0 | 0 | 0 | 2.29 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 61.2μs | 53.8ns | 194ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.1μs | 70.3ns | 272ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00335ns | 0.00152ns | 0.00591ns | 0 | 0 | 0 | 0 b |
| #7678 | SendRequest |
net6.0 | 61.3μs | 52.5ns | 189ns | 0 | 0 | 0 | 14.52 KB |
| #7678 | SendRequest |
netcoreapp3.1 | 71.1μs | 79.4ns | 286ns | 0 | 0 | 0 | 17.42 KB |
| #7678 | SendRequest |
net472 | 0.00307ns | 0.00159ns | 0.00617ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
28 B
1 B
-27 B
-96.43%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 28 B | 1 B | -27 B | -96.43% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 5.47μs | 20.5μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.14ms | 9.36μs | 36.2μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.65ms | 95.6ns | 345ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.37ms | 109ns | 406ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.68ms | 270ns | 1.04μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 2.09ms | 339ns | 1.31μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 877μs | 29.4ns | 110ns | 0 | 0 | 0 | 5 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 854μs | 158ns | 613ns | 0 | 0 | 0 | 28 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 65.9ns | 247ns | 0 | 0 | 0 | 0 b |
| #7678 | OriginalCharSlice |
net6.0 | 1.89ms | 1.78μs | 6.67μs | 0 | 0 | 0 | 640.01 KB |
| #7678 | OriginalCharSlice |
netcoreapp3.1 | 2.17ms | 10.6μs | 42.5μs | 0 | 0 | 0 | 640 KB |
| #7678 | OriginalCharSlice |
net472 | 2.68ms | 412ns | 1.43μs | 100 | 0 | 0 | 641.95 KB |
| #7678 | OptimizedCharSlice |
net6.0 | 1.39ms | 275ns | 1.03μs | 0 | 0 | 0 | 4 B |
| #7678 | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 629ns | 2.35μs | 0 | 0 | 0 | 1 B |
| #7678 | OptimizedCharSlice |
net472 | 2.08ms | 315ns | 1.22μs | 0 | 0 | 0 | 0 b |
| #7678 | OptimizedCharSliceWithPool |
net6.0 | 801μs | 55.2ns | 214ns | 0 | 0 | 0 | 5 B |
| #7678 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 813μs | 143ns | 555ns | 0 | 0 | 0 | 1 B |
| #7678 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 151ns | 585ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.82 KB
42.09 KB
269 B
0.64%
Fewer allocations 🎉 in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.39 KB
56.08 KB
-306 B
-0.54%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.82 KB | 42.09 KB | 269 B | 0.64% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.39 KB | 56.08 KB | -306 B | -0.54% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 673μs | 1.78μs | 6.88μs | 0 | 0 | 0 | 41.82 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 689μs | 3.94μs | 30.7μs | 0 | 0 | 0 | 42.11 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 873μs | 3.13μs | 11.7μs | 8.33 | 0 | 0 | 56.39 KB |
| #7678 | WriteAndFlushEnrichedTraces |
net6.0 | 686μs | 3.93μs | 29.9μs | 0 | 0 | 0 | 42.09 KB |
| #7678 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 679μs | 3.95μs | 35.8μs | 0 | 0 | 0 | 41.99 KB |
| #7678 | WriteAndFlushEnrichedTraces |
net472 | 907μs | 2.44μs | 9.44μs | 8.33 | 0 | 0 | 56.08 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.92μs | 9.15ns | 36.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.59μs | 9.16ns | 35.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.76μs | 1.13ns | 4.07ns | 0.15 | 0.0137 | 0 | 987 B |
| #7678 | ExecuteNonQuery |
net6.0 | 1.93μs | 9.15ns | 38.8ns | 0 | 0 | 0 | 1.02 KB |
| #7678 | ExecuteNonQuery |
netcoreapp3.1 | 2.59μs | 12.2ns | 48.7ns | 0 | 0 | 0 | 1.02 KB |
| #7678 | ExecuteNonQuery |
net472 | 2.87μs | 4.17ns | 16.2ns | 0.144 | 0.0144 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.71μs | 8.98ns | 44.9ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.18μs | 10.7ns | 47.8ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.61μs | 2.37ns | 8.87ns | 0.163 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.88μs | 9.66ns | 44.3ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.35μs | 10.7ns | 39.9ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.81μs | 6.09ns | 22.8ns | 0.172 | 0 | 0 | 1.1 KB |
| #7678 | CallElasticsearch |
net6.0 | 1.82μs | 9.25ns | 45.3ns | 0 | 0 | 0 | 1.03 KB |
| #7678 | CallElasticsearch |
netcoreapp3.1 | 2.4μs | 8.58ns | 33.2ns | 0 | 0 | 0 | 1.03 KB |
| #7678 | CallElasticsearch |
net472 | 3.53μs | 3.25ns | 12.6ns | 0.16 | 0 | 0 | 1.04 KB |
| #7678 | CallElasticsearchAsync |
net6.0 | 1.87μs | 0.996ns | 3.86ns | 0 | 0 | 0 | 1.01 KB |
| #7678 | CallElasticsearchAsync |
netcoreapp3.1 | 2.43μs | 9.88ns | 37ns | 0 | 0 | 0 | 1.08 KB |
| #7678 | CallElasticsearchAsync |
net472 | 3.67μs | 3.17ns | 11.9ns | 0.165 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.88μs | 8.1ns | 31.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.49μs | 7.29ns | 28.2ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.7μs | 0.916ns | 3.43ns | 0.135 | 0 | 0 | 915 B |
| #7678 | ExecuteAsync |
net6.0 | 1.8μs | 8.8ns | 35.2ns | 0 | 0 | 0 | 952 B |
| #7678 | ExecuteAsync |
netcoreapp3.1 | 2.28μs | 10.9ns | 42.1ns | 0 | 0 | 0 | 952 B |
| #7678 | ExecuteAsync |
net472 | 2.61μs | 2.73ns | 10.6ns | 0.145 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 6.73μs | 13.9ns | 52.1ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.74μs | 22.2ns | 86ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.6μs | 10.2ns | 39.7ns | 0.5 | 0 | 0 | 3.18 KB |
| #7678 | SendAsync |
net6.0 | 7.04μs | 8.45ns | 31.6ns | 0 | 0 | 0 | 2.36 KB |
| #7678 | SendAsync |
netcoreapp3.1 | 8.6μs | 11.2ns | 43.4ns | 0 | 0 | 0 | 2.9 KB |
| #7678 | SendAsync |
net472 | 12.7μs | 11.8ns | 45.8ns | 0.502 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
255.94 KB
273.99 KB
18.06 KB
7.05%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.87 KB
45.54 KB
1.66 KB
3.79%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
42.68 KB
44.04 KB
1.36 KB
3.19%
Fewer allocations 🎉 in #7678
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
276.01 KB
259.87 KB
-16.14 KB
-5.85%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 255.94 KB | 273.99 KB | 18.06 KB | 7.05% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.87 KB | 45.54 KB | 1.66 KB | 3.79% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.68 KB | 44.04 KB | 1.36 KB | 3.19% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 276.01 KB | 259.87 KB | -16.14 KB | -5.85% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45.2μs | 256ns | 1.72μs | 0 | 0 | 0 | 43.87 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.5μs | 246ns | 1.48μs | 0 | 0 | 0 | 42.68 KB |
| master | StringConcatBenchmark |
net472 | 56.9μs | 268ns | 1.07μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 468μs | 1.94μs | 7μs | 0 | 0 | 0 | 276.01 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 498μs | 1.45μs | 5.44μs | 0 | 0 | 0 | 255.94 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.21μs | 12.9μs | 0 | 0 | 0 | 279.51 KB |
| #7678 | StringConcatBenchmark |
net6.0 | 41.4μs | 190ns | 685ns | 0 | 0 | 0 | 45.54 KB |
| #7678 | StringConcatBenchmark |
netcoreapp3.1 | 49.6μs | 225ns | 843ns | 0 | 0 | 0 | 44.04 KB |
| #7678 | StringConcatBenchmark |
net472 | 58.1μs | 188ns | 703ns | 0 | 0 | 0 | 65.54 KB |
| #7678 | StringConcatAspectBenchmark |
net6.0 | 474μs | 1.95μs | 6.74μs | 0 | 0 | 0 | 259.87 KB |
| #7678 | StringConcatAspectBenchmark |
netcoreapp3.1 | 502μs | 730ns | 2.53μs | 0 | 0 | 0 | 273.99 KB |
| #7678 | StringConcatAspectBenchmark |
net472 | 413μs | 2.15μs | 12.2μs | 0 | 0 | 0 | 278.84 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.58μs | 13.7ns | 66.9ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 16.9ns | 69.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.77μs | 3.49ns | 13.5ns | 0.245 | 0 | 0 | 1.64 KB |
| #7678 | EnrichedLog |
net6.0 | 2.54μs | 13.7ns | 73.8ns | 0 | 0 | 0 | 1.7 KB |
| #7678 | EnrichedLog |
netcoreapp3.1 | 3.58μs | 18.6ns | 87.1ns | 0 | 0 | 0 | 1.7 KB |
| #7678 | EnrichedLog |
net472 | 3.87μs | 2.71ns | 10.1ns | 0.25 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 123μs | 109ns | 391ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 127μs | 38.4ns | 139ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 167μs | 30ns | 112ns | 0 | 0 | 0 | 4.52 KB |
| #7678 | EnrichedLog |
net6.0 | 123μs | 60.3ns | 226ns | 0 | 0 | 0 | 4.31 KB |
| #7678 | EnrichedLog |
netcoreapp3.1 | 128μs | 203ns | 733ns | 0 | 0 | 0 | 4.31 KB |
| #7678 | EnrichedLog |
net472 | 168μs | 61.6ns | 238ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.9μs | 9.14ns | 35.4ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.72μs | 6.94ns | 25ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.63μs | 4.32ns | 16.7ns | 0.306 | 0 | 0 | 2.08 KB |
| #7678 | EnrichedLog |
net6.0 | 4.89μs | 24.2ns | 103ns | 0 | 0 | 0 | 2.26 KB |
| #7678 | EnrichedLog |
netcoreapp3.1 | 6.74μs | 10.2ns | 39.6ns | 0 | 0 | 0 | 2.26 KB |
| #7678 | EnrichedLog |
net472 | 7.49μs | 3.92ns | 14.7ns | 0.3 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 2.02μs | 9.35ns | 33.7ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.81μs | 5.49ns | 21.2ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.22μs | 3.82ns | 14.8ns | 0.176 | 0 | 0 | 1.2 KB |
| #7678 | SendReceive |
net6.0 | 2.02μs | 3.03ns | 11.7ns | 0 | 0 | 0 | 1.2 KB |
| #7678 | SendReceive |
netcoreapp3.1 | 2.74μs | 3.1ns | 12ns | 0 | 0 | 0 | 1.2 KB |
| #7678 | SendReceive |
net472 | 3.22μs | 7.58ns | 29.4ns | 0.176 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.31μs | 4.48ns | 16.8ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.71μs | 9.26ns | 33.4ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.52μs | 8.55ns | 33.1ns | 0.293 | 0 | 0 | 2.03 KB |
| #7678 | EnrichedLog |
net6.0 | 4.23μs | 13.8ns | 51.5ns | 0 | 0 | 0 | 1.58 KB |
| #7678 | EnrichedLog |
netcoreapp3.1 | 5.58μs | 14ns | 54ns | 0 | 0 | 0 | 1.63 KB |
| #7678 | EnrichedLog |
net472 | 6.61μs | 8.82ns | 34.2ns | 0.297 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 789ns | 3.9ns | 17.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 965ns | 5.15ns | 27.7ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 915ns | 0.274ns | 0.989ns | 0.0917 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 944ns | 5.22ns | 28.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.23μs | 6.57ns | 35.4ns | 0 | 0 | 0 | 697 B |
| master | StartFinishScope |
net472 | 1.14μs | 0.122ns | 0.474ns | 0.103 | 0 | 0 | 658 B |
| #7678 | StartFinishSpan |
net6.0 | 755ns | 2.87ns | 11.1ns | 0 | 0 | 0 | 576 B |
| #7678 | StartFinishSpan |
netcoreapp3.1 | 955ns | 5.01ns | 26.1ns | 0 | 0 | 0 | 576 B |
| #7678 | StartFinishSpan |
net472 | 896ns | 0.899ns | 3.48ns | 0.0894 | 0 | 0 | 578 B |
| #7678 | StartFinishScope |
net6.0 | 895ns | 4.62ns | 23.1ns | 0 | 0 | 0 | 696 B |
| #7678 | StartFinishScope |
netcoreapp3.1 | 1.18μs | 6.38ns | 35.5ns | 0 | 0 | 0 | 696 B |
| #7678 | StartFinishScope |
net472 | 1.1μs | 0.934ns | 3.62ns | 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 | 1.07μs | 5.57ns | 26.7ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.44μs | 5.16ns | 20ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 0.533ns | 2.07ns | 0.1 | 0 | 0 | 658 B |
| #7678 | RunOnMethodBegin |
net6.0 | 1.03μs | 0.341ns | 1.32ns | 0 | 0 | 0 | 696 B |
| #7678 | RunOnMethodBegin |
netcoreapp3.1 | 1.44μs | 5.86ns | 22.7ns | 0 | 0 | 0 | 696 B |
| #7678 | RunOnMethodBegin |
net472 | 1.43μs | 1.3ns | 5.05ns | 0.1 | 0 | 0 | 658 B |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
NachoEchevarria
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this one and wondered about it. This explanation makes sense. Cool!
Summary of changes
This changes to use a means to get the hash code of an object to handle
null,object.GetHashCodeand a fallback to use RuntimeHelpersGetHashCodefor whenobject.GetHashCodefails.Reason for change
My guess is that
GetHashCodeis overridden for the given object and we probably should avoid that?Spotted the following in Error Tracking:
Implementation details
Swapped from one to the other.
Test coverage
🤷 Didn't try to reproduce
Other details