-
-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does BenchmarkRunner generate an isolated project per each benchmark method/job/params? #671
Comments
@Matthew-Bonner we generate a new project per Job because it's the easiest way to support all our features (like custom GC mode per job) I will soon have to change it since I will be using BDN as a CI runner. So I will be generating one project for all benchmarks which share the same job/runtime settings. |
Thanks for the clarification, although very informative, this raises another question relating to the original question, which I would be grateful if you could also answer. When you make this change, will you be keeping support for the current implementation, or will this be a breaking change? |
It would be nice to have such option, but I'm not sure about the default behavior. |
@AndreyAkinshin the idea I have is following: create a dedicated type per benchmark but instead of having separate projects have one (many classes in Program.cs), then when running the benchmark provide the type name to the executable. So we have new process per every benchmark, but we compile only once per given runtime settings. So if I have 10 000 benchmarks and I want to run them for .NET Core 2.0 and 2.1, I am going to create two big projects with 10 000 benchmarks each, compile once for 2.0 and once for 2.1. But run new process 2x 10 000 times. @Matthew-Bonner the breaking change will be for those who implemented their custom toolchains. |
@adamsitnik, OK, makes sense. |
Implemented in #699, will be part of 0.11.0 |
This will break my toolchain then, so would it be possible to put together some instructions for migrating to the latest version, please? |
@Matthew-Bonner the changes are very small on the toolchain level. All methods are now using |
In the documentation: http://benchmarkdotnet.org/Internals/HowItWorks.htm it states, "BenchmarkRunner generates an isolated project per each benchmark method/job/params and builds it in Release mode."
Can I ask why as the documentation doesn't state why this is the case and once the reason is provided can I add this to the docs as I think others will have the same question.
The reason I'm asking is it takes a lot of time to build each test, and I can't rely on the --no-dependencies argument as each test in the project I'm benchmarking has a particular dependency on a third-party library so all dll's are being pulled in and there are a lot.
Depending on what the answer is to my question, if it is feasible I'd like to create one project containing all the benchmarks to run.
The text was updated successfully, but these errors were encountered: