danielpalme / IocPerformance

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

`Real world` scenario specification disscussion #86

Closed dzmitry-lahoda closed 6 years ago

dzmitry-lahoda commented 6 years ago

Real worlds scenarios involve complex object graphs. Some containers could work better or worse in such case. So current tests make me to doubtful about results as using small amount of types may lead to false results. I going to write .tt file which generates and registeres 200 classes into 3 most fastest containers and Autofac and DryIoC.

My setup will be Layered HTTP Web API like backed application.

Controller depends on Services depends on UnitOfWorks depends on Repositories. All may by even/odd or other rule depend on IEventing/ILogging/IEnvironemnt etc. All resolution is done via constructors. Controller resolved per request. Other layers are shared for that Controller, e.g IUnitOfWork1 resolved by Service1 and Service2 is reused for Controller. IEnvironment is singleton. IAuthorization and IRouting implementations are chosen and resolved depending on current HTTP headers.

Containers resolution is done in 4 threads to imitate concurrent workload.

Results of these tests should be placed into separate spreadsheet graph.

Another options are console or desktop or mobile app.