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 @@ -9,7 +9,7 @@ sidebar_position: 2
> Callback registration and execution — comparing **TUnit.Mocks** (source-generated) against runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-08-13** from the latest CI run.
This benchmark was automatically generated on **2026-08-14** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 734.8 ns | 11.19 ns | 9.92 ns | 3.11 KB |
| Imposter | 524.0 ns | 10.30 ns | 11.02 ns | 2.66 KB |
| Mockolate | 394.8 ns | 2.89 ns | 2.70 ns | 1.8 KB |
| Moq | 188,017.9 ns | 833.58 ns | 738.95 ns | 13.26 KB |
| NSubstitute | 5,127.3 ns | 67.20 ns | 62.86 ns | 7.85 KB |
| FakeItEasy | 5,644.8 ns | 72.83 ns | 68.12 ns | 7.44 KB |
| **TUnit.Mocks** | 786.8 ns | 14.75 ns | 21.62 ns | 3.11 KB |
| Imposter | 578.3 ns | 10.90 ns | 16.65 ns | 2.66 KB |
| Mockolate | 430.4 ns | 6.55 ns | 6.12 ns | 1.8 KB |
| Moq | 137,034.5 ns | 2,241.41 ns | 1,986.95 ns | 13.26 KB |
| NSubstitute | 4,740.0 ns | 17.94 ns | 14.98 ns | 7.85 KB |
| FakeItEasy | 5,309.2 ns | 80.01 ns | 74.84 ns | 7.43 KB |

