Skip to main content

MockCreation Benchmark

Last Updated

This benchmark was automatically generated on 2026-05-13 from the latest CI run.

Environment: Ubuntu Latest • .NET SDK 10.0.300

📊 Results

Mock instance creation performance:

LibraryMeanErrorStdDevAllocated
TUnit.Mocks24.96 ns0.278 ns0.247 ns192 B
Imposter90.15 ns0.914 ns0.855 ns440 B
Mockolate60.17 ns0.887 ns0.786 ns424 B
Moq1,389.89 ns16.708 ns15.628 ns2048 B
NSubstitute1,920.10 ns17.034 ns15.100 ns5000 B
FakeItEasy1,828.75 ns28.341 ns26.510 ns2715 B

Repository

LibraryMeanErrorStdDevAllocated
TUnit.Mocks25.12 ns0.414 ns0.367 ns192 B
Imposter145.10 ns1.570 ns1.468 ns696 B
Mockolate63.41 ns1.261 ns1.453 ns456 B
Moq1,258.91 ns7.526 ns7.040 ns1912 B
NSubstitute1,890.06 ns23.930 ns22.384 ns5000 B
FakeItEasy1,845.67 ns28.574 ns26.728 ns2715 B

🎯 Key Insights

This benchmark compares TUnit.Mocks (source-generated) against runtime proxy-based mocking libraries for mock instance creation performance.


Methodology

View the mock benchmarks overview for methodology details and environment information.

Last generated: 2026-05-13T03:26:48.570Z