Skip to main content

Benchmarks

These benchmarks measure Mockolate's runtime overhead against Moq, NSubstitute, FakeItEasy, TUnit.Mocks and Imposter for the same end-to-end mocking flow.

Methodology
  • Suite: Mockolate.Benchmarks driven by BenchmarkDotNet.
  • Job: MediumRun with the in-process toolchain.
  • Runner: ubuntu-latest GitHub Actions agent, refreshed on every push to main.
  • Each row shows time and allocated memory, sorted fastest-first; bars are scaled within the row so length corresponds to magnitude. The Mockolate row is highlighted as the baseline (1.00x) and every other row shows its ratio relative to Mockolate. Lower is better.
  • Benchmarks parameterised with [Params(1, 10)] (Method/Property/Indexer) repeat their inner body 1× or 10× to surface fixed-cost vs per-call overhead — switch between them with the inline tabs.

Cost of constructing an empty mock — no setup, no invocations, no verification. The fixed overhead every test pays.

Time
Memory
Captured on commit 520954f1 (2026-05-11) on ubuntu-latest.
Mockolate
ICalculatorService.CreateMock();

View source on GitHub →