```mermaid
%%{init: {
Expand All @@ -51,8 +51,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 --> 225622
bar [734.8, 524, 394.8, 188017.9, 5127.3, 5644.8]
y-axis "Time (ns)" 0 --> 164442
bar [786.8, 578.3, 430.4, 137034.5, 4740, 5309.2]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 911.8 ns | 16.69 ns | 15.61 ns | 3.2 KB |
| Imposter | 631.1 ns | 7.46 ns | 6.98 ns | 2.82 KB |
| Mockolate | 464.8 ns | 8.91 ns | 9.15 ns | 1.84 KB |
| Moq | 195,675.8 ns | 959.29 ns | 897.32 ns | 13.73 KB |
| NSubstitute | 5,721.5 ns | 20.30 ns | 16.95 ns | 8.41 KB |
| FakeItEasy | 6,738.9 ns | 74.01 ns | 61.80 ns | 9.4 KB |
| **TUnit.Mocks** | 951.1 ns | 10.33 ns | 9.66 ns | 3.2 KB |
| Imposter | 620.2 ns | 12.29 ns | 12.62 ns | 2.82 KB |
| Mockolate | 497.2 ns | 9.52 ns | 8.91 ns | 1.84 KB |
| Moq | 147,571.5 ns | 1,055.75 ns | 935.89 ns | 13.97 KB |
| NSubstitute | 5,532.4 ns | 14.80 ns | 13.12 ns | 8.41 KB |
| FakeItEasy | 6,488.5 ns | 48.43 ns | 45.30 ns | 9.26 KB |

```mermaid
%%{init: {
Expand All @@ -92,8 +92,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 --> 234811
bar [911.8, 631.1, 464.8, 195675.8, 5721.5, 6738.9]
y-axis "Time (ns)" 0 --> 177086
bar [951.1, 620.2, 497.2, 147571.5, 5532.4, 6488.5]
```

## 🎯 Key Insights
Expand All @@ -106,4 +106,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-08-13T03:11:34.997Z*
*Last generated: 2026-08-14T03:10:39.371Z*
20 changes: 10 additions & 10 deletions docs/docs/benchmarks/mocks/CombinedWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 3
> Full workflow: create → setup → invoke → verify — comparing **TUnit.Mocks** (source-generated) against runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-08-13** from the latest CI run.
This benchmark was automatically generated on **2026-08-14** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 2.007 μs | 0.0165 μs | 0.0137 μs | 6.23 KB |
| Imposter | 2.913 μs | 0.0253 μs | 0.0225 μs | 15.71 KB |
| Mockolate | 1.807 μs | 0.0167 μs | 0.0156 μs | 7.36 KB |
| Moq | 409.808 μs | 3.4118 μs | 2.6637 μs | 36.27 KB |
| NSubstitute | 19.603 μs | 0.2260 μs | 0.2004 μs | 26.72 KB |
| FakeItEasy | 18.798 μs | 0.1003 μs | 0.0938 μs | 25.52 KB |
| **TUnit.Mocks** | 1.829 μs | 0.0160 μs | 0.0134 μs | 6.23 KB |
| Imposter | 2.814 μs | 0.0561 μs | 0.0840 μs | 15.71 KB |
| Mockolate | 1.685 μs | 0.0337 μs | 0.0389 μs | 7.36 KB |
| Moq | 403.531 μs | 3.6113 μs | 3.3780 μs | 36.35 KB |
| NSubstitute | 19.141 μs | 0.2215 μs | 0.2072 μs | 26.72 KB |
| FakeItEasy | 18.762 μs | 0.3670 μs | 0.4226 μs | 25.52 KB |

```mermaid
%%{init: {
Expand All @@ -51,8 +51,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 --> 492
bar [2.007, 2.913, 1.807, 409.808, 19.603, 18.798]
y-axis "Time (μs)" 0 --> 485
bar [1.829, 2.814, 1.685, 403.531, 19.141, 18.762]
```

## 🎯 Key Insights
Expand All @@ -65,4 +65,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-08-13T03:11:34.997Z*
*Last generated: 2026-08-14T03:10:39.371Z*
52 changes: 26 additions & 26 deletions docs/docs/benchmarks/mocks/Invocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 4
> Calling methods on mock objects — comparing **TUnit.Mocks** (source-generated) against runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-08-13** from the latest CI run.
This benchmark was automatically generated on **2026-08-14** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 271.27 ns | 103.81 ns | 5.690 ns | 128 B |
| Imposter | 291.24 ns | 27.92 ns | 1.531 ns | 168 B |
| Mockolate | 103.21 ns | 16.15 ns | 0.885 ns | 84 B |
| Moq | 777.36 ns | 177.21 ns | 9.713 ns | 376 B |
| NSubstitute | 704.88 ns | 183.12 ns | 10.037 ns | 304 B |
| FakeItEasy | 1,697.43 ns | 421.18 ns | 23.087 ns | 944 B |
| **TUnit.Mocks** | 268.45 ns | 79.80 ns | 4.374 ns | 128 B |
| Imposter | 289.00 ns | 93.15 ns | 5.106 ns | 168 B |
| Mockolate | 101.83 ns | 11.66 ns | 0.639 ns | 84 B |
| Moq | 793.18 ns | 106.36 ns | 5.830 ns | 376 B |
| NSubstitute | 705.40 ns | 182.39 ns | 9.997 ns | 304 B |
| FakeItEasy | 1,719.24 ns | 1,055.03 ns | 57.830 ns | 944 B |

```mermaid
%%{init: {
Expand All @@ -51,8 +51,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 --> 2037
bar [271.27, 291.24, 103.21, 777.36, 704.88, 1697.43]
y-axis "Time (ns)" 0 --> 2064
bar [268.45, 289, 101.83, 793.18, 705.4, 1719.24]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 164.60 ns | 70.45 ns | 3.861 ns | 96 B |
| Imposter | 289.32 ns | 74.42 ns | 4.079 ns | 168 B |
| Mockolate | 94.23 ns | 48.84 ns | 2.677 ns | 60 B |
| Moq | 539.45 ns | 143.86 ns | 7.886 ns | 296 B |
| NSubstitute | 653.06 ns | 186.83 ns | 10.241 ns | 328 B |
| FakeItEasy | 1,518.09 ns | 234.88 ns | 12.875 ns | 776 B |
| **TUnit.Mocks** | 165.63 ns | 73.61 ns | 4.035 ns | 96 B |
| Imposter | 285.75 ns | 97.75 ns | 5.358 ns | 168 B |
| Mockolate | 97.13 ns | 99.25 ns | 5.440 ns | 60 B |
| Moq | 514.02 ns | 74.25 ns | 4.070 ns | 296 B |
| NSubstitute | 601.32 ns | 166.86 ns | 9.146 ns | 272 B |
| FakeItEasy | 1,503.70 ns | 106.49 ns | 5.837 ns | 776 B |

```mermaid
%%{init: {
Expand All @@ -92,8 +92,8 @@ xychart-beta
xychart-beta
title "Invocation (String) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 1822
bar [164.6, 289.32, 94.23, 539.45, 653.06, 1518.09]
y-axis "Time (ns)" 0 --> 1805
bar [165.63, 285.75, 97.13, 514.02, 601.32, 1503.7]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27,059.02 ns | 9,802.42 ns | 537.304 ns | 12736 B |
| Imposter | 28,972.46 ns | 8,516.92 ns | 466.841 ns | 16800 B |
| Mockolate | 10,218.31 ns | 2,665.59 ns | 146.110 ns | 8400 B |
| Moq | 78,298.38 ns | 8,722.90 ns | 478.131 ns | 37600 B |
| NSubstitute | 70,841.76 ns | 8,724.99 ns | 478.246 ns | 30848 B |
| FakeItEasy | 170,617.91 ns | 71,063.17 ns | 3,895.212 ns | 94400 B |
| **TUnit.Mocks** | 26,709.70 ns | 9,762.66 ns | 535.125 ns | 12736 B |
| Imposter | 29,107.61 ns | 4,931.72 ns | 270.324 ns | 16800 B |
| Mockolate | 10,542.20 ns | 5,476.53 ns | 300.187 ns | 8400 B |
| Moq | 76,246.07 ns | 6,397.02 ns | 350.642 ns | 37600 B |
| NSubstitute | 70,813.61 ns | 33,905.80 ns | 1,858.491 ns | 30848 B |
| FakeItEasy | 171,122.68 ns | 44,291.21 ns | 2,427.751 ns | 94400 B |

```mermaid
%%{init: {
Expand All @@ -133,8 +133,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 --> 204742
bar [27059.02, 28972.46, 10218.31, 78298.38, 70841.76, 170617.91]
y-axis "Time (ns)" 0 --> 205348
bar [26709.7, 29107.61, 10542.2, 76246.07, 70813.61, 171122.68]
```

## 🎯 Key Insights
Expand All @@ -147,4 +147,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-08-13T03:11:34.997Z*
*Last generated: 2026-08-14T03:10:39.371Z*
36 changes: 18 additions & 18 deletions docs/docs/benchmarks/mocks/MockCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 5
> Mock instance creation performance — comparing **TUnit.Mocks** (source-generated) against runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-08-13** from the latest CI run.
This benchmark was automatically generated on **2026-08-14** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 29.47 ns | 0.464 ns | 0.434 ns | 200 B |
| Imposter | 93.36 ns | 0.833 ns | 0.779 ns | 440 B |
| Mockolate | 18.54 ns | 0.432 ns | 0.853 ns | 160 B |
| Moq | 1,343.30 ns | 13.552 ns | 12.676 ns | 2048 B |
| NSubstitute | 1,843.55 ns | 15.124 ns | 14.147 ns | 5000 B |
| FakeItEasy | 1,723.54 ns | 25.921 ns | 22.978 ns | 2715 B |
| **TUnit.Mocks** | 33.65 ns | 0.116 ns | 0.103 ns | 200 B |
| Imposter | 105.36 ns | 0.943 ns | 0.882 ns | 440 B |
| Mockolate | 19.91 ns | 0.167 ns | 0.148 ns | 160 B |
| Moq | 1,238.69 ns | 19.359 ns | 18.109 ns | 2048 B |
| NSubstitute | 1,790.32 ns | 31.290 ns | 29.269 ns | 5000 B |
| FakeItEasy | 1,772.04 ns | 35.277 ns | 60.850 ns | 2715 B |

```mermaid
%%{init: {
Expand All @@ -51,8 +51,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 --> 2213
bar [29.47, 93.36, 18.54, 1343.3, 1843.55, 1723.54]
y-axis "Time (ns)" 0 --> 2149
bar [33.65, 105.36, 19.91, 1238.69, 1790.32, 1772.04]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 28.98 ns | 0.559 ns | 0.496 ns | 200 B |
| Imposter | 149.43 ns | 2.858 ns | 2.807 ns | 696 B |
| Mockolate | 17.94 ns | 0.242 ns | 0.226 ns | 176 B |
| Moq | 1,335.78 ns | 6.784 ns | 6.346 ns | 1912 B |
| NSubstitute | 1,833.25 ns | 11.983 ns | 11.209 ns | 5000 B |
| FakeItEasy | 1,781.45 ns | 34.471 ns | 32.245 ns | 2715 B |
| **TUnit.Mocks** | 30.82 ns | 0.664 ns | 0.765 ns | 200 B |
| Imposter | 157.54 ns | 1.012 ns | 0.947 ns | 696 B |
| Mockolate | 18.45 ns | 0.152 ns | 0.135 ns | 176 B |
| Moq | 1,318.96 ns | 16.769 ns | 15.686 ns | 1912 B |
| NSubstitute | 1,872.39 ns | 26.909 ns | 25.171 ns | 5000 B |
| FakeItEasy | 1,898.57 ns | 36.613 ns | 54.801 ns | 2715 B |

```mermaid
%%{init: {
Expand All @@ -92,8 +92,8 @@ xychart-beta
xychart-beta
title "MockCreation (Repository) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 2200
bar [28.98, 149.43, 17.94, 1335.78, 1833.25, 1781.45]
y-axis "Time (ns)" 0 --> 2279
bar [30.82, 157.54, 18.45, 1318.96, 1872.39, 1898.57]
```

## 🎯 Key Insights
Expand All @@ -106,4 +106,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-08-13T03:11:34.997Z*
*Last generated: 2026-08-14T03:10:39.371Z*
36 changes: 18 additions & 18 deletions docs/docs/benchmarks/mocks/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 6
> Mock behavior configuration (returns, matchers) — comparing **TUnit.Mocks** (source-generated) against runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-08-13** from the latest CI run.
This benchmark was automatically generated on **2026-08-14** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 516.1 ns | 4.38 ns | 3.88 ns | 2.34 KB |
| Imposter | 806.8 ns | 4.53 ns | 4.24 ns | 6.12 KB |
| Mockolate | 317.0 ns | 2.34 ns | 2.08 ns | 1.41 KB |
| Moq | 439,566.4 ns | 3,005.21 ns | 2,811.08 ns | 28.52 KB |
| NSubstitute | 6,233.9 ns | 38.32 ns | 35.84 ns | 9.01 KB |
| FakeItEasy | 8,406.9 ns | 102.73 ns | 96.09 ns | 10.45 KB |
| **TUnit.Mocks** | 423.5 ns | 2.14 ns | 2.00 ns | 2.34 KB |
| Imposter | 599.2 ns | 1.86 ns | 1.74 ns | 6.12 KB |
| Mockolate | 256.9 ns | 1.13 ns | 1.00 ns | 1.41 KB |
| Moq | 235,541.7 ns | 949.89 ns | 888.52 ns | 28.56 KB |
| NSubstitute | 4,617.9 ns | 34.57 ns | 32.34 ns | 9.06 KB |
| FakeItEasy | 5,429.5 ns | 19.18 ns | 17.94 ns | 10.45 KB |

```mermaid
%%{init: {
Expand All @@ -51,8 +51,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 --> 527480
bar [516.1, 806.8, 317, 439566.4, 6233.9, 8406.9]
y-axis "Time (ns)" 0 --> 282651
bar [423.5, 599.2, 256.9, 235541.7, 4617.9, 5429.5]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 780.3 ns | 4.31 ns | 3.60 ns | 3.15 KB |
| Imposter | 1,373.8 ns | 4.52 ns | 4.01 ns | 10.59 KB |
| Mockolate | 549.0 ns | 5.25 ns | 4.91 ns | 2.35 KB |
| Moq | 116,924.2 ns | 924.63 ns | 864.90 ns | 16.61 KB |
| NSubstitute | 12,615.8 ns | 101.97 ns | 90.39 ns | 20.5 KB |
| FakeItEasy | 8,146.0 ns | 75.67 ns | 63.19 ns | 11.82 KB |
| **TUnit.Mocks** | 637.3 ns | 2.26 ns | 2.11 ns | 3.15 KB |
| Imposter | 1,075.7 ns | 7.03 ns | 6.24 ns | 10.59 KB |
| Mockolate | 439.5 ns | 2.62 ns | 2.45 ns | 2.35 KB |
| Moq | 68,467.0 ns | 280.75 ns | 234.44 ns | 16.53 KB |
| NSubstitute | 8,887.1 ns | 39.55 ns | 36.99 ns | 20.31 KB |
| FakeItEasy | 5,190.4 ns | 27.32 ns | 24.22 ns | 11.71 KB |

```mermaid
%%{init: {
Expand All @@ -92,8 +92,8 @@ xychart-beta
xychart-beta
title "Setup (Multiple) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 140310
bar [780.3, 1373.8, 549, 116924.2, 12615.8, 8146]
y-axis "Time (ns)" 0 --> 82161
bar [637.3, 1075.7, 439.5, 68467, 8887.1, 5190.4]
```

## 🎯 Key Insights
Expand All @@ -106,4 +106,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-08-13T03:11:34.997Z*
*Last generated: 2026-08-14T03:10:39.371Z*
Loading
Loading