danielpalme / IocPerformance

Performance comparison of .NET IoC containers
https://danielpalme.github.io/IocPerformance
Apache License 2.0
874 stars 157 forks source link

Update Pure.DI to 2.0.0 #156

Closed NikolayPianikov closed 1 year ago

NikolayPianikov commented 1 year ago

Requires .NET SDK 6.0.4xx or newer

NikolayPianikov commented 1 year ago

@danielpalme when you have time, please take a look at my MR

danielpalme commented 1 year ago

Your code does not compile on my machine. ContainerAdapterBase.Resolve(Type) is no longer implemented by PureDiAdapter.

I don't think it makes any sense to put further effort into this benchmark. It's outdated and has to be rewritten for .NET Core.

NikolayPianikov commented 1 year ago

@danielpalme The code may not compile because dotnet build services have loaded and are using an older version of the code generator. GitHub Actions compiles without any problems :)

You can delete the bin and obj folders in the project and then run the following commands in sequence:

dotnet build-server shutdown
dotnet restore
dotnet build

As for moving to .NET Core, I can offer help. Here I have a project similar to yours. It measures several scenarios using different libraries and uses the BenchmarkDotNet library to measure performance. The library measures does pretty well, and you can also measure how much memory is wasted.

NikolayPianikov commented 1 year ago

And separately we can add functionality that will check if the libraries work correctly in different scenarios without messing up performance statistics.

danielpalme commented 1 year ago

I was able to build the project. I updated the benchmark one last time. The project will now be archived.

I don't have the time to start the project in .NET Core. But your project is a good start!