Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions docs/docs/benchmarks/mocks/Callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 2
# Callback Benchmark

:::info Last Updated
This benchmark was automatically generated on **2026-05-06** from the latest CI run.
This benchmark was automatically generated on **2026-05-07** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 10.0.203
:::
Expand All @@ -18,12 +18,12 @@ Callback registration and execution:

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 611.7 ns | 3.24 ns | 2.87 ns | 2.98 KB |
| Imposter | 448.0 ns | 0.87 ns | 0.68 ns | 2.66 KB |
| Mockolate | 354.2 ns | 7.05 ns | 9.88 ns | 1.89 KB |
| Moq | 180,351.2 ns | 550.15 ns | 514.61 ns | 13.14 KB |
| NSubstitute | 4,464.3 ns | 20.77 ns | 18.41 ns | 7.93 KB |
| FakeItEasy | 5,063.1 ns | 21.07 ns | 19.71 ns | 7.44 KB |
| **TUnit.Mocks** | 605.0 ns | 11.63 ns | 11.42 ns | 2.98 KB |
| Imposter | 488.9 ns | 7.92 ns | 7.02 ns | 2.66 KB |
| Mockolate | 356.9 ns | 5.00 ns | 4.67 ns | 1.89 KB |
| Moq | 182,052.0 ns | 1,447.27 ns | 1,282.97 ns | 13.14 KB |
| NSubstitute | 4,457.5 ns | 44.77 ns | 39.69 ns | 7.93 KB |
| FakeItEasy | 5,020.6 ns | 63.90 ns | 59.77 ns | 7.44 KB |

```mermaid
%%{init: {
Expand All @@ -49,8 +49,8 @@ Callback registration and execution:
xychart-beta
title "Callback Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 216422
bar [611.7, 448, 354.2, 180351.2, 4464.3, 5063.1]
y-axis "Time (ns)" 0 --> 218463
bar [605, 488.9, 356.9, 182052, 4457.5, 5020.6]
```

---
Expand All @@ -59,12 +59,12 @@ xychart-beta

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 706.7 ns | 1.87 ns | 1.75 ns | 3.06 KB |
| Imposter | 512.7 ns | 1.75 ns | 1.64 ns | 2.82 KB |
| Mockolate | 392.2 ns | 1.45 ns | 1.13 ns | 1.94 KB |
| Moq | 189,124.1 ns | 1,331.75 ns | 1,180.56 ns | 13.73 KB |
| NSubstitute | 5,249.4 ns | 81.66 ns | 72.39 ns | 8.53 KB |
| FakeItEasy | 6,283.3 ns | 81.24 ns | 75.99 ns | 9.4 KB |
| **TUnit.Mocks** | 708.9 ns | 4.91 ns | 4.35 ns | 3.06 KB |
| Imposter | 515.8 ns | 1.39 ns | 1.16 ns | 2.82 KB |
| Mockolate | 407.0 ns | 1.81 ns | 1.60 ns | 1.94 KB |
| Moq | 190,047.9 ns | 1,366.44 ns | 1,141.04 ns | 13.73 KB |
| NSubstitute | 5,119.8 ns | 71.54 ns | 63.42 ns | 8.53 KB |
| FakeItEasy | 6,508.2 ns | 82.74 ns | 73.34 ns | 9.4 KB |

```mermaid
%%{init: {
Expand All @@ -90,8 +90,8 @@ xychart-beta
xychart-beta
title "Callback (with args) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 226949
bar [706.7, 512.7, 392.2, 189124.1, 5249.4, 6283.3]
y-axis "Time (ns)" 0 --> 228058
bar [708.9, 515.8, 407, 190047.9, 5119.8, 6508.2]
```

## 🎯 Key Insights
Expand All @@ -104,4 +104,4 @@ This benchmark compares **TUnit.Mocks** (source-generated) against runtime proxy
View the [mock benchmarks overview](/docs/benchmarks/mocks) for methodology details and environment information.
:::

