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-23** from the latest CI run.
This benchmark was automatically generated on **2026-05-24** 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** | 651.5 ns | 12.86 ns | 16.26 ns | 3.08 KB |
| Imposter | 462.3 ns | 2.34 ns | 2.19 ns | 2.66 KB |
| Mockolate | 343.5 ns | 1.08 ns | 1.01 ns | 1.91 KB |
| Moq | 134,795.9 ns | 610.17 ns | 509.52 ns | 13.29 KB |
| NSubstitute | 4,047.0 ns | 9.55 ns | 8.93 ns | 7.93 KB |
| FakeItEasy | 4,525.1 ns | 21.74 ns | 20.33 ns | 7.44 KB |
| **TUnit.Mocks** | 633.0 ns | 2.74 ns | 2.56 ns | 3.08 KB |
| Imposter | 452.0 ns | 1.11 ns | 0.98 ns | 2.66 KB |
| Mockolate | 334.6 ns | 0.63 ns | 0.53 ns | 1.91 KB |
| Moq | 182,032.9 ns | 888.87 ns | 742.25 ns | 13.14 KB |
| NSubstitute | 4,305.4 ns | 9.83 ns | 9.20 ns | 7.93 KB |
| FakeItEasy | 5,155.0 ns | 11.96 ns | 11.19 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 --> 161756
bar [651.5, 462.3, 343.5, 134795.9, 4047, 4525.1]
y-axis "Time (ns)" 0 --> 218440
bar [633, 452, 334.6, 182032.9, 4305.4, 5155]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 741.8 ns | 2.25 ns | 2.10 ns | 3.16 KB |
| Imposter | 534.9 ns | 1.78 ns | 1.58 ns | 2.82 KB |
| Mockolate | 388.1 ns | 0.78 ns | 0.69 ns | 1.95 KB |
| Moq | 142,841.2 ns | 729.74 ns | 609.37 ns | 13.73 KB |
| NSubstitute | 4,551.8 ns | 19.29 ns | 18.04 ns | 8.53 KB |
| FakeItEasy | 5,486.4 ns | 52.11 ns | 46.20 ns | 9.26 KB |
| **TUnit.Mocks** | 776.8 ns | 1.61 ns | 1.43 ns | 3.16 KB |
| Imposter | 505.8 ns | 1.29 ns | 1.08 ns | 2.82 KB |
| Mockolate | 393.9 ns | 1.09 ns | 0.97 ns | 1.95 KB |
| Moq | 192,734.1 ns | 1,236.70 ns | 1,096.30 ns | 13.73 KB |
| NSubstitute | 4,978.4 ns | 27.90 ns | 26.10 ns | 8.53 KB |
| FakeItEasy | 6,121.0 ns | 66.10 ns | 55.20 ns | 9.26 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 --> 171410
bar [741.8, 534.9, 388.1, 142841.2, 4551.8, 5486.4]
y-axis "Time (ns)" 0 --> 231281
bar [776.8, 505.8, 393.9, 192734.1, 4978.4, 6121]
```

## 🎯 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-23T03:25:20.859Z*
*Last generated: 2026-05-24T03:32:03.972Z*
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-23** from the latest CI run.
This benchmark was automatically generated on **2026-05-24** 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.750 μs | 0.0055 μs | 0.0051 μs | 6.11 KB |
| Imposter | 2.452 μs | 0.0037 μs | 0.0033 μs | 15.71 KB |
| Mockolate | 1.657 μs | 0.0034 μs | 0.0030 μs | 7.63 KB |
| Moq | 400.648 μs | 1.4360 μs | 1.1991 μs | 36.16 KB |
| NSubstitute | 16.740 μs | 0.0750 μs | 0.0702 μs | 26.72 KB |
| FakeItEasy | 17.840 μs | 0.0865 μs | 0.0767 μs | 25.52 KB |
| **TUnit.Mocks** | 2.024 μs | 0.0169 μs | 0.0158 μs | 6.11 KB |
| Imposter | 2.960 μs | 0.0348 μs | 0.0308 μs | 15.71 KB |
| Mockolate | 1.855 μs | 0.0151 μs | 0.0141 μs | 7.63 KB |
| Moq | 312.804 μs | 1.2387 μs | 1.0344 μs | 36.4 KB |
| NSubstitute | 17.013 μs | 0.1191 μs | 0.1055 μs | 26.72 KB |
| FakeItEasy | 17.683 μs | 0.0731 μs | 0.0648 μs | 25.5 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 --> 481
bar [1.75, 2.452, 1.657, 400.648, 16.74, 17.84]
y-axis "Time (μs)" 0 --> 376
bar [2.024, 2.96, 1.855, 312.804, 17.013, 17.683]
```

## 🎯 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-23T03:25:20.859Z*
*Last generated: 2026-05-24T03:32:03.972Z*
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-23** from the latest CI run.
This benchmark was automatically generated on **2026-05-24** 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** | 267.09 ns | 70.93 ns | 3.888 ns | 120 B |
| Imposter | 303.44 ns | 45.40 ns | 2.488 ns | 168 B |
| Mockolate | 125.19 ns | 47.60 ns | 2.609 ns | 84 B |
| Moq | 854.16 ns | 184.84 ns | 10.132 ns | 376 B |
| NSubstitute | 773.80 ns | 253.15 ns | 13.876 ns | 304 B |
| FakeItEasy | 1,683.09 ns | 403.74 ns | 22.130 ns | 944 B |
| **TUnit.Mocks** | 264.60 ns | 62.12 ns | 3.405 ns | 120 B |
| Imposter | 302.39 ns | 128.94 ns | 7.068 ns | 168 B |
| Mockolate | 106.91 ns | 31.71 ns | 1.738 ns | 84 B |
| Moq | 787.59 ns | 95.99 ns | 5.262 ns | 376 B |
| NSubstitute | 714.86 ns | 313.36 ns | 17.176 ns | 304 B |
| FakeItEasy | 1,779.38 ns | 171.21 ns | 9.385 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 --> 2020
bar [267.09, 303.44, 125.19, 854.16, 773.8, 1683.09]
y-axis "Time (ns)" 0 --> 2136
bar [264.6, 302.39, 106.91, 787.59, 714.86, 1779.38]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 160.09 ns | 81.23 ns | 4.452 ns | 88 B |
| Imposter | 298.88 ns | 118.33 ns | 6.486 ns | 168 B |
| Mockolate | 96.36 ns | 63.67 ns | 3.490 ns | 60 B |
| Moq | 560.00 ns | 77.13 ns | 4.228 ns | 296 B |
| NSubstitute | 645.05 ns | 323.77 ns | 17.747 ns | 272 B |
| FakeItEasy | 1,593.08 ns | 601.17 ns | 32.952 ns | 776 B |
| **TUnit.Mocks** | 166.12 ns | 58.97 ns | 3.232 ns | 88 B |
| Imposter | 299.08 ns | 64.40 ns | 3.530 ns | 168 B |
| Mockolate | 99.58 ns | 23.72 ns | 1.300 ns | 60 B |
| Moq | 539.76 ns | 209.98 ns | 11.510 ns | 296 B |
| NSubstitute | 616.67 ns | 160.41 ns | 8.793 ns | 272 B |
| FakeItEasy | 1,587.78 ns | 589.96 ns | 32.338 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 --> 1912
bar [160.09, 298.88, 96.36, 560, 645.05, 1593.08]
y-axis "Time (ns)" 0 --> 1906
bar [166.12, 299.08, 99.58, 539.76, 616.67, 1587.78]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 26,385.27 ns | 13,318.32 ns | 730.022 ns | 11936 B |
| Imposter | 29,093.10 ns | 5,316.61 ns | 291.421 ns | 16800 B |
| Mockolate | 10,208.56 ns | 3,017.63 ns | 165.407 ns | 8400 B |
| Moq | 76,309.33 ns | 20,951.72 ns | 1,148.434 ns | 37600 B |
| NSubstitute | 69,871.25 ns | 20,163.48 ns | 1,105.229 ns | 30848 B |
| FakeItEasy | 172,156.28 ns | 70,904.67 ns | 3,886.524 ns | 94400 B |
| **TUnit.Mocks** | 27,403.83 ns | 12,255.55 ns | 671.768 ns | 11936 B |
| Imposter | 29,480.58 ns | 8,518.10 ns | 466.906 ns | 16800 B |
| Mockolate | 10,810.59 ns | 4,843.38 ns | 265.482 ns | 8400 B |
| Moq | 76,844.63 ns | 6,022.98 ns | 330.140 ns | 37600 B |
| NSubstitute | 70,881.18 ns | 33,128.57 ns | 1,815.889 ns | 30848 B |
| FakeItEasy | 174,040.90 ns | 62,358.93 ns | 3,418.103 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 --> 206588
bar [26385.27, 29093.1, 10208.56, 76309.33, 69871.25, 172156.28]
y-axis "Time (ns)" 0 --> 208850
bar [27403.83, 29480.58, 10810.59, 76844.63, 70881.18, 174040.9]
```

## 🎯 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-23T03:25:20.859Z*
*Last generated: 2026-05-24T03:32:03.972Z*
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-23** from the latest CI run.
This benchmark was automatically generated on **2026-05-24** 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** | 25.67 ns | 0.554 ns | 0.616 ns | 192 B |
| Imposter | 91.97 ns | 1.890 ns | 2.587 ns | 440 B |
| Mockolate | 61.38 ns | 1.273 ns | 1.191 ns | 424 B |
| Moq | 1,332.99 ns | 24.495 ns | 22.912 ns | 2048 B |
| NSubstitute | 1,963.28 ns | 33.207 ns | 31.062 ns | 5000 B |
| FakeItEasy | 1,782.54 ns | 21.824 ns | 17.039 ns | 2715 B |
| **TUnit.Mocks** | 27.86 ns | 0.627 ns | 0.671 ns | 192 B |
| Imposter | 99.60 ns | 1.970 ns | 1.935 ns | 440 B |
| Mockolate | 66.16 ns | 1.357 ns | 2.482 ns | 424 B |
| Moq | 1,259.41 ns | 25.169 ns | 37.672 ns | 2048 B |
| NSubstitute | 1,665.13 ns | 11.360 ns | 10.626 ns | 5000 B |
| FakeItEasy | 1,676.09 ns | 22.320 ns | 20.878 ns | 2723 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 --> 2356
bar [25.67, 91.97, 61.38, 1332.99, 1963.28, 1782.54]
y-axis "Time (ns)" 0 --> 2012
bar [27.86, 99.6, 66.16, 1259.41, 1665.13, 1676.09]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 27.37 ns | 0.612 ns | 1.393 ns | 192 B |
| Imposter | 141.79 ns | 1.939 ns | 1.813 ns | 696 B |
| Mockolate | 60.47 ns | 1.266 ns | 2.250 ns | 456 B |
| Moq | 1,324.35 ns | 11.422 ns | 10.684 ns | 1912 B |
| NSubstitute | 1,944.78 ns | 24.254 ns | 22.687 ns | 5000 B |
| FakeItEasy | 1,856.80 ns | 36.803 ns | 39.379 ns | 2715 B |
| **TUnit.Mocks** | 28.28 ns | 0.624 ns | 0.613 ns | 192 B |
| Imposter | 158.23 ns | 3.265 ns | 3.207 ns | 696 B |
| Mockolate | 69.77 ns | 1.462 ns | 3.179 ns | 456 B |
| Moq | 1,311.94 ns | 5.691 ns | 5.323 ns | 1912 B |
| NSubstitute | 1,997.01 ns | 21.249 ns | 18.837 ns | 5000 B |
| FakeItEasy | 1,594.46 ns | 16.828 ns | 15.741 ns | 2723 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 --> 2334
bar [27.37, 141.79, 60.47, 1324.35, 1944.78, 1856.8]
y-axis "Time (ns)" 0 --> 2397
bar [28.28, 158.23, 69.77, 1311.94, 1997.01, 1594.46]
```

## 🎯 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-23T03:25:20.859Z*
*Last generated: 2026-05-24T03:32:03.972Z*
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-23** from the latest CI run.
This benchmark was automatically generated on **2026-05-24** 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** | 505.5 ns | 3.56 ns | 3.33 ns | 2.31 KB |
| Imposter | 766.9 ns | 4.68 ns | 3.91 ns | 6.12 KB |
| Mockolate | 322.4 ns | 1.49 ns | 1.17 ns | 1.65 KB |
| Moq | 425,511.3 ns | 1,122.34 ns | 937.21 ns | 28.55 KB |
| NSubstitute | 5,529.3 ns | 31.18 ns | 27.64 ns | 9.01 KB |
| FakeItEasy | 8,191.7 ns | 68.75 ns | 64.31 ns | 10.45 KB |
| **TUnit.Mocks** | 540.2 ns | 4.95 ns | 4.63 ns | 2.31 KB |
| Imposter | 757.1 ns | 6.71 ns | 5.95 ns | 6.12 KB |
| Mockolate | 359.1 ns | 2.25 ns | 1.99 ns | 1.65 KB |
| Moq | 298,446.7 ns | 1,554.11 ns | 1,213.35 ns | 28.52 KB |
| NSubstitute | 5,228.7 ns | 54.83 ns | 51.29 ns | 9.06 KB |
| FakeItEasy | 7,010.2 ns | 47.72 ns | 39.85 ns | 10.45 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 --> 510614
bar [505.5, 766.9, 322.4, 425511.3, 5529.3, 8191.7]
y-axis "Time (ns)" 0 --> 358137
bar [540.2, 757.1, 359.1, 298446.7, 5228.7, 7010.2]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 740.6 ns | 3.25 ns | 3.04 ns | 3.09 KB |
| Imposter | 1,331.4 ns | 26.31 ns | 28.15 ns | 10.59 KB |
| Mockolate | 539.6 ns | 2.38 ns | 2.11 ns | 2.6 KB |
| Moq | 113,475.6 ns | 327.66 ns | 273.61 ns | 16.53 KB |
| NSubstitute | 11,943.4 ns | 153.18 ns | 135.79 ns | 20.31 KB |
| FakeItEasy | 8,207.8 ns | 149.09 ns | 139.46 ns | 11.71 KB |
| **TUnit.Mocks** | 783.3 ns | 6.99 ns | 6.19 ns | 3.09 KB |
| Imposter | 1,406.8 ns | 20.76 ns | 18.40 ns | 10.59 KB |
| Mockolate | 577.8 ns | 3.66 ns | 3.06 ns | 2.6 KB |
| Moq | 88,527.5 ns | 1,290.13 ns | 1,206.79 ns | 16.53 KB |
| NSubstitute | 10,702.7 ns | 64.66 ns | 57.32 ns | 20.31 KB |
| FakeItEasy | 6,901.6 ns | 112.81 ns | 105.52 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 --> 136171
bar [740.6, 1331.4, 539.6, 113475.6, 11943.4, 8207.8]
y-axis "Time (ns)" 0 --> 106233
bar [783.3, 1406.8, 577.8, 88527.5, 10702.7, 6901.6]
```

## 🎯 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-23T03:25:20.859Z*
*Last generated: 2026-05-24T03:32:03.972Z*
Loading
Loading