Skip to main content

Verification Benchmark

Verifying mock method calls — comparing TUnit.Mocks (source-generated) against runtime proxy-based mocking libraries.

Last Updated

This benchmark was automatically generated on 2026-06-27 from the latest CI run.

Environment: Ubuntu Latest • .NET SDK 10.0.301

📊 Results

Verifying mock method calls:

LibraryMeanErrorStdDevAllocated
TUnit.Mocks707.81 ns12.580 ns11.152 ns3008 B
Imposter703.16 ns14.075 ns13.166 ns4688 B
Mockolate400.61 ns5.858 ns5.193 ns2128 B
Moq352,844.43 ns2,129.145 ns1,887.432 ns24325 B
NSubstitute6,489.29 ns68.310 ns63.897 ns10064 B
FakeItEasy7,250.42 ns23.094 ns18.031 ns10722 B

Never

LibraryMeanErrorStdDevAllocated
TUnit.Mocks53.11 ns0.664 ns0.589 ns320 B
Imposter327.50 ns4.685 ns3.912 ns2400 B
Mockolate238.44 ns1.725 ns1.440 ns1144 B
Moq89,481.37 ns744.164 ns659.682 ns6918 B
NSubstitute3,686.23 ns27.714 ns25.924 ns7088 B
FakeItEasy3,739.49 ns36.919 ns32.728 ns5209 B

Multiple

LibraryMeanErrorStdDevAllocated
TUnit.Mocks1,243.28 ns12.288 ns11.494 ns4472 B
Imposter1,731.31 ns25.897 ns24.225 ns11192 B
Mockolate1,136.70 ns11.847 ns9.893 ns5240 B
Moq478,455.05 ns1,369.514 ns1,143.606 ns34842 B
NSubstitute11,378.50 ns137.956 ns122.294 ns16763 B
FakeItEasy14,544.69 ns282.933 ns336.811 ns19393 B

🎯 Key Insights

This benchmark compares TUnit.Mocks (source-generated) against runtime proxy-based mocking libraries for verifying mock method calls.


Methodology

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

Last generated: 2026-06-27T03:27:29.619Z