Skip to main content

Invocation 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

Calling methods on mock objects:

LibraryMeanErrorStdDevAllocated
TUnit.Mocks251.77 ns75.167 ns4.120 ns120 B
Imposter286.50 ns61.118 ns3.350 ns168 B
Mockolate98.31 ns12.117 ns0.664 ns84 B
Moq791.25 ns153.751 ns8.428 ns376 B
NSubstitute721.26 ns401.152 ns21.989 ns304 B
FakeItEasy1,772.96 ns369.217 ns20.238 ns944 B

String

LibraryMeanErrorStdDevAllocated
TUnit.Mocks151.12 ns65.684 ns3.600 ns88 B
Imposter291.35 ns81.518 ns4.468 ns168 B
Mockolate98.20 ns7.569 ns0.415 ns60 B
Moq539.78 ns179.147 ns9.820 ns296 B
NSubstitute629.05 ns176.348 ns9.666 ns272 B
FakeItEasy1,594.70 ns154.137 ns8.449 ns776 B

100 calls

LibraryMeanErrorStdDevAllocated
TUnit.Mocks25,338.88 ns9,983.755 ns547.243 ns11936 B
Imposter28,352.41 ns9,418.811 ns516.277 ns16800 B
Mockolate9,987.21 ns1,420.547 ns77.865 ns8400 B
Moq78,412.94 ns7,646.834 ns419.149 ns37600 B
NSubstitute73,600.61 ns7,742.401 ns424.387 ns36448 B
FakeItEasy179,084.48 ns55,696.739 ns3,052.926 ns94400 B

🎯 Key Insights

This benchmark compares TUnit.Mocks (source-generated) against runtime proxy-based mocking libraries for calling methods on mock objects.


Methodology

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

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