*Last generated: 2026-05-06T03:25:44.139Z*
*Last generated: 2026-05-07T03:27:11.074Z*
20 changes: 10 additions & 10 deletions docs/docs/benchmarks/mocks/CombinedWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 3
# CombinedWorkflow Benchmark

:::info Last Updated
This benchmark was automatically generated on **2026-05-06** from the latest CI run.
This benchmark was automatically generated on **2026-05-07** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 10.0.203
:::
Expand All @@ -18,12 +18,12 @@ Full workflow: create → setup → invoke → verify:

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 1.941 μs | 0.0141 μs | 0.0132 μs | 5.8 KB |
| Imposter | 3.112 μs | 0.0617 μs | 0.0633 μs | 15.71 KB |
| Mockolate | 2.406 μs | 0.0264 μs | 0.0247 μs | 8.61 KB |
| Moq | 313.029 μs | 1.5935 μs | 1.4126 μs | 36.33 KB |
| NSubstitute | 17.050 μs | 0.0795 μs | 0.0621 μs | 26.72 KB |
| FakeItEasy | 17.629 μs | 0.0694 μs | 0.0649 μs | 25.61 KB |
| **TUnit.Mocks** | 1.683 μs | 0.0114 μs | 0.0101 μs | 5.8 KB |
| Imposter | 2.704 μs | 0.0536 μs | 0.0835 μs | 15.71 KB |
| Mockolate | 2.317 μs | 0.0459 μs | 0.0564 μs | 8.61 KB |
| Moq | 406.590 μs | 2.0552 μs | 1.9224 μs | 36.35 KB |
| NSubstitute | 17.535 μs | 0.1478 μs | 0.1311 μs | 26.72 KB |
| FakeItEasy | 18.353 μs | 0.0673 μs | 0.0562 μs | 25.52 KB |

```mermaid
%%{init: {
Expand All @@ -49,8 +49,8 @@ Full workflow: create → setup → invoke → verify:
xychart-beta
title "CombinedWorkflow Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (μs)" 0 --> 376
bar [1.941, 3.112, 2.406, 313.029, 17.05, 17.629]
y-axis "Time (μs)" 0 --> 488
bar [1.683, 2.704, 2.317, 406.59, 17.535, 18.353]
```

## 🎯 Key Insights
Expand All @@ -63,4 +63,4 @@ This benchmark compares **TUnit.Mocks** (source-generated) against runtime proxy
View the [mock benchmarks overview](/docs/benchmarks/mocks) for methodology details and environment information.
:::

*Last generated: 2026-05-06T03:25:44.139Z*
*Last generated: 2026-05-07T03:27:11.074Z*
52 changes: 26 additions & 26 deletions docs/docs/benchmarks/mocks/Invocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 4
# Invocation Benchmark

:::info Last Updated
This benchmark was automatically generated on **2026-05-06** from the latest CI run.
This benchmark was automatically generated on **2026-05-07** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 10.0.203
:::
Expand All @@ -18,12 +18,12 @@ Calling methods on mock objects:

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 233.02 ns | 77.76 ns | 4.262 ns | 120 B |
| Imposter | 267.71 ns | 53.17 ns | 2.915 ns | 168 B |
| Mockolate | 92.02 ns | 20.98 ns | 1.150 ns | 84 B |
| Moq | 713.40 ns | 260.71 ns | 14.290 ns | 376 B |
| NSubstitute | 673.83 ns | 142.09 ns | 7.789 ns | 360 B |
| FakeItEasy | 1,531.74 ns | 376.17 ns | 20.619 ns | 944 B |
| **TUnit.Mocks** | 252.11 ns | 76.98 ns | 4.220 ns | 120 B |
| Imposter | 287.71 ns | 61.54 ns | 3.373 ns | 168 B |
| Mockolate | 101.11 ns | 39.40 ns | 2.160 ns | 84 B |
| Moq | 785.48 ns | 113.60 ns | 6.227 ns | 376 B |
| NSubstitute | 693.53 ns | 314.80 ns | 17.255 ns | 304 B |
| FakeItEasy | 1,678.21 ns | 253.33 ns | 13.886 ns | 944 B |

