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-26** from the latest CI run.
This benchmark was automatically generated on **2026-05-27** 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** | 668.2 ns | 2.21 ns | 1.96 ns | 3.08 KB |
| Imposter | 487.8 ns | 2.57 ns | 2.28 ns | 2.66 KB |
| Mockolate | 346.0 ns | 2.11 ns | 1.87 ns | 1.91 KB |
| Moq | 135,973.7 ns | 978.00 ns | 866.97 ns | 13.15 KB |
| NSubstitute | 4,044.3 ns | 42.81 ns | 35.75 ns | 7.93 KB |
| FakeItEasy | 4,499.5 ns | 39.30 ns | 36.76 ns | 7.44 KB |
| **TUnit.Mocks** | 641.6 ns | 3.57 ns | 2.98 ns | 3.08 KB |
| Imposter | 473.3 ns | 4.44 ns | 4.16 ns | 2.66 KB |
| Mockolate | 345.9 ns | 1.45 ns | 1.36 ns | 1.91 KB |
| Moq | 134,443.3 ns | 671.84 ns | 561.02 ns | 13.15 KB |
| NSubstitute | 4,139.0 ns | 63.70 ns | 59.59 ns | 7.93 KB |
| FakeItEasy | 4,535.8 ns | 27.28 ns | 22.78 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 --> 163169
bar [668.2, 487.8, 346, 135973.7, 4044.3, 4499.5]
y-axis "Time (ns)" 0 --> 161332
bar [641.6, 473.3, 345.9, 134443.3, 4139, 4535.8]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 755.9 ns | 6.16 ns | 5.46 ns | 3.16 KB |
| Imposter | 544.2 ns | 5.55 ns | 4.92 ns | 2.82 KB |
| Mockolate | 386.9 ns | 1.58 ns | 1.23 ns | 1.95 KB |
| Moq | 142,414.3 ns | 1,191.32 ns | 1,114.36 ns | 13.73 KB |
| NSubstitute | 4,686.3 ns | 19.08 ns | 17.85 ns | 8.53 KB |
| FakeItEasy | 5,427.7 ns | 25.37 ns | 21.18 ns | 9.4 KB |
| **TUnit.Mocks** | 859.4 ns | 6.15 ns | 5.45 ns | 3.16 KB |
| Imposter | 533.2 ns | 2.53 ns | 2.11 ns | 2.82 KB |
| Mockolate | 387.6 ns | 1.79 ns | 1.59 ns | 1.95 KB |
| Moq | 146,925.2 ns | 1,893.35 ns | 1,771.04 ns | 13.73 KB |
| NSubstitute | 4,704.6 ns | 48.45 ns | 45.32 ns | 8.53 KB |
| FakeItEasy | 5,463.5 ns | 36.45 ns | 32.32 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 --> 170898
bar [755.9, 544.2, 386.9, 142414.3, 4686.3, 5427.7]
y-axis "Time (ns)" 0 --> 176311
bar [859.4, 533.2, 387.6, 146925.2, 4704.6, 5463.5]
```

## 🎯 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-26T03:27:58.119Z*
*Last generated: 2026-05-27T03:29:35.677Z*
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-26** from the latest CI run.
This benchmark was automatically generated on **2026-05-27** 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.865 μs | 0.0367 μs | 0.0360 μs | 6.11 KB |
| Imposter | 2.639 μs | 0.0528 μs | 0.0925 μs | 15.71 KB |
| Mockolate | 1.714 μs | 0.0338 μs | 0.0601 μs | 7.63 KB |
| Moq | 316.243 μs | 2.2704 μs | 2.0126 μs | 36.16 KB |
| NSubstitute | 16.613 μs | 0.1080 μs | 0.1010 μs | 26.72 KB |
| FakeItEasy | 15.737 μs | 0.2489 μs | 0.2328 μs | 25.52 KB |
| **TUnit.Mocks** | 1.886 μs | 0.0233 μs | 0.0206 μs | 6.11 KB |
| Imposter | 2.568 μs | 0.0511 μs | 0.0589 μs | 15.71 KB |
| Mockolate | 1.834 μs | 0.0244 μs | 0.0204 μs | 7.63 KB |
| Moq | 315.512 μs | 2.8785 μs | 2.5517 μs | 36.35 KB |
| NSubstitute | 15.831 μs | 0.0970 μs | 0.0860 μs | 26.72 KB |
| FakeItEasy | 15.633 μs | 0.2835 μs | 0.2652 μs | 25.52 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 --> 380
bar [1.865, 2.639, 1.714, 316.243, 16.613, 15.737]
y-axis "Time (μs)" 0 --> 379
bar [1.886, 2.568, 1.834, 315.512, 15.831, 15.633]
```

## 🎯 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-26T03:27:58.119Z*
*Last generated: 2026-05-27T03:29:35.677Z*
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-26** from the latest CI run.
This benchmark was automatically generated on **2026-05-27** 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** | 266.37 ns | 70.95 ns | 3.889 ns | 120 B |
| Imposter | 299.92 ns | 18.43 ns | 1.010 ns | 168 B |
| Mockolate | 127.28 ns | 14.44 ns | 0.791 ns | 84 B |
| Moq | 819.40 ns | 489.19 ns | 26.814 ns | 376 B |
| NSubstitute | 745.44 ns | 131.71 ns | 7.220 ns | 304 B |
| FakeItEasy | 2,031.36 ns | 454.12 ns | 24.892 ns | 944 B |
| **TUnit.Mocks** | 270.4 ns | 87.16 ns | 4.78 ns | 120 B |
| Imposter | 312.3 ns | 105.21 ns | 5.77 ns | 168 B |
| Mockolate | 118.1 ns | 92.05 ns | 5.05 ns | 84 B |
| Moq | 868.5 ns | 221.16 ns | 12.12 ns | 376 B |
| NSubstitute | 774.5 ns | 142.72 ns | 7.82 ns | 304 B |
| FakeItEasy | 1,983.0 ns | 338.98 ns | 18.58 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 --> 2438
bar [266.37, 299.92, 127.28, 819.4, 745.44, 2031.36]
y-axis "Time (ns)" 0 --> 2380
bar [270.4, 312.3, 118.1, 868.5, 774.5, 1983]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 160.37 ns | 71.06 ns | 3.895 ns | 88 B |
| Imposter | 299.72 ns | 172.64 ns | 9.463 ns | 168 B |
| Mockolate | 95.72 ns | 74.38 ns | 4.077 ns | 60 B |
| Moq | 514.31 ns | 62.90 ns | 3.448 ns | 296 B |
| NSubstitute | 601.13 ns | 262.05 ns | 14.364 ns | 272 B |
| FakeItEasy | 1,485.52 ns | 106.14 ns | 5.818 ns | 776 B |
| **TUnit.Mocks** | 161.5 ns | 80.59 ns | 4.42 ns | 88 B |
| Imposter | 312.3 ns | 99.51 ns | 5.45 ns | 168 B |
| Mockolate | 124.4 ns | 58.79 ns | 3.22 ns | 60 B |
| Moq | 630.9 ns | 297.78 ns | 16.32 ns | 296 B |
| NSubstitute | 734.8 ns | 103.10 ns | 5.65 ns | 328 B |
| FakeItEasy | 1,806.2 ns | 195.11 ns | 10.69 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 --> 1783
bar [160.37, 299.72, 95.72, 514.31, 601.13, 1485.52]
y-axis "Time (ns)" 0 --> 2168
bar [161.5, 312.3, 124.4, 630.9, 734.8, 1806.2]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 25,979.39 ns | 9,532.60 ns | 522.514 ns | 11936 B |
| Imposter | 29,063.61 ns | 10,948.92 ns | 600.147 ns | 16800 B |
| Mockolate | 9,783.73 ns | 1,625.23 ns | 89.084 ns | 8400 B |
| Moq | 78,221.85 ns | 21,526.57 ns | 1,179.944 ns | 37600 B |
| NSubstitute | 69,453.97 ns | 13,579.64 ns | 744.346 ns | 30848 B |
| FakeItEasy | 167,866.12 ns | 44,812.34 ns | 2,456.315 ns | 94400 B |
| **TUnit.Mocks** | 27,090.1 ns | 10,775.05 ns | 590.62 ns | 11936 B |
| Imposter | 30,628.9 ns | 6,499.86 ns | 356.28 ns | 16800 B |
| Mockolate | 13,117.9 ns | 4,809.80 ns | 263.64 ns | 8400 B |
| Moq | 88,139.7 ns | 19,796.37 ns | 1,085.11 ns | 37600 B |
| NSubstitute | 79,799.2 ns | 27,093.46 ns | 1,485.08 ns | 30848 B |
| FakeItEasy | 189,034.3 ns | 100,257.58 ns | 5,495.46 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 --> 201440
bar [25979.39, 29063.61, 9783.73, 78221.85, 69453.97, 167866.12]
y-axis "Time (ns)" 0 --> 226842
bar [27090.1, 30628.9, 13117.9, 88139.7, 79799.2, 189034.3]
```

## 🎯 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-26T03:27:58.119Z*
*Last generated: 2026-05-27T03:29:35.677Z*
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-26** from the latest CI run.
This benchmark was automatically generated on **2026-05-27** 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** | 26.13 ns | 0.204 ns | 0.191 ns | 192 B |
| Imposter | 106.90 ns | 2.106 ns | 2.069 ns | 440 B |
| Mockolate | 61.44 ns | 0.312 ns | 0.277 ns | 424 B |
| Moq | 1,244.49 ns | 14.417 ns | 13.485 ns | 2048 B |
| NSubstitute | 1,674.31 ns | 6.676 ns | 5.575 ns | 5000 B |
| FakeItEasy | 1,580.04 ns | 5.243 ns | 4.648 ns | 2715 B |
| **TUnit.Mocks** | 26.42 ns | 0.590 ns | 0.724 ns | 192 B |
| Imposter | 93.27 ns | 1.856 ns | 2.137 ns | 440 B |
| Mockolate | 60.05 ns | 1.265 ns | 2.881 ns | 424 B |
| Moq | 1,313.15 ns | 17.484 ns | 16.355 ns | 2048 B |
| NSubstitute | 1,850.64 ns | 33.942 ns | 31.750 ns | 5000 B |
| FakeItEasy | 1,779.77 ns | 34.314 ns | 40.849 ns | 2715 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 --> 2010
bar [26.13, 106.9, 61.44, 1244.49, 1674.31, 1580.04]
y-axis "Time (ns)" 0 --> 2221
bar [26.42, 93.27, 60.05, 1313.15, 1850.64, 1779.77]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 26.30 ns | 0.183 ns | 0.163 ns | 192 B |
| Imposter | 148.78 ns | 0.500 ns | 0.443 ns | 696 B |
| Mockolate | 63.25 ns | 0.430 ns | 0.381 ns | 456 B |
| Moq | 1,250.84 ns | 19.706 ns | 16.455 ns | 1912 B |
| NSubstitute | 1,717.91 ns | 4.914 ns | 4.104 ns | 5000 B |
| FakeItEasy | 1,622.80 ns | 32.448 ns | 31.869 ns | 2715 B |
| **TUnit.Mocks** | 26.17 ns | 0.589 ns | 1.120 ns | 192 B |
| Imposter | 138.16 ns | 2.846 ns | 4.755 ns | 696 B |
| Mockolate | 68.07 ns | 1.405 ns | 2.060 ns | 456 B |
| Moq | 1,326.76 ns | 10.767 ns | 10.072 ns | 1912 B |
| NSubstitute | 1,933.82 ns | 34.247 ns | 32.035 ns | 5000 B |
| FakeItEasy | 1,800.68 ns | 34.680 ns | 37.108 ns | 2715 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 --> 2062
bar [26.3, 148.78, 63.25, 1250.84, 1717.91, 1622.8]
y-axis "Time (ns)" 0 --> 2321
bar [26.17, 138.16, 68.07, 1326.76, 1933.82, 1800.68]
```

## 🎯 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-26T03:27:58.119Z*
*Last generated: 2026-05-27T03:29:35.677Z*
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-26** from the latest CI run.
This benchmark was automatically generated on **2026-05-27** 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** | 418.1 ns | 3.75 ns | 3.32 ns | 2.31 KB |
| Imposter | 618.4 ns | 6.93 ns | 6.48 ns | 6.12 KB |
| Mockolate | 286.5 ns | 3.92 ns | 3.48 ns | 1.65 KB |
| Moq | 244,933.5 ns | 1,749.99 ns | 1,636.94 ns | 28.7 KB |
| NSubstitute | 4,016.2 ns | 28.05 ns | 26.23 ns | 9.06 KB |
| FakeItEasy | 5,476.4 ns | 42.30 ns | 39.57 ns | 10.6 KB |
| **TUnit.Mocks** | 499.0 ns | 4.50 ns | 3.99 ns | 2.31 KB |
| Imposter | 835.6 ns | 11.62 ns | 10.87 ns | 6.12 KB |
| Mockolate | 325.1 ns | 4.27 ns | 3.78 ns | 1.65 KB |
| Moq | 422,785.0 ns | 1,742.19 ns | 1,454.80 ns | 28.52 KB |
| NSubstitute | 5,450.0 ns | 94.05 ns | 96.58 ns | 9.06 KB |
| FakeItEasy | 7,651.3 ns | 55.78 ns | 52.18 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 --> 293921
bar [418.1, 618.4, 286.5, 244933.5, 4016.2, 5476.4]
y-axis "Time (ns)" 0 --> 507342
bar [499, 835.6, 325.1, 422785, 5450, 7651.3]
```

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

| Library | Mean | Error | StdDev | Allocated |
|---------|------|-------|--------|-----------|
| **TUnit.Mocks** | 601.8 ns | 8.24 ns | 7.71 ns | 3.09 KB |
| Imposter | 1,042.5 ns | 3.99 ns | 3.53 ns | 10.59 KB |
| Mockolate | 455.1 ns | 1.55 ns | 1.45 ns | 2.6 KB |
| Moq | 67,933.8 ns | 484.58 ns | 429.57 ns | 16.53 KB |
| NSubstitute | 8,199.0 ns | 68.48 ns | 64.06 ns | 20.31 KB |
| FakeItEasy | 5,125.3 ns | 36.29 ns | 30.30 ns | 11.71 KB |
| **TUnit.Mocks** | 716.9 ns | 5.44 ns | 4.82 ns | 3.09 KB |
| Imposter | 1,287.4 ns | 10.14 ns | 8.99 ns | 10.59 KB |
| Mockolate | 527.8 ns | 4.25 ns | 3.77 ns | 2.6 KB |
| Moq | 112,405.2 ns | 456.29 ns | 381.02 ns | 16.53 KB |
| NSubstitute | 11,637.2 ns | 101.02 ns | 94.50 ns | 20.31 KB |
| FakeItEasy | 7,942.5 ns | 46.50 ns | 43.50 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 --> 81521
bar [601.8, 1042.5, 455.1, 67933.8, 8199, 5125.3]
y-axis "Time (ns)" 0 --> 134887
bar [716.9, 1287.4, 527.8, 112405.2, 11637.2, 7942.5]
```

## 🎯 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-26T03:27:58.119Z*
*Last generated: 2026-05-27T03:29:35.677Z*
Loading
Loading