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-18** from the latest CI run.
This benchmark was automatically generated on **2026-08-19** 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** | 652.9 ns | 1.97 ns | 1.65 ns | 3.11 KB |
| Imposter | 464.3 ns | 1.13 ns | 1.06 ns | 2.66 KB |
| Mockolate | 347.2 ns | 2.05 ns | 1.91 ns | 1.8 KB |
| Moq | 136,337.3 ns | 867.15 ns | 768.70 ns | 13.29 KB |
| NSubstitute | 4,526.5 ns | 48.31 ns | 40.34 ns | 7.85 KB |
| FakeItEasy | 4,579.6 ns | 34.68 ns | 32.44 ns | 7.44 KB |
| **TUnit.Mocks** | 530.4 ns | 10.58 ns | 11.32 ns | 3.11 KB |
| Imposter | 377.4 ns | 5.31 ns | 4.43 ns | 2.66 KB |
| Mockolate | 276.4 ns | 2.96 ns | 2.77 ns | 1.8 KB |
| Moq | 107,765.8 ns | 858.24 ns | 760.81 ns | 13.29 KB |
| NSubstitute | 3,567.7 ns | 48.46 ns | 45.33 ns | 7.85 KB |
| FakeItEasy | 3,843.5 ns | 58.91 ns | 55.11 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 --> 163605
bar [652.9, 464.3, 347.2, 136337.3, 4526.5, 4579.6]
y-axis "Time (ns)" 0 --> 129319
bar [530.4, 377.4, 276.4, 107765.8, 3567.7, 3843.5]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 769.9 ns | 3.36 ns | 2.98 ns | 3.2 KB |
| Imposter | 539.0 ns | 0.89 ns | 0.84 ns | 2.82 KB |
| Mockolate | 408.0 ns | 1.23 ns | 1.15 ns | 1.84 KB |
| Moq | 144,564.3 ns | 1,112.84 ns | 929.27 ns | 13.73 KB |
| NSubstitute | 5,011.5 ns | 21.85 ns | 18.24 ns | 8.41 KB |
| FakeItEasy | 5,548.6 ns | 31.25 ns | 26.09 ns | 9.26 KB |
| **TUnit.Mocks** | 627.0 ns | 6.20 ns | 5.18 ns | 3.2 KB |
| Imposter | 439.9 ns | 6.33 ns | 5.61 ns | 2.82 KB |
| Mockolate | 325.8 ns | 5.61 ns | 5.25 ns | 1.84 KB |
| Moq | 116,045.7 ns | 888.12 ns | 787.29 ns | 13.76 KB |
| NSubstitute | 4,229.5 ns | 84.09 ns | 140.50 ns | 8.41 KB |
| FakeItEasy | 4,867.8 ns | 95.82 ns | 89.63 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 --> 173478
bar [769.9, 539, 408, 144564.3, 5011.5, 5548.6]
y-axis "Time (ns)" 0 --> 139255
bar [627, 439.9, 325.8, 116045.7, 4229.5, 4867.8]
```

## 🎯 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-18T02:39:29.373Z*
*Last generated: 2026-08-19T02:42:18.029Z*
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-18** from the latest CI run.
This benchmark was automatically generated on **2026-08-19** 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** | 1.892 μs | 0.0295 μs | 0.0276 μs | 6.23 KB |
| Imposter | 2.576 μs | 0.0490 μs | 0.0545 μs | 15.71 KB |
| Mockolate | 1.667 μs | 0.0327 μs | 0.0306 μs | 7.36 KB |
| Moq | 309.579 μs | 2.1408 μs | 1.8978 μs | 36.3 KB |
| NSubstitute | 18.523 μs | 0.3638 μs | 0.3573 μs | 26.72 KB |
| FakeItEasy | 16.596 μs | 0.2873 μs | 0.2687 μs | 25.68 KB |
| **TUnit.Mocks** | 1.794 μs | 0.0151 μs | 0.0118 μs | 6.23 KB |
| Imposter | 2.624 μs | 0.0146 μs | 0.0129 μs | 15.71 KB |
| Mockolate | 1.608 μs | 0.0090 μs | 0.0070 μs | 7.36 KB |
| Moq | 404.994 μs | 2.7075 μs | 2.2609 μs | 36.54 KB |
| NSubstitute | 18.736 μs | 0.1281 μs | 0.1135 μs | 26.85 KB |
| FakeItEasy | 17.817 μs | 0.1053 μs | 0.0985 μ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 --> 372
bar [1.892, 2.576, 1.667, 309.579, 18.523, 16.596]
y-axis "Time (μs)" 0 --> 486
bar [1.794, 2.624, 1.608, 404.994, 18.736, 17.817]
```

## 🎯 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-18T02:39:29.373Z*
*Last generated: 2026-08-19T02:42:18.029Z*
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-18** from the latest CI run.
This benchmark was automatically generated on **2026-08-19** 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** | 179.60 ns | 61.019 ns | 3.345 ns | 128 B |
| Imposter | 165.10 ns | 7.917 ns | 0.434 ns | 168 B |
| Mockolate | 69.37 ns | 50.267 ns | 2.755 ns | 84 B |
| Moq | 430.67 ns | 343.778 ns | 18.844 ns | 376 B |
| NSubstitute | 397.10 ns | 14.298 ns | 0.784 ns | 304 B |
| FakeItEasy | 1,001.48 ns | 224.078 ns | 12.282 ns | 944 B |
| **TUnit.Mocks** | 275.52 ns | 100.47 ns | 5.507 ns | 128 B |
| Imposter | 298.59 ns | 58.72 ns | 3.218 ns | 168 B |
| Mockolate | 119.63 ns | 28.70 ns | 1.573 ns | 84 B |
| Moq | 849.37 ns | 184.14 ns | 10.093 ns | 376 B |
| NSubstitute | 794.92 ns | 52.84 ns | 2.896 ns | 360 B |
| FakeItEasy | 1,853.11 ns | 422.77 ns | 23.173 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 --> 1202
bar [179.6, 165.1, 69.37, 430.67, 397.1, 1001.48]
y-axis "Time (ns)" 0 --> 2224
bar [275.52, 298.59, 119.63, 849.37, 794.92, 1853.11]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 120.72 ns | 55.547 ns | 3.045 ns | 96 B |
| Imposter | 166.34 ns | 5.611 ns | 0.308 ns | 168 B |
| Mockolate | 61.33 ns | 17.716 ns | 0.971 ns | 60 B |
| Moq | 296.37 ns | 94.444 ns | 5.177 ns | 296 B |
| NSubstitute | 333.00 ns | 37.814 ns | 2.073 ns | 272 B |
| FakeItEasy | 930.56 ns | 187.617 ns | 10.284 ns | 776 B |
| **TUnit.Mocks** | 164.17 ns | 69.20 ns | 3.793 ns | 96 B |
| Imposter | 299.06 ns | 122.62 ns | 6.721 ns | 168 B |
| Mockolate | 99.39 ns | 31.70 ns | 1.738 ns | 60 B |
| Moq | 554.12 ns | 124.53 ns | 6.826 ns | 296 B |
| NSubstitute | 681.35 ns | 72.64 ns | 3.982 ns | 328 B |
| FakeItEasy | 1,630.14 ns | 145.67 ns | 7.984 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 --> 1117
bar [120.72, 166.34, 61.33, 296.37, 333, 930.56]
y-axis "Time (ns)" 0 --> 1957
bar [164.17, 299.06, 99.39, 554.12, 681.35, 1630.14]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 17,589.62 ns | 5,619.319 ns | 308.014 ns | 12736 B |
| Imposter | 16,396.96 ns | 1,122.206 ns | 61.512 ns | 16800 B |
| Mockolate | 6,853.72 ns | 2,197.338 ns | 120.444 ns | 8400 B |
| Moq | 41,704.28 ns | 6,101.535 ns | 334.446 ns | 37600 B |
| NSubstitute | 39,271.66 ns | 5,610.566 ns | 307.534 ns | 30848 B |
| FakeItEasy | 103,071.39 ns | 51,755.101 ns | 2,836.872 ns | 94400 B |
| **TUnit.Mocks** | 27,638.69 ns | 6,742.62 ns | 369.586 ns | 12736 B |
| Imposter | 29,573.68 ns | 3,712.19 ns | 203.478 ns | 16800 B |
| Mockolate | 11,545.30 ns | 1,035.24 ns | 56.745 ns | 8400 B |
| Moq | 83,341.67 ns | 14,349.15 ns | 786.525 ns | 37600 B |
| NSubstitute | 75,440.95 ns | 20,146.87 ns | 1,104.318 ns | 30848 B |
| FakeItEasy | 186,107.50 ns | 53,531.85 ns | 2,934.261 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 --> 123686
bar [17589.62, 16396.96, 6853.72, 41704.28, 39271.66, 103071.39]
y-axis "Time (ns)" 0 --> 223329
bar [27638.69, 29573.68, 11545.3, 83341.67, 75440.95, 186107.5]
```

## 🎯 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-18T02:39:29.373Z*
*Last generated: 2026-08-19T02:42:18.029Z*
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-18** from the latest CI run.
This benchmark was automatically generated on **2026-08-19** 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** | 30.17 ns | 0.157 ns | 0.139 ns | 200 B |
| Imposter | 114.32 ns | 0.677 ns | 0.633 ns | 440 B |
| Mockolate | 17.87 ns | 0.102 ns | 0.091 ns | 160 B |
| Moq | 1,258.98 ns | 23.463 ns | 21.947 ns | 2048 B |
| NSubstitute | 1,722.10 ns | 6.319 ns | 5.602 ns | 5000 B |
| FakeItEasy | 1,631.47 ns | 4.825 ns | 4.029 ns | 2715 B |
| **TUnit.Mocks** | 28.09 ns | 0.346 ns | 0.289 ns | 200 B |
| Imposter | 89.39 ns | 0.399 ns | 0.373 ns | 440 B |
| Mockolate | 16.69 ns | 0.143 ns | 0.134 ns | 160 B |
| Moq | 1,374.14 ns | 17.275 ns | 16.159 ns | 2048 B |
| NSubstitute | 1,800.64 ns | 6.283 ns | 5.569 ns | 5000 B |
| FakeItEasy | 1,669.06 ns | 5.677 ns | 5.033 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 --> 2067
bar [30.17, 114.32, 17.87, 1258.98, 1722.1, 1631.47]
y-axis "Time (ns)" 0 --> 2161
bar [28.09, 89.39, 16.69, 1374.14, 1800.64, 1669.06]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 29.47 ns | 0.098 ns | 0.087 ns | 200 B |
| Imposter | 157.65 ns | 0.346 ns | 0.289 ns | 696 B |
| Mockolate | 18.12 ns | 0.122 ns | 0.114 ns | 176 B |
| Moq | 1,229.90 ns | 8.635 ns | 7.655 ns | 1912 B |
| NSubstitute | 1,735.69 ns | 7.560 ns | 7.071 ns | 5000 B |
| FakeItEasy | 1,607.00 ns | 5.785 ns | 5.128 ns | 2715 B |
| **TUnit.Mocks** | 27.30 ns | 0.089 ns | 0.083 ns | 200 B |
| Imposter | 139.42 ns | 0.543 ns | 0.454 ns | 696 B |
| Mockolate | 17.10 ns | 0.252 ns | 0.236 ns | 176 B |
| Moq | 1,312.41 ns | 9.611 ns | 8.026 ns | 1912 B |
| NSubstitute | 1,849.90 ns | 12.334 ns | 10.934 ns | 5000 B |
| FakeItEasy | 1,666.73 ns | 6.014 ns | 5.331 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 --> 2083
bar [29.47, 157.65, 18.12, 1229.9, 1735.69, 1607]
y-axis "Time (ns)" 0 --> 2220
bar [27.3, 139.42, 17.1, 1312.41, 1849.9, 1666.73]
```

