Skip to content

feat(benchmarks): add DispatchR 2.3.1 comparison suite - #18

Merged
illia1f merged 1 commit into
mainfrom
feat/dispatchr-benchmarks
Oct 24, 2026
Merged

illia1f merged 1 commit into
mainfrom
feat/dispatchr-benchmarks

Conversation

@illia1f

@illia1f illia1f commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Adds a BenchmarkDotNet suite on .NET 10 that compares RequestFlow with DispatchR.Mediator 2.3.1, the latest release. No timing results are published yet.

  • RequestFlow.Benchmarks.DispatchR: 260 cases covering Task, void, ValueTask and ValueTask void requests, streams, sequential events, catalog size, mixed traffic, short-circuit pipelines, and direct-handler references.
  • Both dispatchers run scoped, because DispatchR registers IMediator as scoped with no lifetime option.
  • DispatchR has no parallel publisher and no bare void contract, so the suite has no parallel event rows, and DispatchR void handlers return Task or ValueTask of an empty struct.
  • Mixed traffic sends through typed delegates on both sides, because DispatchR picks the handler from the compile-time request type. These rows are not comparable with the MediatR suite's.
  • probe fails a class whose message fields do not carry its Completion parameter. The shared check also runs for the MediatR suite.
  • benchmarks/README.md lists the suite, its filters, and its case counts.

Validation:

  • Release build of the solution: zero warnings and errors.
  • probe passed for the DispatchR comparison: 18 classes, 130 parameter sets, 260 cases.
  • probe passed for the MediatR comparison after the shared check change: 15 classes, 112 parameter sets, 224 cases.

- 260 cases in 18 classes: Task, void, ValueTask and ValueTask void requests, streams, sequential events, catalog size, mixed traffic, short circuit, and direct-handler references.
- Both dispatchers run scoped, since DispatchR registers IMediator as scoped only.
- The probe now fails a class whose message fields do not carry its Completion parameter.
@illia1f
illia1f merged commit fccc60c into main Oct 24, 2026
1 check passed
@illia1f
illia1f deleted the feat/dispatchr-benchmarks branch October 24, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant