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-07-17** from the latest CI run.
This benchmark was automatically generated on **2026-07-18** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 705.9 ns | 12.13 ns | 11.35 ns | 3.11 KB |
| Imposter | 495.0 ns | 8.32 ns | 7.79 ns | 2.66 KB |
| Mockolate | 374.5 ns | 5.34 ns | 5.00 ns | 1.8 KB |
| Moq | 187,749.2 ns | 636.52 ns | 595.40 ns | 13.14 KB |
| NSubstitute | 4,849.4 ns | 26.18 ns | 24.49 ns | 7.85 KB |
| FakeItEasy | 5,577.3 ns | 19.67 ns | 17.44 ns | 7.44 KB |
| **TUnit.Mocks** | 655.2 ns | 6.41 ns | 5.99 ns | 3.11 KB |
| Imposter | 471.4 ns | 5.40 ns | 5.05 ns | 2.66 KB |
| Mockolate | 347.4 ns | 2.36 ns | 2.21 ns | 1.8 KB |
| Moq | 133,770.5 ns | 1,422.05 ns | 1,260.61 ns | 13.14 KB |
| NSubstitute | 4,456.9 ns | 84.09 ns | 78.66 ns | 7.85 KB |
| FakeItEasy | 4,787.2 ns | 65.19 ns | 60.97 ns | 7.44 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 --> 225300
bar [705.9, 495, 374.5, 187749.2, 4849.4, 5577.3]
y-axis "Time (ns)" 0 --> 160525
bar [655.2, 471.4, 347.4, 133770.5, 4456.9, 4787.2]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 846.5 ns | 9.86 ns | 9.22 ns | 3.2 KB |
| Imposter | 580.3 ns | 5.58 ns | 4.95 ns | 2.82 KB |
| Mockolate | 430.3 ns | 6.02 ns | 5.63 ns | 1.84 KB |
| Moq | 196,757.9 ns | 723.51 ns | 676.77 ns | 13.73 KB |
| NSubstitute | 5,578.5 ns | 28.29 ns | 26.46 ns | 8.41 KB |
| FakeItEasy | 6,904.4 ns | 129.86 ns | 121.47 ns | 9.4 KB |
| **TUnit.Mocks** | 771.7 ns | 3.27 ns | 2.90 ns | 3.2 KB |
| Imposter | 573.9 ns | 4.82 ns | 4.28 ns | 2.82 KB |
| Mockolate | 387.3 ns | 2.37 ns | 2.10 ns | 1.84 KB |
| Moq | 144,225.1 ns | 1,534.94 ns | 1,281.75 ns | 13.73 KB |
| NSubstitute | 4,914.5 ns | 51.14 ns | 42.70 ns | 8.41 KB |
| FakeItEasy | 5,963.3 ns | 43.31 ns | 38.40 ns | 9.4 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 --> 236110
bar [846.5, 580.3, 430.3, 196757.9, 5578.5, 6904.4]
y-axis "Time (ns)" 0 --> 173071
bar [771.7, 573.9, 387.3, 144225.1, 4914.5, 5963.3]
```

## 🎯 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-07-17T03:20:48.806Z*
*Last generated: 2026-07-18T03:20:37.479Z*
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-07-17** from the latest CI run.
This benchmark was automatically generated on **2026-07-18** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 2.119 μs | 0.0188 μs | 0.0167 μs | 6.23 KB |
| Imposter | 3.022 μs | 0.0375 μs | 0.0332 μs | 15.71 KB |
| Mockolate | 1.865 μs | 0.0201 μs | 0.0188 μs | 7.36 KB |
| Moq | 411.688 μs | 2.8362 μs | 2.6530 μs | 36.16 KB |
| NSubstitute | 18.220 μs | 0.1458 μs | 0.1293 μs | 26.72 KB |
| FakeItEasy | 19.560 μs | 0.2402 μs | 0.2247 μs | 25.52 KB |
| **TUnit.Mocks** | 1.974 μs | 0.0329 μs | 0.0308 μs | 6.23 KB |
| Imposter | 2.916 μs | 0.0375 μs | 0.0332 μs | 15.71 KB |
| Mockolate | 1.841 μs | 0.0257 μs | 0.0241 μs | 7.36 KB |
| Moq | 415.950 μs | 1.7887 μs | 1.5857 μs | 36.16 KB |
| NSubstitute | 17.697 μs | 0.2103 μs | 0.1967 μs | 26.72 KB |
| FakeItEasy | 19.178 μs | 0.1046 μs | 0.0927 μ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 --> 495
bar [2.119, 3.022, 1.865, 411.688, 18.22, 19.56]
y-axis "Time (μs)" 0 --> 500
bar [1.974, 2.916, 1.841, 415.95, 17.697, 19.178]
```

## 🎯 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-07-17T03:20:48.806Z*
*Last generated: 2026-07-18T03:20:37.479Z*
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-07-17** from the latest CI run.
This benchmark was automatically generated on **2026-07-18** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 273.21 ns | 54.95 ns | 3.012 ns | 128 B |
| Imposter | 295.60 ns | 64.58 ns | 3.540 ns | 168 B |
| Mockolate | 116.27 ns | 54.60 ns | 2.993 ns | 84 B |
| Moq | 826.32 ns | 428.39 ns | 23.482 ns | 376 B |
| NSubstitute | 711.93 ns | 117.66 ns | 6.449 ns | 304 B |
| FakeItEasy | 1,688.72 ns | 615.50 ns | 33.738 ns | 944 B |
| **TUnit.Mocks** | 268.82 ns | 94.050 ns | 5.155 ns | 128 B |
| Imposter | 289.23 ns | 72.458 ns | 3.972 ns | 168 B |
| Mockolate | 97.23 ns | 8.163 ns | 0.447 ns | 84 B |
| Moq | 779.18 ns | 102.106 ns | 5.597 ns | 376 B |
| NSubstitute | 687.43 ns | 84.433 ns | 4.628 ns | 304 B |
| FakeItEasy | 1,646.50 ns | 171.102 ns | 9.379 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 --> 2027
bar [273.21, 295.6, 116.27, 826.32, 711.93, 1688.72]
y-axis "Time (ns)" 0 --> 1976
bar [268.82, 289.23, 97.23, 779.18, 687.43, 1646.5]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 167.79 ns | 78.26 ns | 4.290 ns | 96 B |
| Imposter | 296.53 ns | 25.92 ns | 1.421 ns | 168 B |
| Mockolate | 93.26 ns | 21.15 ns | 1.159 ns | 60 B |
| Moq | 549.13 ns | 106.61 ns | 5.843 ns | 296 B |
| NSubstitute | 636.74 ns | 195.01 ns | 10.689 ns | 272 B |
| FakeItEasy | 1,580.87 ns | 263.68 ns | 14.453 ns | 776 B |
| **TUnit.Mocks** | 164.49 ns | 77.738 ns | 4.261 ns | 96 B |
| Imposter | 289.85 ns | 91.629 ns | 5.023 ns | 168 B |
| Mockolate | 91.17 ns | 3.098 ns | 0.170 ns | 60 B |
| Moq | 512.51 ns | 50.686 ns | 2.778 ns | 296 B |
| NSubstitute | 588.63 ns | 217.284 ns | 11.910 ns | 272 B |
| FakeItEasy | 1,481.92 ns | 165.295 ns | 9.060 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 --> 1898
bar [167.79, 296.53, 93.26, 549.13, 636.74, 1580.87]
y-axis "Time (ns)" 0 --> 1779
bar [164.49, 289.85, 91.17, 512.51, 588.63, 1481.92]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27,119.94 ns | 11,658.13 ns | 639.021 ns | 12736 B |
| Imposter | 28,877.92 ns | 6,810.75 ns | 373.320 ns | 16800 B |
| Mockolate | 10,425.92 ns | 3,862.76 ns | 211.731 ns | 8400 B |
| Moq | 80,932.02 ns | 4,243.47 ns | 232.599 ns | 37600 B |
| NSubstitute | 70,858.46 ns | 4,713.41 ns | 258.358 ns | 30848 B |
| FakeItEasy | 178,405.95 ns | 6,746.21 ns | 369.782 ns | 94400 B |
| **TUnit.Mocks** | 26,660.50 ns | 12,290.566 ns | 673.687 ns | 12736 B |
| Imposter | 28,408.06 ns | 6,953.330 ns | 381.136 ns | 16800 B |
| Mockolate | 9,741.00 ns | 2,523.004 ns | 138.294 ns | 8400 B |
| Moq | 79,583.09 ns | 24,667.273 ns | 1,352.096 ns | 37600 B |
| NSubstitute | 67,980.85 ns | 21,638.056 ns | 1,186.055 ns | 30848 B |
| FakeItEasy | 166,533.82 ns | 67,417.348 ns | 3,695.372 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 --> 214088
bar [27119.94, 28877.92, 10425.92, 80932.02, 70858.46, 178405.95]
y-axis "Time (ns)" 0 --> 199841
bar [26660.5, 28408.06, 9741, 79583.09, 67980.85, 166533.82]
```

## 🎯 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-07-17T03:20:48.806Z*
*Last generated: 2026-07-18T03:20:37.479Z*
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-07-17** from the latest CI run.
This benchmark was automatically generated on **2026-07-18** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 31.99 ns | 0.682 ns | 0.700 ns | 200 B |
| Imposter | 102.07 ns | 0.742 ns | 0.694 ns | 440 B |
| Mockolate | 18.04 ns | 0.170 ns | 0.150 ns | 160 B |
| Moq | 1,303.32 ns | 25.278 ns | 25.959 ns | 2048 B |
| NSubstitute | 1,821.50 ns | 25.868 ns | 22.931 ns | 5000 B |
| FakeItEasy | 1,877.85 ns | 34.474 ns | 38.317 ns | 2715 B |
| **TUnit.Mocks** | 31.95 ns | 0.635 ns | 0.594 ns | 200 B |
| Imposter | 97.86 ns | 1.407 ns | 1.316 ns | 440 B |
| Mockolate | 18.20 ns | 0.389 ns | 0.364 ns | 160 B |
| Moq | 1,306.58 ns | 25.476 ns | 25.021 ns | 2048 B |
| NSubstitute | 1,816.36 ns | 13.766 ns | 12.203 ns | 5000 B |
| FakeItEasy | 1,681.08 ns | 18.761 ns | 17.549 ns | 2723 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 --> 2254
bar [31.99, 102.07, 18.04, 1303.32, 1821.5, 1877.85]
y-axis "Time (ns)" 0 --> 2180
bar [31.95, 97.86, 18.2, 1306.58, 1816.36, 1681.08]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 30.44 ns | 0.304 ns | 0.269 ns | 200 B |
| Imposter | 160.49 ns | 1.458 ns | 1.293 ns | 696 B |
| Mockolate | 19.24 ns | 0.270 ns | 0.240 ns | 176 B |
| Moq | 1,239.96 ns | 14.447 ns | 13.514 ns | 1912 B |
| NSubstitute | 1,766.64 ns | 28.811 ns | 32.023 ns | 5000 B |
| FakeItEasy | 1,809.19 ns | 35.980 ns | 82.670 ns | 2715 B |
| **TUnit.Mocks** | 31.93 ns | 0.720 ns | 0.770 ns | 200 B |
| Imposter | 156.44 ns | 3.161 ns | 2.956 ns | 696 B |
| Mockolate | 19.20 ns | 0.466 ns | 0.852 ns | 176 B |
| Moq | 1,315.37 ns | 4.758 ns | 4.451 ns | 1912 B |
| NSubstitute | 1,804.07 ns | 15.707 ns | 14.692 ns | 5000 B |
| FakeItEasy | 1,689.29 ns | 18.356 ns | 17.170 ns | 2723 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 --> 2172
bar [30.44, 160.49, 19.24, 1239.96, 1766.64, 1809.19]
y-axis "Time (ns)" 0 --> 2165
bar [31.93, 156.44, 19.2, 1315.37, 1804.07, 1689.29]
```