```mermaid
%%{init: {
Expand All @@ -49,8 +49,8 @@ Calling methods on mock objects:
xychart-beta
title "Invocation Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 1839
bar [233.02, 267.71, 92.02, 713.4, 673.83, 1531.74]
y-axis "Time (ns)" 0 --> 2014
bar [252.11, 287.71, 101.11, 785.48, 693.53, 1678.21]
```

---
Expand All @@ -59,12 +59,12 @@ xychart-beta

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 144.21 ns | 67.99 ns | 3.727 ns | 88 B |
| Imposter | 266.34 ns | 97.99 ns | 5.371 ns | 168 B |
| Mockolate | 83.62 ns | 13.86 ns | 0.760 ns | 60 B |
| Moq | 481.25 ns | 39.23 ns | 2.150 ns | 296 B |
| NSubstitute | 589.46 ns | 63.31 ns | 3.470 ns | 272 B |
| FakeItEasy | 1,377.74 ns | 231.05 ns | 12.665 ns | 776 B |
| **TUnit.Mocks** | 152.16 ns | 64.48 ns | 3.534 ns | 88 B |
| Imposter | 291.60 ns | 92.81 ns | 5.087 ns | 168 B |
| Mockolate | 93.12 ns | 45.83 ns | 2.512 ns | 60 B |
| Moq | 546.32 ns | 42.56 ns | 2.333 ns | 296 B |
| NSubstitute | 614.45 ns | 136.78 ns | 7.498 ns | 272 B |
| FakeItEasy | 1,520.86 ns | 468.61 ns | 25.686 ns | 776 B |

```mermaid
%%{init: {
Expand All @@ -90,8 +90,8 @@ xychart-beta
xychart-beta
title "Invocation (String) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 1654
bar [144.21, 266.34, 83.62, 481.25, 589.46, 1377.74]
y-axis "Time (ns)" 0 --> 1826
bar [152.16, 291.6, 93.12, 546.32, 614.45, 1520.86]
```

---
Expand All @@ -100,12 +100,12 @@ xychart-beta

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 23,685.24 ns | 9,145.49 ns | 501.295 ns | 11936 B |
| Imposter | 26,672.96 ns | 730.92 ns | 40.064 ns | 16800 B |
| Mockolate | 9,008.94 ns | 1,871.82 ns | 102.601 ns | 8400 B |
| Moq | 69,538.52 ns | 9,099.66 ns | 498.783 ns | 37600 B |
| NSubstitute | 63,140.44 ns | 10,488.85 ns | 574.929 ns | 30848 B |
| FakeItEasy | 154,965.78 ns | 63,324.58 ns | 3,471.034 ns | 94400 B |
| **TUnit.Mocks** | 25,281.98 ns | 10,902.54 ns | 597.605 ns | 11936 B |
| Imposter | 28,233.68 ns | 8,459.15 ns | 463.674 ns | 16800 B |
| Mockolate | 9,890.21 ns | 2,103.03 ns | 115.274 ns | 8400 B |
| Moq | 79,312.70 ns | 9,428.16 ns | 516.789 ns | 37600 B |
| NSubstitute | 68,918.59 ns | 25,106.46 ns | 1,376.170 ns | 30848 B |
| FakeItEasy | 169,654.16 ns | 96,965.08 ns | 5,314.983 ns | 94400 B |

```mermaid
%%{init: {
Expand All @@ -131,8 +131,8 @@ xychart-beta
xychart-beta
title "Invocation (100 calls) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 185959
bar [23685.24, 26672.96, 9008.94, 69538.52, 63140.44, 154965.78]
y-axis "Time (ns)" 0 --> 203585
bar [25281.98, 28233.68, 9890.21, 79312.7, 68918.59, 169654.16]
```

## 🎯 Key Insights
Expand All @@ -145,4 +145,4 @@ This benchmark compares **TUnit.Mocks** (source-generated) against runtime proxy
View the [mock benchmarks overview](/docs/benchmarks/mocks) for methodology details and environment information.
:::

