Skip to content
Open
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
18 changes: 9 additions & 9 deletions docs/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ dotnet run -c Release --project tests/GenDI.Benchmarks/GenDI.Benchmarks.csproj -
## Latest CI benchmark snapshot

<!-- benchmark-ci:start -->
_Updated by [CI run #225](https://github.com/schivei/GenDI/actions/runs/29263183905) on 2026-07-13 15:43 UTC_
_Updated by [CI run #234](https://github.com/schivei/GenDI/actions/runs/33534619085) on 2026-09-01 16:58 UTC_

| Method | Mean | Allocated |
|---|---:|---:|
| Manual registration (no GenDI) | 3.211 μs | 7.42 KB |
| GenDI: constructor injection (generated) | 11.781 μs | 9.98 KB |
| GenDI: property injection (generated) | 11.780 μs | 9.98 KB |
| GenDI: with decorator, property injection (generated) | 19.599 μs | 14.26 KB |
| Reflection registration (no GenDI, assembly scan) | 76.778 μs | 23.9 KB |
| Manual registration (no GenDI) | 2.700 μs | 7.42 KB |
| GenDI: constructor injection (generated) | 11.064 μs | 9.98 KB |
| GenDI: property injection (generated) | 11.186 μs | 9.98 KB |
| GenDI: with decorator, property injection (generated) | 14.204 μs | 14.26 KB |
| Reflection registration (no GenDI, assembly scan) | 48.241 μs | 23.89 KB |

### CI analysis

- GenDI constructor injection is **+266.9%** versus manual registration.
- GenDI property injection is **+266.9%** versus manual registration.
- Reflection scanning remains the outlier at **~23.9x slower** and **~3.2x higher allocation** than manual registration.
- GenDI constructor injection is **+309.8%** versus manual registration.
- GenDI property injection is **+314.3%** versus manual registration.
- Reflection scanning remains the outlier at **~17.9x slower** and **~3.2x higher allocation** than manual registration.
- Compatibility note: this benchmark compares manual and generated registrations against a reflection scanner baseline; as documented below, reflection scanning is not suitable for trimming/NativeAOT scenarios, while manual and GenDI-generated registrations remain the supported path.
<!-- benchmark-ci:end -->

Expand Down
2 changes: 1 addition & 1 deletion tests/GenDI.Analyzers.Tests/GenDI.Analyzers.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.*" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.*" />
<PackageReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.9" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.*" />
<PackageReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.*" />
<PackageReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/GenDI.Testing.Tests/GenDI.Testing.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" PrivateAssets="all" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.*" PrivateAssets="all" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.*" />
<PackageReference
Expand Down
18 changes: 9 additions & 9 deletions website/docs/advanced/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ dotnet run -c Release --project tests/GenDI.Benchmarks/GenDI.Benchmarks.csproj -
## ⚡ Latest result snapshot

<!-- benchmark-ci:start -->
_Updated by [CI run #225](https://github.com/schivei/GenDI/actions/runs/29263183905) on 2026-07-13 15:43 UTC_
_Updated by [CI run #234](https://github.com/schivei/GenDI/actions/runs/33534619085) on 2026-09-01 16:58 UTC_

| Method | Mean | Allocated |
|---|---:|---:|
| Manual registration (no GenDI) | 3.211 μs | 7.42 KB |
| GenDI: constructor injection (generated) | 11.781 μs | 9.98 KB |
| GenDI: property injection (generated) | 11.780 μs | 9.98 KB |
| GenDI: with decorator, property injection (generated) | 19.599 μs | 14.26 KB |
| Reflection registration (no GenDI, assembly scan) | 76.778 μs | 23.9 KB |
| Manual registration (no GenDI) | 2.700 μs | 7.42 KB |
| GenDI: constructor injection (generated) | 11.064 μs | 9.98 KB |
| GenDI: property injection (generated) | 11.186 μs | 9.98 KB |
| GenDI: with decorator, property injection (generated) | 14.204 μs | 14.26 KB |
| Reflection registration (no GenDI, assembly scan) | 48.241 μs | 23.89 KB |

### CI analysis

- GenDI constructor injection is **+266.9%** versus manual registration.
- GenDI property injection is **+266.9%** versus manual registration.
- Reflection scanning remains the outlier at **~23.9x slower** and **~3.2x higher allocation** than manual registration.
- GenDI constructor injection is **+309.8%** versus manual registration.
- GenDI property injection is **+314.3%** versus manual registration.
- Reflection scanning remains the outlier at **~17.9x slower** and **~3.2x higher allocation** than manual registration.
- Compatibility note: this benchmark compares manual and generated registrations against a reflection scanner baseline; as documented below, reflection scanning is not suitable for trimming/NativeAOT scenarios, while manual and GenDI-generated registrations remain the supported path.
<!-- benchmark-ci:end -->

Expand Down
Loading