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-08-14 from the latest CI run.

Environment: Ubuntu Latest • .NET SDK 10.0.400

📊 Results

Verifying mock method calls:

LibraryMeanErrorStdDevAllocated
TUnit.Mocks758.72 ns1.443 ns1.280 ns3008 B
Imposter679.02 ns5.394 ns4.781 ns4688 B
Mockolate397.41 ns1.650 ns1.377 ns2128 B
Moq245,563.37 ns1,216.103 ns1,078.043 ns24324 B
NSubstitute6,397.46 ns11.773 ns9.191 ns10064 B
FakeItEasy6,404.63 ns37.728 ns35.291 ns10722 B

Never

LibraryMeanErrorStdDevAllocated
TUnit.Mocks55.62 ns0.234 ns0.208 ns320 B
Imposter326.62 ns2.874 ns2.689 ns2400 B
Mockolate242.68 ns0.964 ns0.752 ns1144 B
Moq62,044.29 ns701.427 ns656.115 ns6925 B
NSubstitute3,744.85 ns25.452 ns23.807 ns7088 B
FakeItEasy3,275.73 ns35.111 ns31.125 ns5210 B

Multiple

LibraryMeanErrorStdDevAllocated
TUnit.Mocks1,289.92 ns17.183 ns16.073 ns4472 B
Imposter1,780.71 ns20.835 ns17.398 ns11192 B
Mockolate1,111.56 ns16.961 ns15.035 ns5240 B
Moq352,596.74 ns3,281.538 ns3,069.553 ns34699 B
NSubstitute11,782.11 ns189.935 ns218.729 ns16889 B
FakeItEasy11,703.67 ns112.297 ns99.548 ns19232 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-08-14T03:10:39.371Z