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-25** from the latest CI run.
This benchmark was automatically generated on **2026-05-26** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 663.5 ns | 5.22 ns | 4.36 ns | 3.08 KB |
| Imposter | 458.6 ns | 1.69 ns | 1.49 ns | 2.66 KB |
| Mockolate | 360.1 ns | 4.22 ns | 3.52 ns | 1.91 KB |
| Moq | 186,068.5 ns | 950.98 ns | 843.02 ns | 13.14 KB |
| NSubstitute | 4,532.7 ns | 42.41 ns | 39.67 ns | 7.93 KB |
| FakeItEasy | 5,121.4 ns | 42.55 ns | 39.80 ns | 7.44 KB |
| **TUnit.Mocks** | 668.2 ns | 2.21 ns | 1.96 ns | 3.08 KB |
| Imposter | 487.8 ns | 2.57 ns | 2.28 ns | 2.66 KB |
| Mockolate | 346.0 ns | 2.11 ns | 1.87 ns | 1.91 KB |
| Moq | 135,973.7 ns | 978.00 ns | 866.97 ns | 13.15 KB |
| NSubstitute | 4,044.3 ns | 42.81 ns | 35.75 ns | 7.93 KB |
| FakeItEasy | 4,499.5 ns | 39.30 ns | 36.76 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 --> 223283
bar [663.5, 458.6, 360.1, 186068.5, 4532.7, 5121.4]
y-axis "Time (ns)" 0 --> 163169
bar [668.2, 487.8, 346, 135973.7, 4044.3, 4499.5]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 771.8 ns | 3.49 ns | 3.27 ns | 3.16 KB |
| Imposter | 519.9 ns | 2.13 ns | 1.78 ns | 2.82 KB |
| Mockolate | 399.6 ns | 4.33 ns | 4.05 ns | 1.95 KB |
| Moq | 195,338.2 ns | 462.94 ns | 386.58 ns | 13.73 KB |
| NSubstitute | 4,996.4 ns | 56.33 ns | 52.70 ns | 8.53 KB |
| FakeItEasy | 6,133.9 ns | 83.26 ns | 73.81 ns | 9.26 KB |
| **TUnit.Mocks** | 755.9 ns | 6.16 ns | 5.46 ns | 3.16 KB |
| Imposter | 544.2 ns | 5.55 ns | 4.92 ns | 2.82 KB |
| Mockolate | 386.9 ns | 1.58 ns | 1.23 ns | 1.95 KB |
| Moq | 142,414.3 ns | 1,191.32 ns | 1,114.36 ns | 13.73 KB |
| NSubstitute | 4,686.3 ns | 19.08 ns | 17.85 ns | 8.53 KB |
| FakeItEasy | 5,427.7 ns | 25.37 ns | 21.18 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 --> 234406
bar [771.8, 519.9, 399.6, 195338.2, 4996.4, 6133.9]
y-axis "Time (ns)" 0 --> 170898
bar [755.9, 544.2, 386.9, 142414.3, 4686.3, 5427.7]
```

## 🎯 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-25T03:29:24.567Z*
*Last generated: 2026-05-26T03:27:58.119Z*
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-25** from the latest CI run.
This benchmark was automatically generated on **2026-05-26** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 1.459 μs | 0.0236 μs | 0.0232 μs | 6.11 KB |
| Imposter | 2.111 μs | 0.0364 μs | 0.0304 μs | 15.71 KB |
| Mockolate | 1.338 μs | 0.0254 μs | 0.0669 μs | 7.63 KB |
| Moq | 242.885 μs | 2.0619 μs | 1.8279 μs | 36.75 KB |
| NSubstitute | 12.330 μs | 0.1796 μs | 0.1680 μs | 26.72 KB |
| FakeItEasy | 12.777 μs | 0.1858 μs | 0.1738 μs | 25.52 KB |
| **TUnit.Mocks** | 1.865 μs | 0.0367 μs | 0.0360 μs | 6.11 KB |
| Imposter | 2.639 μs | 0.0528 μs | 0.0925 μs | 15.71 KB |
| Mockolate | 1.714 μs | 0.0338 μs | 0.0601 μs | 7.63 KB |
| Moq | 316.243 μs | 2.2704 μs | 2.0126 μs | 36.16 KB |
| NSubstitute | 16.613 μs | 0.1080 μs | 0.1010 μs | 26.72 KB |
| FakeItEasy | 15.737 μs | 0.2489 μs | 0.2328 μ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 --> 292
bar [1.459, 2.111, 1.338, 242.885, 12.33, 12.777]
y-axis "Time (μs)" 0 --> 380
bar [1.865, 2.639, 1.714, 316.243, 16.613, 15.737]
```