## 🎯 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-18T02:39:29.373Z*
*Last generated: 2026-08-19T02:42:18.029Z*
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-18** from the latest CI run.
This benchmark was automatically generated on **2026-08-19** 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** | 509.9 ns | 3.69 ns | 3.27 ns | 2.34 KB |
| Imposter | 815.1 ns | 5.95 ns | 5.28 ns | 6.12 KB |
| Mockolate | 309.1 ns | 2.32 ns | 2.06 ns | 1.41 KB |
| Moq | 430,684.0 ns | 1,820.70 ns | 1,614.01 ns | 28.52 KB |
| NSubstitute | 6,253.1 ns | 84.31 ns | 74.74 ns | 9.01 KB |
| FakeItEasy | 7,739.4 ns | 40.83 ns | 36.20 ns | 10.45 KB |
| **TUnit.Mocks** | 428.0 ns | 6.51 ns | 6.08 ns | 2.34 KB |
| Imposter | 631.9 ns | 12.55 ns | 28.84 ns | 6.12 KB |
| Mockolate | 247.7 ns | 5.00 ns | 13.26 ns | 1.41 KB |
| Moq | 159,268.4 ns | 822.00 ns | 641.76 ns | 28.54 KB |
| NSubstitute | 4,525.9 ns | 71.05 ns | 62.98 ns | 9.01 KB |
| FakeItEasy | 4,487.9 ns | 69.22 ns | 126.56 ns | 10.44 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 --> 516821
bar [509.9, 815.1, 309.1, 430684, 6253.1, 7739.4]
y-axis "Time (ns)" 0 --> 191123
bar [428, 631.9, 247.7, 159268.4, 4525.9, 4487.9]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 760.8 ns | 9.40 ns | 8.79 ns | 3.15 KB |
| Imposter | 1,431.4 ns | 6.84 ns | 6.07 ns | 10.59 KB |
| Mockolate | 539.6 ns | 4.39 ns | 4.11 ns | 2.35 KB |
| Moq | 113,653.2 ns | 545.89 ns | 510.63 ns | 16.53 KB |
| NSubstitute | 12,227.8 ns | 93.23 ns | 77.85 ns | 20.31 KB |
| FakeItEasy | 7,949.7 ns | 112.99 ns | 100.16 ns | 11.71 KB |
| **TUnit.Mocks** | 646.8 ns | 10.82 ns | 12.03 ns | 3.15 KB |
| Imposter | 1,081.8 ns | 21.67 ns | 31.76 ns | 10.59 KB |
| Mockolate | 436.4 ns | 7.12 ns | 13.03 ns | 2.35 KB |
| Moq | 41,496.1 ns | 492.88 ns | 850.19 ns | 16.52 KB |
| NSubstitute | 7,324.3 ns | 141.95 ns | 189.50 ns | 20.49 KB |
| FakeItEasy | 4,219.3 ns | 79.78 ns | 81.93 ns | 11.7 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 --> 136384
bar [760.8, 1431.4, 539.6, 113653.2, 12227.8, 7949.7]
y-axis "Time (ns)" 0 --> 49796
bar [646.8, 1081.8, 436.4, 41496.1, 7324.3, 4219.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-08-18T02:39:29.373Z*
*Last generated: 2026-08-19T02:42:18.029Z*
Loading
Loading