Callback 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
Callback registration and execution:
| Library | Mean | Error | StdDev | Allocated |
|---|---|---|---|---|
| TUnit.Mocks | 691.4 ns | 13.41 ns | 19.65 ns | 2.98 KB |
| Imposter | 529.7 ns | 10.48 ns | 20.18 ns | 2.66 KB |
| Mockolate | 404.0 ns | 4.09 ns | 3.63 ns | 1.91 KB |
| Moq | 187,818.0 ns | 862.56 ns | 764.63 ns | 13.14 KB |
| NSubstitute | 4,835.2 ns | 32.04 ns | 26.76 ns | 7.93 KB |
| FakeItEasy | 5,631.2 ns | 59.31 ns | 55.48 ns | 7.44 KB |
with args
| Library | Mean | Error | StdDev | Allocated |
|---|---|---|---|---|
| TUnit.Mocks | 799.1 ns | 13.40 ns | 12.54 ns | 3.06 KB |
| Imposter | 582.3 ns | 11.63 ns | 16.31 ns | 2.82 KB |
| Mockolate | 457.7 ns | 8.91 ns | 8.33 ns | 1.95 KB |
| Moq | 196,504.7 ns | 1,566.10 ns | 1,464.93 ns | 13.73 KB |
| NSubstitute | 5,381.0 ns | 32.83 ns | 29.10 ns | 8.53 KB |
| FakeItEasy | 6,758.0 ns | 74.43 ns | 65.98 ns | 9.4 KB |
🎯 Key Insights
This benchmark compares TUnit.Mocks (source-generated) against runtime proxy-based mocking libraries for callback registration and execution.
Methodology
View the mock benchmarks overview for methodology details and environment information.
Last generated: 2026-05-13T03:26:48.570Z