## 🎯 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-07-17T03:20:48.806Z*
*Last generated: 2026-07-18T03:20:37.479Z*
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-07-17** from the latest CI run.
This benchmark was automatically generated on **2026-07-18** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 567.8 ns | 4.26 ns | 3.78 ns | 2.34 KB |
| Imposter | 887.0 ns | 12.93 ns | 12.10 ns | 6.12 KB |
| Mockolate | 340.3 ns | 3.38 ns | 3.16 ns | 1.41 KB |
| Moq | 441,111.8 ns | 1,703.21 ns | 1,593.19 ns | 28.52 KB |
| NSubstitute | 5,866.6 ns | 52.26 ns | 48.88 ns | 9.06 KB |
| FakeItEasy | 8,591.2 ns | 57.71 ns | 51.16 ns | 10.45 KB |
| **TUnit.Mocks** | 511.6 ns | 6.39 ns | 5.33 ns | 2.34 KB |
| Imposter | 816.5 ns | 12.93 ns | 15.39 ns | 6.12 KB |
| Mockolate | 311.3 ns | 6.08 ns | 8.32 ns | 1.41 KB |
| Moq | 431,492.8 ns | 4,573.71 ns | 4,278.25 ns | 28.63 KB |
| NSubstitute | 5,484.0 ns | 49.98 ns | 46.75 ns | 9.01 KB |
| FakeItEasy | 8,085.3 ns | 105.45 ns | 98.64 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 --> 529335
bar [567.8, 887, 340.3, 441111.8, 5866.6, 8591.2]
y-axis "Time (ns)" 0 --> 517792
bar [511.6, 816.5, 311.3, 431492.8, 5484, 8085.3]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 818.1 ns | 5.65 ns | 5.01 ns | 3.15 KB |
| Imposter | 1,489.2 ns | 17.66 ns | 16.52 ns | 10.59 KB |
| Mockolate | 595.3 ns | 4.99 ns | 4.67 ns | 2.35 KB |
| Moq | 117,081.2 ns | 574.26 ns | 509.07 ns | 16.53 KB |
| NSubstitute | 12,231.7 ns | 58.14 ns | 51.54 ns | 20.31 KB |
| FakeItEasy | 7,811.1 ns | 63.21 ns | 56.04 ns | 11.71 KB |
| **TUnit.Mocks** | 803.4 ns | 15.99 ns | 19.64 ns | 3.15 KB |
| Imposter | 1,518.2 ns | 28.46 ns | 27.95 ns | 10.59 KB |
| Mockolate | 600.7 ns | 4.77 ns | 4.23 ns | 2.35 KB |
| Moq | 115,836.4 ns | 1,128.03 ns | 1,055.16 ns | 16.53 KB |
| NSubstitute | 11,936.5 ns | 184.64 ns | 172.71 ns | 20.31 KB |
| FakeItEasy | 7,846.3 ns | 152.75 ns | 175.91 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 --> 140498
bar [818.1, 1489.2, 595.3, 117081.2, 12231.7, 7811.1]
y-axis "Time (ns)" 0 --> 139004
bar [803.4, 1518.2, 600.7, 115836.4, 11936.5, 7846.3]
```

## 🎯 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-07-17T03:20:48.806Z*
*Last generated: 2026-07-18T03:20:37.479Z*
Loading
Loading