*Last generated: 2026-05-06T03:25:44.139Z*
*Last generated: 2026-05-07T03:27:11.074Z*
36 changes: 18 additions & 18 deletions docs/docs/benchmarks/mocks/MockCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 5
# MockCreation Benchmark

:::info Last Updated
This benchmark was automatically generated on **2026-05-06** from the latest CI run.
This benchmark was automatically generated on **2026-05-07** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 10.0.203
:::
Expand All @@ -18,12 +18,12 @@ Mock instance creation performance:

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27.66 ns | 0.617 ns | 1.175 ns | 192 B |
| Imposter | 103.11 ns | 1.050 ns | 0.931 ns | 440 B |
| Mockolate | 65.91 ns | 0.488 ns | 0.456 ns | 424 B |
| Moq | 1,305.63 ns | 25.930 ns | 24.255 ns | 2048 B |
| NSubstitute | 1,879.29 ns | 11.555 ns | 10.243 ns | 5000 B |
| FakeItEasy | 1,909.70 ns | 29.814 ns | 27.888 ns | 2715 B |
| **TUnit.Mocks** | 25.56 ns | 0.221 ns | 0.206 ns | 192 B |
| Imposter | 90.54 ns | 0.555 ns | 0.463 ns | 440 B |
| Mockolate | 60.03 ns | 0.338 ns | 0.300 ns | 424 B |
| Moq | 1,320.57 ns | 18.193 ns | 16.128 ns | 2048 B |
| NSubstitute | 1,754.76 ns | 13.714 ns | 12.157 ns | 5000 B |
| FakeItEasy | 1,657.70 ns | 11.171 ns | 9.903 ns | 2715 B |

```mermaid
%%{init: {
Expand All @@ -49,8 +49,8 @@ Mock instance creation performance:
xychart-beta
title "MockCreation Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 2292
bar [27.66, 103.11, 65.91, 1305.63, 1879.29, 1909.7]
y-axis "Time (ns)" 0 --> 2106
bar [25.56, 90.54, 60.03, 1320.57, 1754.76, 1657.7]
```

---
Expand All @@ -59,12 +59,12 @@ xychart-beta

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27.86 ns | 0.096 ns | 0.080 ns | 192 B |
| Imposter | 162.90 ns | 0.636 ns | 0.595 ns | 696 B |
| Mockolate | 68.79 ns | 0.312 ns | 0.292 ns | 456 B |
| Moq | 1,326.69 ns | 19.780 ns | 18.502 ns | 1912 B |
| NSubstitute | 1,863.52 ns | 15.441 ns | 14.443 ns | 5000 B |
| FakeItEasy | 1,811.12 ns | 12.890 ns | 10.764 ns | 2715 B |
| **TUnit.Mocks** | 25.40 ns | 0.293 ns | 0.274 ns | 192 B |
| Imposter | 141.69 ns | 1.229 ns | 1.089 ns | 696 B |
| Mockolate | 61.27 ns | 0.868 ns | 0.725 ns | 456 B |
| Moq | 1,396.39 ns | 13.222 ns | 12.368 ns | 1912 B |
| NSubstitute | 1,860.03 ns | 27.324 ns | 24.222 ns | 5000 B |
| FakeItEasy | 1,808.52 ns | 31.969 ns | 36.816 ns | 2715 B |

```mermaid
%%{init: {
Expand All @@ -90,8 +90,8 @@ xychart-beta
xychart-beta
title "MockCreation (Repository) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 2237
bar [27.86, 162.9, 68.79, 1326.69, 1863.52, 1811.12]
y-axis "Time (ns)" 0 --> 2233
bar [25.4, 141.69, 61.27, 1396.39, 1860.03, 1808.52]
```

## 🎯 Key Insights
Expand All @@ -104,4 +104,4 @@ This benchmark compares **TUnit.Mocks** (source-generated) against runtime proxy
View the [mock benchmarks overview](/docs/benchmarks/mocks) for methodology details and environment information.
:::

*Last generated: 2026-05-06T03:25:44.139Z*
*Last generated: 2026-05-07T03:27:11.074Z*
36 changes: 18 additions & 18 deletions docs/docs/benchmarks/mocks/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 6
# Setup Benchmark

:::info Last Updated
This benchmark was automatically generated on **2026-05-06** from the latest CI run.
This benchmark was automatically generated on **2026-05-07** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 10.0.203
:::
Expand All @@ -18,12 +18,12 @@ Mock behavior configuration (returns, matchers):

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 420.4 ns | 3.42 ns | 3.20 ns | 2.01 KB |
| Imposter | 761.4 ns | 10.18 ns | 9.53 ns | 6.12 KB |
| Mockolate | 361.2 ns | 7.15 ns | 9.79 ns | 1.68 KB |
| Moq | 426,086.4 ns | 1,616.95 ns | 1,512.49 ns | 28.69 KB |
| NSubstitute | 5,499.1 ns | 78.07 ns | 73.02 ns | 9.01 KB |
| FakeItEasy | 8,184.3 ns | 100.19 ns | 88.82 ns | 10.45 KB |
| **TUnit.Mocks** | 442.5 ns | 7.28 ns | 6.81 ns | 2.01 KB |
| Imposter | 911.3 ns | 18.19 ns | 29.89 ns | 6.12 KB |
| Mockolate | 364.2 ns | 7.16 ns | 7.95 ns | 1.68 KB |
| Moq | 431,403.0 ns | 2,092.55 ns | 1,854.99 ns | 28.64 KB |
| NSubstitute | 5,626.7 ns | 34.76 ns | 29.02 ns | 9.06 KB |
| FakeItEasy | 8,246.7 ns | 88.84 ns | 83.10 ns | 10.45 KB |

```mermaid
%%{init: {
Expand All @@ -49,8 +49,8 @@ Mock behavior configuration (returns, matchers):
xychart-beta
title "Setup Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 511304
bar [420.4, 761.4, 361.2, 426086.4, 5499.1, 8184.3]
y-axis "Time (ns)" 0 --> 517684
bar [442.5, 911.3, 364.2, 431403, 5626.7, 8246.7]
```

---
Expand All @@ -59,12 +59,12 @@ xychart-beta

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 603.1 ns | 6.26 ns | 5.55 ns | 2.59 KB |
| Imposter | 1,351.6 ns | 25.99 ns | 25.53 ns | 10.59 KB |
| Mockolate | 603.6 ns | 3.16 ns | 2.95 ns | 2.82 KB |
| Moq | 112,461.1 ns | 464.25 ns | 434.26 ns | 16.53 KB |
| NSubstitute | 11,790.2 ns | 90.50 ns | 80.23 ns | 20.31 KB |
| FakeItEasy | 7,663.9 ns | 78.05 ns | 65.17 ns | 11.71 KB |
| **TUnit.Mocks** | 636.4 ns | 12.75 ns | 13.10 ns | 2.59 KB |
| Imposter | 1,409.7 ns | 16.41 ns | 13.71 ns | 10.59 KB |
| Mockolate | 644.7 ns | 12.93 ns | 15.40 ns | 2.82 KB |
| Moq | 114,127.6 ns | 523.62 ns | 489.79 ns | 16.53 KB |
| NSubstitute | 12,312.4 ns | 125.64 ns | 111.37 ns | 20.31 KB |
| FakeItEasy | 8,144.3 ns | 151.36 ns | 134.18 ns | 11.71 KB |

```mermaid
%%{init: {
Expand All @@ -90,8 +90,8 @@ xychart-beta
xychart-beta
title "Setup (Multiple) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 134954
bar [603.1, 1351.6, 603.6, 112461.1, 11790.2, 7663.9]
y-axis "Time (ns)" 0 --> 136954
bar [636.4, 1409.7, 644.7, 114127.6, 12312.4, 8144.3]
```

## 🎯 Key Insights
Expand All @@ -104,4 +104,4 @@ This benchmark compares **TUnit.Mocks** (source-generated) against runtime proxy
View the [mock benchmarks overview](/docs/benchmarks/mocks) for methodology details and environment information.
:::

*Last generated: 2026-05-06T03:25:44.139Z*
*Last generated: 2026-05-07T03:27:11.074Z*
Loading
Loading