@@ -198,11 +198,11 @@ All performance benchmarks reported use the following environment:
198
198
```
199
199
// * Summary *
200
200
201
- BenchmarkDotNet v0.13.12 , Windows 11 (10.0.22621.3007/22H2/2022Update/SunValley2 )
201
+ BenchmarkDotNet v0.14.0 , Windows 11 (10.0.22631.4317/23H2/2023Update/SunValley3 )
202
202
12th Gen Intel Core i7-12700H, 1 CPU, 20 logical and 14 physical cores
203
- .NET SDK 8 .0.101
204
- [Host] : .NET 8 .0.1 (8 .0.123.58001 ), X64 RyuJIT AVX2
205
- DefaultJob : .NET 8 .0.1 (8 .0.123.58001 ), X64 RyuJIT AVX2
203
+ .NET SDK 9 .0.100
204
+ [Host] : .NET 9 .0.0 (9 .0.24.52809 ), X64 RyuJIT AVX2
205
+ DefaultJob : .NET 9 .0.0 (9 .0.24.52809 ), X64 RyuJIT AVX2
206
206
```
207
207
208
208
#### [ Benchmarks.Simple] ( ./benchmarks/Benchmark.Simple )
@@ -211,35 +211,35 @@ This benchmark tests the various mediator implementations with a single request/
211
211
212
212
| Method | Mean | Error | Ratio | Rank | Allocated |
213
213
| ----------------------------- | -----------:| ----------:| ------:| -----:| ----------:|
214
- | SendRequest_Baseline | 0.7701 ns | 0.0180 ns | 1.00 | 1 | - |
215
- | SendRequest_IHandler | 15.6780 ns | 0.0476 ns | 20.36 | 2 | - |
216
- | SendRequest_ImmediateHandler | 16.6023 ns | 0.0561 ns | 21.56 | 3 | - |
217
- | SendRequest_Mediator | 27.2993 ns | 0.4269 ns | 35.49 | 4 | - |
218
- | SendRequest_IMediator | 31.3420 ns | 0.1006 ns | 40.64 | 5 | - |
219
- | SendRequest_MediatR | 68.3384 ns | 0.3453 ns | 88.73 | 6 | 240 B |
214
+ | SendRequest_Baseline | 0.6618 ns | 0.0127 ns | 1.00 | 1 | - |
215
+ | SendRequest_IHandler | 14.0497 ns | 0.0753 ns | 21.23 | 2 | - |
216
+ | SendRequest_ImmediateHandler | 14.9493 ns | 0.0818 ns | 22.59 | 3 | - |
217
+ | SendRequest_Mediator | 22.0218 ns | 0.0684 ns | 33.28 | 4 | - |
218
+ | SendRequest_IMediator | 26.8625 ns | 0.1428 ns | 40.60 | 5 | - |
219
+ | SendRequest_MediatR | 47.5135 ns | 0.4161 ns | 71.81 | 6 | 192 B |
220
220
221
221
#### [ Benchmarks.Large] ( ./benchmarks/Benchmark.Large )
222
222
223
223
This benchmark tests the various mediator implementations in the face of 999 request/response handlers.
224
224
225
- | Method | Mean | Error | Ratio | Rank | Allocated |
226
- | ------------------------------ | ------------:| ----------:| -------:| -----:| ----------:|
227
- | SendRequest_Baseline | 0.5656 ns | 0.0252 ns | 1.00 | 1 | - |
228
- | SendRequest_ImmediateHandler | 15.4346 ns | 0.0516 ns | 27.34 | 2 | - |
229
- | SendRequest_IHandler | 16.0959 ns | 0.0552 ns | 28.50 | 3 | - |
230
- | SendRequest_Mediator | 27.4104 ns | 0.0449 ns | 48.54 | 4 | - |
231
- | SendRequest_MediatR | 80.0953 ns | 0.4749 ns | 141.83 | 5 | 240 B |
232
- | SendRequest_IMediator | 435.3890 ns | 1.6399 ns | 771.01 | 6 | - |
225
+ | Method | Mean | Error | Ratio | Rank | Allocated |
226
+ | ----------------------------- | ------------:| ----------:| -------:| -----:| ----------:|
227
+ | SendRequest_Baseline | 0.6257 ns | 0.0202 ns | 1.00 | 1 | - |
228
+ | SendRequest_ImmediateHandler | 11.2358 ns | 0.0395 ns | 17.97 | 2 | - |
229
+ | SendRequest_IHandler | 14.0575 ns | 0.0652 ns | 22.49 | 3 | - |
230
+ | SendRequest_Mediator | 22.0874 ns | 0.0534 ns | 35.33 | 4 | - |
231
+ | SendRequest_MediatR | 48.3577 ns | 0.2402 ns | 77.35 | 5 | 192 B |
232
+ | SendRequest_IMediator | 420.2067 ns | 4.5092 ns | 672.17 | 6 | - |
233
233
234
234
#### [ Benchmarks.Behaviors] ( ./benchmarks/Benchmark.Behaviors )
235
235
236
236
This benchmark tests a more realistic scenario of using 1 behavior and 1 service.
237
237
238
238
| Method | Mean | Error | Ratio | Rank | Allocated |
239
239
| ----------------------------- | ----------:| ---------:| ------:| -----:| ----------:|
240
- | SendRequest_Baseline | 56.71 ns | 0.174 ns | 1.00 | 1 | 40 B |
241
- | SendRequest_IHandler | 78.90 ns | 0.304 ns | 1.39 | 2 | 40 B |
242
- | SendRequest_ImmediateHandler | 80.02 ns | 0.288 ns | 1.41 | 3 | 40 B |
243
- | SendRequest_Mediator | 101.23 ns | 0.263 ns | 1.78 | 4 | 40 B |
244
- | SendRequest_IMediator | 104.92 ns | 0.297 ns | 1.85 | 5 | 40 B |
245
- | SendRequest_MediatR | 201.27 ns | 1.023 ns | 3.55 | 6 | 560 B |
240
+ | SendRequest_Baseline | 47.83 ns | 0.160 ns | 1.00 | 1 | 40 B |
241
+ | SendRequest_ImmediateHandler | 62.67 ns | 0.350 ns | 1.31 | 2 | 40 B |
242
+ | SendRequest_IHandler | 63.59 ns | 0.218 ns | 1.33 | 2 | 40 B |
243
+ | SendRequest_Mediator | 91.53 ns | 0.292 ns | 1.91 | 3 | 40 B |
244
+ | SendRequest_IMediator | 100.73 ns | 0.396 ns | 2.11 | 4 | 40 B |
245
+ | SendRequest_MediatR | 188.54 ns | 0.785 ns | 3.94 | 5 | 560 B |
0 commit comments