## 🎯 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-25T03:29:24.567Z*
*Last generated: 2026-05-26T03:27:58.119Z*
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-25** from the latest CI run.
This benchmark was automatically generated on **2026-05-26** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 259.66 ns | 58.23 ns | 3.192 ns | 120 B |
| Imposter | 288.73 ns | 75.17 ns | 4.120 ns | 168 B |
| Mockolate | 100.04 ns | 26.21 ns | 1.437 ns | 84 B |
| Moq | 784.36 ns | 206.02 ns | 11.292 ns | 376 B |
| NSubstitute | 691.11 ns | 64.82 ns | 3.553 ns | 304 B |
| FakeItEasy | 1,678.74 ns | 668.83 ns | 36.661 ns | 944 B |
| **TUnit.Mocks** | 266.37 ns | 70.95 ns | 3.889 ns | 120 B |
| Imposter | 299.92 ns | 18.43 ns | 1.010 ns | 168 B |
| Mockolate | 127.28 ns | 14.44 ns | 0.791 ns | 84 B |
| Moq | 819.40 ns | 489.19 ns | 26.814 ns | 376 B |
| NSubstitute | 745.44 ns | 131.71 ns | 7.220 ns | 304 B |
| FakeItEasy | 2,031.36 ns | 454.12 ns | 24.892 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 --> 2015
bar [259.66, 288.73, 100.04, 784.36, 691.11, 1678.74]
y-axis "Time (ns)" 0 --> 2438
bar [266.37, 299.92, 127.28, 819.4, 745.44, 2031.36]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 158.77 ns | 72.90 ns | 3.996 ns | 88 B |
| Imposter | 287.83 ns | 56.81 ns | 3.114 ns | 168 B |
| Mockolate | 90.76 ns | 29.79 ns | 1.633 ns | 60 B |
| Moq | 514.18 ns | 82.00 ns | 4.495 ns | 296 B |
| NSubstitute | 604.24 ns | 336.93 ns | 18.468 ns | 272 B |
| FakeItEasy | 1,487.68 ns | 428.57 ns | 23.492 ns | 776 B |
| **TUnit.Mocks** | 160.37 ns | 71.06 ns | 3.895 ns | 88 B |
| Imposter | 299.72 ns | 172.64 ns | 9.463 ns | 168 B |
| Mockolate | 95.72 ns | 74.38 ns | 4.077 ns | 60 B |
| Moq | 514.31 ns | 62.90 ns | 3.448 ns | 296 B |
| NSubstitute | 601.13 ns | 262.05 ns | 14.364 ns | 272 B |
| FakeItEasy | 1,485.52 ns | 106.14 ns | 5.818 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 --> 1786
bar [158.77, 287.83, 90.76, 514.18, 604.24, 1487.68]
y-axis "Time (ns)" 0 --> 1783
bar [160.37, 299.72, 95.72, 514.31, 601.13, 1485.52]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 25,914.65 ns | 9,855.30 ns | 540.202 ns | 11936 B |
| Imposter | 28,381.28 ns | 8,355.31 ns | 457.982 ns | 16800 B |
| Mockolate | 10,029.83 ns | 6,466.90 ns | 354.472 ns | 8400 B |
| Moq | 78,131.06 ns | 9,271.83 ns | 508.220 ns | 37600 B |
| NSubstitute | 70,476.07 ns | 21,812.86 ns | 1,195.636 ns | 30848 B |
| FakeItEasy | 167,158.20 ns | 44,448.50 ns | 2,436.372 ns | 94400 B |
| **TUnit.Mocks** | 25,979.39 ns | 9,532.60 ns | 522.514 ns | 11936 B |
| Imposter | 29,063.61 ns | 10,948.92 ns | 600.147 ns | 16800 B |
| Mockolate | 9,783.73 ns | 1,625.23 ns | 89.084 ns | 8400 B |
| Moq | 78,221.85 ns | 21,526.57 ns | 1,179.944 ns | 37600 B |
| NSubstitute | 69,453.97 ns | 13,579.64 ns | 744.346 ns | 30848 B |
| FakeItEasy | 167,866.12 ns | 44,812.34 ns | 2,456.315 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 --> 200590
bar [25914.65, 28381.28, 10029.83, 78131.06, 70476.07, 167158.2]
y-axis "Time (ns)" 0 --> 201440
bar [25979.39, 29063.61, 9783.73, 78221.85, 69453.97, 167866.12]
```

## 🎯 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-25T03:29:24.567Z*
*Last generated: 2026-05-26T03:27:58.119Z*
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-25** from the latest CI run.
This benchmark was automatically generated on **2026-05-26** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 26.10 ns | 0.029 ns | 0.026 ns | 192 B |
| Imposter | 94.67 ns | 0.063 ns | 0.052 ns | 440 B |
| Mockolate | 61.07 ns | 0.219 ns | 0.194 ns | 424 B |
| Moq | 1,245.11 ns | 15.225 ns | 14.241 ns | 2048 B |
| NSubstitute | 1,692.56 ns | 4.372 ns | 3.651 ns | 5000 B |
| FakeItEasy | 1,628.34 ns | 4.426 ns | 4.140 ns | 2715 B |
| **TUnit.Mocks** | 26.13 ns | 0.204 ns | 0.191 ns | 192 B |
| Imposter | 106.90 ns | 2.106 ns | 2.069 ns | 440 B |
| Mockolate | 61.44 ns | 0.312 ns | 0.277 ns | 424 B |
| Moq | 1,244.49 ns | 14.417 ns | 13.485 ns | 2048 B |
| NSubstitute | 1,674.31 ns | 6.676 ns | 5.575 ns | 5000 B |
| FakeItEasy | 1,580.04 ns | 5.243 ns | 4.648 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 --> 2032
bar [26.1, 94.67, 61.07, 1245.11, 1692.56, 1628.34]
y-axis "Time (ns)" 0 --> 2010
bar [26.13, 106.9, 61.44, 1244.49, 1674.31, 1580.04]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 26.44 ns | 0.158 ns | 0.140 ns | 192 B |
| Imposter | 149.26 ns | 0.660 ns | 0.585 ns | 696 B |
| Mockolate | 62.87 ns | 0.216 ns | 0.181 ns | 456 B |
| Moq | 1,193.82 ns | 2.942 ns | 2.456 ns | 1912 B |
| NSubstitute | 1,687.02 ns | 3.160 ns | 2.801 ns | 5000 B |
| FakeItEasy | 1,590.66 ns | 6.670 ns | 6.239 ns | 2715 B |
| **TUnit.Mocks** | 26.30 ns | 0.183 ns | 0.163 ns | 192 B |
| Imposter | 148.78 ns | 0.500 ns | 0.443 ns | 696 B |
| Mockolate | 63.25 ns | 0.430 ns | 0.381 ns | 456 B |
| Moq | 1,250.84 ns | 19.706 ns | 16.455 ns | 1912 B |
| NSubstitute | 1,717.91 ns | 4.914 ns | 4.104 ns | 5000 B |
| FakeItEasy | 1,622.80 ns | 32.448 ns | 31.869 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 --> 2025
bar [26.44, 149.26, 62.87, 1193.82, 1687.02, 1590.66]
y-axis "Time (ns)" 0 --> 2062
bar [26.3, 148.78, 63.25, 1250.84, 1717.91, 1622.8]
```

