@@ -4,7 +4,7 @@ Foundatio.Mediator aims to get as close to direct method call performance as pos
44
55## Benchmark Results
66
7- > 📊 ** Last Updated:** 2026-01-07
7+ > 📊 ** Last Updated:** 2026-01-08
88
99### Commands
1010
@@ -14,12 +14,13 @@ Fire-and-forget dispatch with no return value.
1414<thead >
1515<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
1616</thead >
17- <tbody ><tr ><td style =" width :100% " ><code >Direct_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >0.0006 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
18- <tr ><td style =" width :100% " ><code >Foundatio_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >8.2433 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
19- <tr ><td style =" width :100% " ><code >MediatorNet_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >8.6854 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
20- <tr ><td style =" width :100% " ><code >MediatR_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >34.7595 ns</td ><td style =" text-align :right ;white-space :nowrap " >128 B</td ></tr >
21- <tr ><td style =" width :100% " ><code >Wolverine_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >188.9228 ns</td ><td style =" text-align :right ;white-space :nowrap " >704 B</td ></tr >
22- <tr ><td style =" width :100% " ><code >MassTransit_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,805.8276 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,912 B</td ></tr >
17+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >0.0025 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
18+ <tr ><td style =" width :100% " ><code >Foundatio_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >7.6305 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
19+ <tr ><td style =" width :100% " ><code >MediatorNet_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >9.1229 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
20+ <tr ><td style =" width :100% " ><code >IH_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >11.2250 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
21+ <tr ><td style =" width :100% " ><code >MediatR_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >31.6920 ns</td ><td style =" text-align :right ;white-space :nowrap " >128 B</td ></tr >
22+ <tr ><td style =" width :100% " ><code >Wolverine_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >174.7299 ns</td ><td style =" text-align :right ;white-space :nowrap " >704 B</td ></tr >
23+ <tr ><td style =" width :100% " ><code >MassTransit_Command</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,736.4238 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,912 B</td ></tr >
2324</tbody >
2425</table >
2526
@@ -31,12 +32,14 @@ Request/response dispatch returning an Order object.
3132<thead >
3233<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
3334</thead >
34- <tbody ><tr ><td style =" width :100% " ><code >Direct_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >21.2253 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
35- <tr ><td style =" width :100% " ><code >MediatorNet_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >25.1906 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
36- <tr ><td style =" width :100% " ><code >Foundatio_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >32.0944 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
37- <tr ><td style =" width :100% " ><code >MediatR_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >55.5444 ns</td ><td style =" text-align :right ;white-space :nowrap " >248 B</td ></tr >
38- <tr ><td style =" width :100% " ><code >Wolverine_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >246.3097 ns</td ><td style =" text-align :right ;white-space :nowrap " >864 B</td ></tr >
39- <tr ><td style =" width :100% " ><code >MassTransit_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,336.9158 ns</td ><td style =" text-align :right ;white-space :nowrap " >13,216 B</td ></tr >
35+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >21.0632 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
36+ <tr ><td style =" width :100% " ><code >MediatorNet_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >24.9862 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
37+ <tr ><td style =" width :100% " ><code >Foundatio_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >27.5867 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
38+ <tr ><td style =" width :100% " ><code >IH_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >29.5632 ns</td ><td style =" text-align :right ;white-space :nowrap " >48 B</td ></tr >
39+ <tr ><td style =" width :100% " ><code >MediatR_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >51.0522 ns</td ><td style =" text-align :right ;white-space :nowrap " >248 B</td ></tr >
40+ <tr ><td style =" width :100% " ><code >MediatR_QueryWithDependencies</code ></td ><td style =" text-align :right ;white-space :nowrap " >127.0770 ns</td ><td style =" text-align :right ;white-space :nowrap " >600 B</td ></tr >
41+ <tr ><td style =" width :100% " ><code >Wolverine_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >246.2122 ns</td ><td style =" text-align :right ;white-space :nowrap " >864 B</td ></tr >
42+ <tr ><td style =" width :100% " ><code >MassTransit_Query</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,054.7685 ns</td ><td style =" text-align :right ;white-space :nowrap " >13,224 B</td ></tr >
4043</tbody >
4144</table >
4245
@@ -48,12 +51,13 @@ Notification dispatched to 2 handlers.
4851<thead >
4952<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
5053</thead >
51- <tbody ><tr ><td style =" width :100% " ><code >Direct_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >0.0014 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
52- <tr ><td style =" width :100% " ><code >MediatorNet_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >6.1563 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
53- <tr ><td style =" width :100% " ><code >Foundatio_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >27.9315 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
54- <tr ><td style =" width :100% " ><code >MediatR_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >90.5843 ns</td ><td style =" text-align :right ;white-space :nowrap " >792 B</td ></tr >
55- <tr ><td style =" width :100% " ><code >Wolverine_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,790.1051 ns</td ><td style =" text-align :right ;white-space :nowrap " >2,840 B</td ></tr >
56- <tr ><td style =" width :100% " ><code >MassTransit_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,902.7803 ns</td ><td style =" text-align :right ;white-space :nowrap " >7,456 B</td ></tr >
54+ <tbody ><tr ><td style =" width :100% " ><code >Direct_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >0.0032 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
55+ <tr ><td style =" width :100% " ><code >MediatorNet_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >5.6664 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
56+ <tr ><td style =" width :100% " ><code >Foundatio_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >25.1014 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
57+ <tr ><td style =" width :100% " ><code >IH_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >50.2992 ns</td ><td style =" text-align :right ;white-space :nowrap " >32 B</td ></tr >
58+ <tr ><td style =" width :100% " ><code >MediatR_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >86.2846 ns</td ><td style =" text-align :right ;white-space :nowrap " >792 B</td ></tr >
59+ <tr ><td style =" width :100% " ><code >Wolverine_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >1,788.2050 ns</td ><td style =" text-align :right ;white-space :nowrap " >2,840 B</td ></tr >
60+ <tr ><td style =" width :100% " ><code >MassTransit_Publish</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,822.0606 ns</td ><td style =" text-align :right ;white-space :nowrap " >7,456 B</td ></tr >
5761</tbody >
5862</table >
5963
@@ -65,12 +69,12 @@ Query where handler has an injected service (IOrderService) and timing middlewar
6569<thead >
6670<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
6771</thead >
68- <tbody ><tr ><td style =" width :100% " ><code >Direct_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >62.4078 ns</td ><td style =" text-align :right ;white-space :nowrap " >160 B</td ></tr >
69- <tr ><td style =" width :100% " ><code >MediatorNet_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >75.0207 ns</td ><td style =" text-align :right ;white-space :nowrap " >88 B</td ></tr >
70- <tr ><td style =" width :100% " ><code >Foundatio_FullQuery </code ></td ><td style =" text-align :right ;white-space :nowrap " >121.6255 ns</td ><td style =" text-align :right ;white-space :nowrap " >288 B</td ></tr >
71- <tr ><td style =" width :100% " ><code >MediatR_FullQuery </code ></td ><td style =" text-align :right ;white-space :nowrap " >134.1334 ns</td ><td style =" text-align :right ;white-space :nowrap " >672 B</td ></tr >
72- <tr ><td style =" width :100% " ><code >Wolverine_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >306.1611 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,016 B</td ></tr >
73- <tr ><td style =" width :100% " ><code >MassTransit_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,590.7800 ns</td ><td style =" text-align :right ;white-space :nowrap " >13,217 B</td ></tr >
72+ <tbody ><tr ><td style =" width :100% " ><code >Direct_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >61.0919 ns</td ><td style =" text-align :right ;white-space :nowrap " >160 B</td ></tr >
73+ <tr ><td style =" width :100% " ><code >MediatorNet_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >73.4364 ns</td ><td style =" text-align :right ;white-space :nowrap " >88 B</td ></tr >
74+ <tr ><td style =" width :100% " ><code >IH_FullQuery </code ></td ><td style =" text-align :right ;white-space :nowrap " >77.6897 ns</td ><td style =" text-align :right ;white-space :nowrap " >88 B</td ></tr >
75+ <tr ><td style =" width :100% " ><code >Foundatio_FullQuery </code ></td ><td style =" text-align :right ;white-space :nowrap " >130.3329 ns</td ><td style =" text-align :right ;white-space :nowrap " >288 B</td ></tr >
76+ <tr ><td style =" width :100% " ><code >Wolverine_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >290.8936 ns</td ><td style =" text-align :right ;white-space :nowrap " >944 B</td ></tr >
77+ <tr ><td style =" width :100% " ><code >MassTransit_FullQuery</code ></td ><td style =" text-align :right ;white-space :nowrap " >6,262.8044 ns</td ><td style =" text-align :right ;white-space :nowrap " >13,224 B</td ></tr >
7478</tbody >
7579</table >
7680
@@ -82,12 +86,13 @@ CreateOrder returns an Order and publishes OrderCreatedEvent to 2 handlers. Foun
8286<thead >
8387<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
8488</thead >
85- <tbody ><tr ><td style =" width :100% " ><code >Direct_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >28.1202 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
86- <tr ><td style =" width :100% " ><code >MediatorNet_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >38.4157 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
87- <tr ><td style =" width :100% " ><code >Foundatio_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >76.6986 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
88- <tr ><td style =" width :100% " ><code >MediatR_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >167.0904 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,168 B</td ></tr >
89- <tr ><td style =" width :100% " ><code >Wolverine_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,370.7325 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,128 B</td ></tr >
90- <tr ><td style =" width :100% " ><code >MassTransit_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >17,839.5809 ns</td ><td style =" text-align :right ;white-space :nowrap " >20,980 B</td ></tr >
89+ <tbody ><tr ><td style =" width :100% " ><code >Direct_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >27.0500 ns</td ><td style =" text-align :right ;white-space :nowrap " >144 B</td ></tr >
90+ <tr ><td style =" width :100% " ><code >MediatorNet_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >44.4301 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
91+ <tr ><td style =" width :100% " ><code >Foundatio_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >77.3470 ns</td ><td style =" text-align :right ;white-space :nowrap " >72 B</td ></tr >
92+ <tr ><td style =" width :100% " ><code >IH_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >88.0622 ns</td ><td style =" text-align :right ;white-space :nowrap " >104 B</td ></tr >
93+ <tr ><td style =" width :100% " ><code >MediatR_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >153.1806 ns</td ><td style =" text-align :right ;white-space :nowrap " >1,096 B</td ></tr >
94+ <tr ><td style =" width :100% " ><code >Wolverine_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >2,199.9825 ns</td ><td style =" text-align :right ;white-space :nowrap " >4,056 B</td ></tr >
95+ <tr ><td style =" width :100% " ><code >MassTransit_CascadingMessages</code ></td ><td style =" text-align :right ;white-space :nowrap " >8,576.2891 ns</td ><td style =" text-align :right ;white-space :nowrap " >20,928 B</td ></tr >
9196</tbody >
9297</table >
9398
@@ -99,12 +104,13 @@ Middleware returns cached result; handler is never invoked. Each library uses it
99104<thead >
100105<tr ><th style =" text-align :left " >Method</th ><th style =" text-align :right ;white-space :nowrap " >Mean</th ><th style =" text-align :right ;white-space :nowrap " >Allocated</th ></tr >
101106</thead >
102- <tbody ><tr ><td style =" width :100% " ><code >Direct_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >0.2221 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
103- <tr ><td style =" width :100% " ><code >MediatorNet_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >8.4059 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
104- <tr ><td style =" width :100% " ><code >Foundatio_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >9.9201 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
105- <tr ><td style =" width :100% " ><code >MediatR_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >57.7931 ns</td ><td style =" text-align :right ;white-space :nowrap " >488 B</td ></tr >
106- <tr ><td style =" width :100% " ><code >Wolverine_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >216.2019 ns</td ><td style =" text-align :right ;white-space :nowrap " >824 B</td ></tr >
107- <tr ><td style =" width :100% " ><code >MassTransit_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >NA</td ><td style =" text-align :right ;white-space :nowrap " >NA</td ></tr >
107+ <tbody ><tr ><td style =" width :100% " ><code >Direct_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >3.6971 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
108+ <tr ><td style =" width :100% " ><code >MediatorNet_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >12.1379 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
109+ <tr ><td style =" width :100% " ><code >IH_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >13.0975 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
110+ <tr ><td style =" width :100% " ><code >Foundatio_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >13.1458 ns</td ><td style =" text-align :right ;white-space :nowrap " >0 B</td ></tr >
111+ <tr ><td style =" width :100% " ><code >MediatR_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >53.6225 ns</td ><td style =" text-align :right ;white-space :nowrap " >416 B</td ></tr >
112+ <tr ><td style =" width :100% " ><code >Wolverine_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >210.0161 ns</td ><td style =" text-align :right ;white-space :nowrap " >824 B</td ></tr >
113+ <tr ><td style =" width :100% " ><code >MassTransit_ShortCircuit</code ></td ><td style =" text-align :right ;white-space :nowrap " >5,570.8135 ns</td ><td style =" text-align :right ;white-space :nowrap " >12,304 B</td ></tr >
108114</tbody >
109115</table >
110116
0 commit comments