Commit efc1ab7
Bart Koelman
Repaired the broken benchmarks project (#677)
Removed `SortService.CheckIfProcessed()`, which was supposed to disallow multiple sort parameters. But it never worked. For example, if you pass `http://host/path?sort=a&sort=b`, it gets translated by `Microsoft.AspNetCore.Http.QueryCollection` into value "a,b". The check prevented to run benchmarks multiple times.
Also reactivated the build flag on all combinations of Platform/Configuration in Solution Configuration Manager for all projects.
Removed some benchmarks, for which no equivalent code exists anymore. But kept the benchmark on namespace-from-path extraction (and optimized a bit), because it nicely shows the perf difference between using strings and `ReadOnlySpan<char>`.
Also deleted old output markdown files from source control, as they differ per machine.
Finally, the stats from my laptop:
| Method | Mean | Error | StdDev |
|------------------------ |---------:|----------:|----------:|
| DeserializeSimpleObject | 7.684 us | 0.0692 us | 0.0578 us |
| Method | Mean | Error | StdDev |
|---------------------- |---------:|----------:|----------:|
| SerializeSimpleObject | 7.871 us | 0.1011 us | 0.0946 us |
| Method | Mean | Error | StdDev | Median | Gen 0 | Gen 1 | Gen 2 | Allocated |
|--------------- |-------------:|-----------:|-----------:|-------------:|----------:|---------:|------:|-----------:|
| AscendingSort | 2.680 us | 0.0211 us | 0.0449 us | 2.663 us | 1.0185 | 0.0076 | - | 4.7 KB |
| DescendingSort | 2.728 us | 0.0258 us | 0.0527 us | 2.739 us | 1.0262 | 0.0076 | - | 4.73 KB |
| ComplexQuery | 3,258.409 us | 25.9838 us | 54.8087 us | 3,230.178 us | 1148.4375 | 281.2500 | - | 5308.28 KB |
| Method | Mean | Error | StdDev | Median | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------------ |----------:|---------:|---------:|----------:|-------:|------:|------:|----------:|
| UsingStringSplit | 244.66 ns | 0.783 ns | 1.702 ns | 244.60 ns | 0.1493 | - | - | 704 B |
| UsingReadOnlySpan | 69.72 ns | 2.638 ns | 5.680 ns | 66.09 ns | 0.0288 | - | - | 136 B |1 parent 3763338 commit efc1ab7
File tree
23 files changed
+346
-652
lines changed- benchmarks
- BenchmarkDotNet.Artifacts/results
- JsonApiContext
- LinkBuilder
- Query
- RequestMiddleware
- Serialization
- src/JsonApiDotNetCore/QueryParameterServices
23 files changed
+346
-652
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
63 | 66 | | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| 119 | + | |
114 | 120 | | |
| 121 | + | |
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| 125 | + | |
118 | 126 | | |
| 127 | + | |
119 | 128 | | |
120 | 129 | | |
121 | 130 | | |
| |||
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
| 155 | + | |
146 | 156 | | |
| 157 | + | |
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
| 161 | + | |
150 | 162 | | |
| 163 | + | |
151 | 164 | | |
152 | 165 | | |
153 | 166 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 0 additions & 13 deletions
This file was deleted.
0 commit comments