## 🎯 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-25T03:29:24.567Z*
*Last generated: 2026-05-26T03:27:58.119Z*
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-25** from the latest CI run.
This benchmark was automatically generated on **2026-05-26** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 447.7 ns | 7.04 ns | 6.58 ns | 2.31 KB |
| Imposter | 652.9 ns | 11.43 ns | 26.04 ns | 6.12 KB |
| Mockolate | 280.1 ns | 3.80 ns | 3.36 ns | 1.65 KB |
| Moq | 244,947.3 ns | 1,959.41 ns | 1,736.97 ns | 28.56 KB |
| NSubstitute | 4,170.7 ns | 72.04 ns | 73.98 ns | 9.01 KB |
| FakeItEasy | 5,698.9 ns | 111.02 ns | 136.35 ns | 10.45 KB |
| **TUnit.Mocks** | 418.1 ns | 3.75 ns | 3.32 ns | 2.31 KB |
| Imposter | 618.4 ns | 6.93 ns | 6.48 ns | 6.12 KB |
| Mockolate | 286.5 ns | 3.92 ns | 3.48 ns | 1.65 KB |
| Moq | 244,933.5 ns | 1,749.99 ns | 1,636.94 ns | 28.7 KB |
| NSubstitute | 4,016.2 ns | 28.05 ns | 26.23 ns | 9.06 KB |
| FakeItEasy | 5,476.4 ns | 42.30 ns | 39.57 ns | 10.6 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 --> 293937
bar [447.7, 652.9, 280.1, 244947.3, 4170.7, 5698.9]
y-axis "Time (ns)" 0 --> 293921
bar [418.1, 618.4, 286.5, 244933.5, 4016.2, 5476.4]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 644.7 ns | 12.11 ns | 11.33 ns | 3.09 KB |
| Imposter | 1,162.7 ns | 23.05 ns | 29.98 ns | 10.59 KB |
| Mockolate | 502.4 ns | 7.59 ns | 7.10 ns | 2.6 KB |
| Moq | 68,766.8 ns | 435.45 ns | 386.01 ns | 16.53 KB |
| NSubstitute | 8,554.8 ns | 167.73 ns | 172.25 ns | 20.31 KB |
| FakeItEasy | 5,684.8 ns | 113.62 ns | 180.21 ns | 11.71 KB |
| **TUnit.Mocks** | 601.8 ns | 8.24 ns | 7.71 ns | 3.09 KB |
| Imposter | 1,042.5 ns | 3.99 ns | 3.53 ns | 10.59 KB |
| Mockolate | 455.1 ns | 1.55 ns | 1.45 ns | 2.6 KB |
| Moq | 67,933.8 ns | 484.58 ns | 429.57 ns | 16.53 KB |
| NSubstitute | 8,199.0 ns | 68.48 ns | 64.06 ns | 20.31 KB |
| FakeItEasy | 5,125.3 ns | 36.29 ns | 30.30 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 --> 82521
bar [644.7, 1162.7, 502.4, 68766.8, 8554.8, 5684.8]
y-axis "Time (ns)" 0 --> 81521
bar [601.8, 1042.5, 455.1, 67933.8, 8199, 5125.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-25T03:29:24.567Z*
*Last generated: 2026-05-26T03:27:58.119Z*
Loading
Loading