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 other source-generated and runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-12-02** from the latest CI run.
This benchmark was automatically generated on **2026-12-03** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 291.2 ns | 4.36 ns | 4.08 ns | 1216 B |
| Imposter | 244.3 ns | 2.49 ns | 2.33 ns | 848 B |
| Mockolate | 224.0 ns | 4.28 ns | 4.93 ns | 832 B |
| Moq | 120,664.2 ns | 747.89 ns | 662.99 ns | 13573 B |
| NSubstitute | 3,718.2 ns | 24.23 ns | 22.66 ns | 8008 B |
| FakeItEasy | 3,840.1 ns | 26.80 ns | 25.07 ns | 7549 B |
| **TUnit.Mocks** | 376.0 ns | 6.80 ns | 6.36 ns | 1216 B |
| Imposter | 259.8 ns | 5.03 ns | 4.94 ns | 848 B |
| Mockolate | 239.1 ns | 2.54 ns | 2.38 ns | 832 B |
| Moq | 208,421.9 ns | 1,361.80 ns | 1,273.83 ns | 13519 B |
| NSubstitute | 4,937.3 ns | 95.58 ns | 106.24 ns | 8008 B |
| FakeItEasy | 5,042.6 ns | 49.16 ns | 45.98 ns | 7549 B |

```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 --> 144798
bar [291.2, 244.3, 224, 120664.2, 3718.2, 3840.1]
y-axis "Time (ns)" 0 --> 250107
bar [376, 259.8, 239.1, 208421.9, 4937.3, 5042.6]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 401.3 ns | 2.70 ns | 2.53 ns | 1400 B |
| Imposter | 238.2 ns | 2.64 ns | 2.47 ns | 896 B |
| Mockolate | 215.4 ns | 3.76 ns | 3.51 ns | 896 B |
| Moq | 125,210.2 ns | 612.73 ns | 543.17 ns | 13982 B |
| NSubstitute | 4,080.9 ns | 32.01 ns | 28.37 ns | 8584 B |
| FakeItEasy | 4,725.5 ns | 32.48 ns | 30.39 ns | 9624 B |
| **TUnit.Mocks** | 549.7 ns | 5.68 ns | 5.31 ns | 1400 B |
| Imposter | 280.7 ns | 4.00 ns | 3.74 ns | 896 B |
| Mockolate | 281.1 ns | 5.50 ns | 6.55 ns | 896 B |
| Moq | 213,468.6 ns | 1,440.92 ns | 1,347.84 ns | 13990 B |
| NSubstitute | 5,701.4 ns | 71.03 ns | 59.31 ns | 8584 B |
| FakeItEasy | 5,889.4 ns | 113.11 ns | 116.16 ns | 9624 B |

```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 --> 150253
bar [401.3, 238.2, 215.4, 125210.2, 4080.9, 4725.5]
y-axis "Time (ns)" 0 --> 256163
bar [549.7, 280.7, 281.1, 213468.6, 5701.4, 5889.4]
```

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

*Last generated: 2026-12-02T02:27:12.716Z*
*Last generated: 2026-12-03T02:26:00.215Z*
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 other source-generated and runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-12-02** from the latest CI run.
This benchmark was automatically generated on **2026-12-03** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 989.8 ns | 15.94 ns | 14.91 ns | 3.7 KB |
| Imposter | 748.9 ns | 10.20 ns | 8.52 ns | 3.45 KB |
| Mockolate | 509.5 ns | 9.14 ns | 8.55 ns | 1.96 KB |
| Moq | 282,976.3 ns | 3,241.25 ns | 3,031.87 ns | 36.55 KB |
| NSubstitute | 13,906.7 ns | 264.21 ns | 247.14 ns | 26.51 KB |
| FakeItEasy | 12,401.8 ns | 241.78 ns | 346.76 ns | 24.8 KB |
| **TUnit.Mocks** | 1,222.3 ns | 9.19 ns | 8.59 ns | 3.7 KB |
| Imposter | 870.1 ns | 8.25 ns | 7.32 ns | 3.45 KB |
| Mockolate | 664.2 ns | 5.48 ns | 4.86 ns | 1.96 KB |
| Moq | 434,608.7 ns | 1,439.53 ns | 1,346.53 ns | 36.47 KB |
| NSubstitute | 18,492.8 ns | 85.09 ns | 79.59 ns | 26.51 KB |
| FakeItEasy | 16,421.0 ns | 127.53 ns | 113.05 ns | 24.94 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 (ns)" 0 --> 339572
bar [989.8, 748.9, 509.5, 282976.3, 13906.7, 12401.8]
y-axis "Time (ns)" 0 --> 521531
bar [1222.3, 870.1, 664.2, 434608.7, 18492.8, 16421]
```

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

*Last generated: 2026-12-02T02:27:12.716Z*
*Last generated: 2026-12-03T02:26:00.215Z*
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 with bounded history; time and allocation are reported per call — comparing **TUnit.Mocks** (source-generated) against other source-generated and runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-12-02** from the latest CI run.
This benchmark was automatically generated on **2026-12-03** from the latest CI run.

**Environment:** Ubuntu Latest • .NET SDK 11.0.100
:::
Expand All @@ -22,12 +22,12 @@ Calling methods on mock objects with bounded history; time and allocation are re

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 47.68 ns | 20.039 ns | 1.098 ns | 101 B |
| Imposter | 12.11 ns | 1.646 ns | 0.090 ns | 48 B |
| Mockolate | 17.58 ns | 70.532 ns | 3.866 ns | 56 B |
| Moq | 153.32 ns | 8.358 ns | 0.458 ns | 396 B |
| NSubstitute | 134.50 ns | 9.269 ns | 0.508 ns | 365 B |
| FakeItEasy | 458.06 ns | 166.341 ns | 9.118 ns | 981 B |
| **TUnit.Mocks** | 47.00 ns | 2.956 ns | 0.162 ns | 101 B |
| Imposter | 12.14 ns | 3.113 ns | 0.171 ns | 48 B |
| Mockolate | 21.05 ns | 19.955 ns | 1.094 ns | 56 B |
| Moq | 154.16 ns | 35.442 ns | 1.943 ns | 396 B |
| NSubstitute | 122.06 ns | 11.821 ns | 0.648 ns | 309 B |
| FakeItEasy | 553.06 ns | 362.104 ns | 19.848 ns | 981 B |

```mermaid
%%{init: {
Expand All @@ -53,20 +53,20 @@ Calling methods on mock objects with bounded history; time and allocation are re
xychart-beta
title "Invocation (100 calls) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 550
bar [47.68, 12.11, 17.58, 153.32, 134.5, 458.06]
y-axis "Time (ns)" 0 --> 664
bar [47, 12.14, 21.05, 154.16, 122.06, 553.06]
```

---

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 55.48 ns | 3.847 ns | 0.211 ns | 108 B |
| Imposter | 12.38 ns | 1.460 ns | 0.080 ns | 48 B |
| Mockolate | 19.69 ns | 64.732 ns | 3.548 ns | 56 B |
| Moq | 152.82 ns | 142.999 ns | 7.838 ns | 392 B |
| NSubstitute | 135.04 ns | 17.066 ns | 0.935 ns | 376 B |
| FakeItEasy | 186.36 ns | 38.821 ns | 2.128 ns | 992 B |
| **TUnit.Mocks** | 48.91 ns | 13.685 ns | 0.750 ns | 108 B |
| Imposter | 12.42 ns | 1.019 ns | 0.056 ns | 48 B |
| Mockolate | 23.14 ns | 12.833 ns | 0.703 ns | 56 B |
| Moq | 269.07 ns | 37.054 ns | 2.031 ns | 392 B |
| NSubstitute | 126.84 ns | 4.491 ns | 0.246 ns | 320 B |
| FakeItEasy | 195.62 ns | 74.059 ns | 4.059 ns | 992 B |

```mermaid
%%{init: {
Expand All @@ -92,8 +92,8 @@ xychart-beta
xychart-beta
title "Invocation Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 224
bar [55.48, 12.38, 19.69, 152.82, 135.04, 186.36]
y-axis "Time (ns)" 0 --> 323
bar [48.91, 12.42, 23.14, 269.07, 126.84, 195.62]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 39.16 ns | 10.077 ns | 0.552 ns | 98 B |
| Imposter | 11.85 ns | 10.027 ns | 0.550 ns | 48 B |
| Mockolate | 22.49 ns | 2.768 ns | 0.152 ns | 56 B |
| Moq | 74.57 ns | 6.016 ns | 0.330 ns | 312 B |
| NSubstitute | 104.57 ns | 47.480 ns | 2.603 ns | 288 B |
| FakeItEasy | 151.39 ns | 33.944 ns | 1.861 ns | 832 B |
| **TUnit.Mocks** | 40.68 ns | 11.322 ns | 0.621 ns | 98 B |
| Imposter | 11.39 ns | 1.362 ns | 0.075 ns | 48 B |
| Mockolate | 22.70 ns | 5.696 ns | 0.312 ns | 56 B |
| Moq | 77.48 ns | 2.203 ns | 0.121 ns | 312 B |
| NSubstitute | 106.72 ns | 14.171 ns | 0.777 ns | 288 B |
| FakeItEasy | 158.24 ns | 29.429 ns | 1.613 ns | 832 B |

```mermaid
%%{init: {
Expand All @@ -133,8 +133,8 @@ xychart-beta
xychart-beta
title "Invocation (String) Performance Comparison"
x-axis ["TUnit.Mocks", "Imposter", "Mockolate", "Moq", "NSubstitute", "FakeItEasy"]
y-axis "Time (ns)" 0 --> 182
bar [39.16, 11.85, 22.49, 74.57, 104.57, 151.39]
y-axis "Time (ns)" 0 --> 190
bar [40.68, 11.39, 22.7, 77.48, 106.72, 158.24]
```

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

*Last generated: 2026-12-02T02:27:12.716Z*
*Last generated: 2026-12-03T02:26:00.215Z*
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 other source-generated and runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-12-02** from the latest CI run.
This benchmark was automatically generated on **2026-12-03** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 30.36 ns | 0.592 ns | 0.554 ns | 216 B |
| Imposter | 69.50 ns | 1.152 ns | 1.078 ns | 360 B |
| Mockolate | 15.76 ns | 0.280 ns | 0.288 ns | 136 B |
| Moq | 1,330.03 ns | 19.570 ns | 18.306 ns | 2040 B |
| NSubstitute | 1,870.84 ns | 12.260 ns | 11.468 ns | 4984 B |
| FakeItEasy | 1,530.52 ns | 14.652 ns | 12.988 ns | 2706 B |
| **TUnit.Mocks** | 28.94 ns | 0.224 ns | 0.210 ns | 216 B |
| Imposter | 77.85 ns | 0.577 ns | 0.540 ns | 360 B |
| Mockolate | 15.73 ns | 0.301 ns | 0.309 ns | 136 B |
| Moq | 1,237.24 ns | 17.017 ns | 15.918 ns | 2040 B |
| NSubstitute | 1,693.77 ns | 33.308 ns | 60.906 ns | 4984 B |
| FakeItEasy | 1,605.67 ns | 26.217 ns | 24.524 ns | 2706 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 --> 2246
bar [30.36, 69.5, 15.76, 1330.03, 1870.84, 1530.52]
y-axis "Time (ns)" 0 --> 2033
bar [28.94, 77.85, 15.73, 1237.24, 1693.77, 1605.67]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27.32 ns | 0.544 ns | 0.967 ns | 216 B |
| Imposter | 108.65 ns | 1.500 ns | 1.171 ns | 568 B |
| Mockolate | 15.59 ns | 0.215 ns | 0.191 ns | 136 B |
| Moq | 1,271.05 ns | 15.100 ns | 14.125 ns | 1904 B |
| NSubstitute | 1,780.56 ns | 18.140 ns | 16.081 ns | 4984 B |
| FakeItEasy | 1,512.48 ns | 9.202 ns | 8.158 ns | 2706 B |
| **TUnit.Mocks** | 28.30 ns | 0.436 ns | 0.408 ns | 216 B |
| Imposter | 135.95 ns | 1.182 ns | 1.106 ns | 568 B |
| Mockolate | 17.58 ns | 0.176 ns | 0.165 ns | 136 B |
| Moq | 1,202.29 ns | 19.894 ns | 18.609 ns | 1904 B |
| NSubstitute | 1,747.61 ns | 32.742 ns | 30.627 ns | 4984 B |
| FakeItEasy | 1,581.05 ns | 23.192 ns | 20.559 ns | 2706 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 --> 2137
bar [27.32, 108.65, 15.59, 1271.05, 1780.56, 1512.48]
y-axis "Time (ns)" 0 --> 2098
bar [28.3, 135.95, 17.58, 1202.29, 1747.61, 1581.05]
```

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

*Last generated: 2026-12-02T02:27:12.716Z*
*Last generated: 2026-12-03T02:26:00.215Z*
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 other source-generated and runtime proxy-based mocking libraries.

:::info Last Updated
This benchmark was automatically generated on **2026-12-02** from the latest CI run.
This benchmark was automatically generated on **2026-12-03** from the latest CI run.

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 333.4 ns | 2.21 ns | 2.07 ns | 1264 B |
| Imposter | 383.7 ns | 1.25 ns | 1.16 ns | 1360 B |
| Mockolate | 209.8 ns | 0.86 ns | 0.76 ns | 608 B |
| Moq | 228,544.3 ns | 1,906.76 ns | 1,592.23 ns | 29189 B |
| NSubstitute | 6,226.8 ns | 31.27 ns | 27.72 ns | 9184 B |
| FakeItEasy | 6,063.9 ns | 28.63 ns | 25.38 ns | 10381 B |
| **TUnit.Mocks** | 202.8 ns | 1.62 ns | 1.43 ns | 1264 B |
| Imposter | 256.8 ns | 2.61 ns | 2.44 ns | 1360 B |
| Mockolate | 127.6 ns | 0.96 ns | 0.85 ns | 608 B |
| Moq | 256,356.6 ns | 600.04 ns | 468.47 ns | 29209 B |
| NSubstitute | 4,523.7 ns | 89.94 ns | 107.07 ns | 9184 B |
| FakeItEasy | 5,531.0 ns | 109.90 ns | 154.06 ns | 10386 B |

```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 --> 274254
bar [333.4, 383.7, 209.8, 228544.3, 6226.8, 6063.9]
y-axis "Time (ns)" 0 --> 307628
bar [202.8, 256.8, 127.6, 256356.6, 4523.7, 5531]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 569.4 ns | 4.73 ns | 4.19 ns | 2032 B |
| Imposter | 701.6 ns | 2.53 ns | 2.37 ns | 2536 B |
| Mockolate | 363.6 ns | 2.08 ns | 1.84 ns | 1032 B |
| Moq | 58,037.9 ns | 350.26 ns | 327.64 ns | 16271 B |
| NSubstitute | 10,324.4 ns | 34.62 ns | 32.38 ns | 20649 B |
| FakeItEasy | 6,035.1 ns | 27.34 ns | 24.23 ns | 11632 B |
| **TUnit.Mocks** | 358.0 ns | 5.66 ns | 5.02 ns | 2032 B |
| Imposter | 472.0 ns | 9.03 ns | 8.87 ns | 2536 B |
| Mockolate | 225.7 ns | 2.66 ns | 2.49 ns | 1032 B |
| Moq | 68,623.1 ns | 394.65 ns | 369.15 ns | 16271 B |
| NSubstitute | 9,107.3 ns | 141.74 ns | 132.59 ns | 20652 B |
| FakeItEasy | 5,542.5 ns | 78.36 ns | 73.30 ns | 11637 B |

```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 --> 69646
bar [569.4, 701.6, 363.6, 58037.9, 10324.4, 6035.1]
y-axis "Time (ns)" 0 --> 82348
bar [358, 472, 225.7, 68623.1, 9107.3, 5542.5]
```

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

*Last generated: 2026-12-02T02:27:12.716Z*
*Last generated: 2026-12-03T02:26:00.215Z*
Loading
Loading