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-09-27 from the latest CI run.

Environment: Ubuntu Latest • .NET SDK 10.0.401

📊 Results​

Verifying mock method calls:

LibraryMeanErrorStdDevAllocated
TUnit.Mocks736.27 ns6.110 ns5.715 ns3008 B
Imposter676.74 ns3.401 ns3.181 ns4688 B
Mockolate398.05 ns1.672 ns1.483 ns2128 B
Moq237,988.85 ns1,730.571 ns1,534.106 ns24324 B
NSubstitute6,424.63 ns22.868 ns21.391 ns10064 B
FakeItEasy6,330.79 ns16.146 ns14.313 ns10722 B

Never​

LibraryMeanErrorStdDevAllocated
TUnit.Mocks53.83 ns0.150 ns0.140 ns320 B
Imposter318.25 ns0.569 ns0.504 ns2400 B
Mockolate234.47 ns0.589 ns0.522 ns1144 B
Moq62,316.71 ns366.024 ns285.767 ns6925 B
NSubstitute3,532.67 ns8.859 ns8.287 ns7088 B
FakeItEasy3,184.47 ns13.833 ns12.939 ns5210 B

Multiple​

LibraryMeanErrorStdDevAllocated
TUnit.Mocks1,250.61 ns2.837 ns2.654 ns4472 B
Imposter1,650.72 ns5.101 ns4.522 ns11192 B
Mockolate1,046.23 ns4.805 ns4.494 ns5240 B
Moq347,352.06 ns2,834.234 ns2,512.475 ns34699 B
NSubstitute11,307.22 ns60.332 ns56.435 ns16762 B
FakeItEasy11,827.79 ns110.587 ns98.032 ns19456 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-09-27T02:37:02.890Z