add support for comparing various .NET Runtimes performance#15387
Conversation
|
@adamsitnik Thanks for submitting a PR! I played with your changes, and it seems to break the ability to target a specific version of In this case, To us, the ability to compare against different PowerShell SDK is more important than running benchmarks against different .NET runtimes. To some extent, running benchmarks with different PowerShell SDKs targeting the same BTW, the building of the auto-generated project is still biting us because we cannot specify
I think it makes sense to try |
Great catch, I've fixed that. In order to verify which version is being benchmarked I've added a setup method that just prints assembly version: [GlobalSetup]
public void PrintAssemblyVersion() => Console.WriteLine(typeof(Parser).Assembly.FullName);And run it without env var set: dotnet run -c release -f net6.0 --filter *using*With env var set: $env:PERF_TARGET_VERSION = '7.2.0-preview.5'
dotnet run -c release -f net6.0 --filter *using*And with env var not set, but against multiple TFMs: $env:PERF_TARGET_VERSION = ''
dotnet run -c release -f net6.0 --filter *using* --runtimes netcoreapp2.1 net5.0 net6.0 |
…d it triggers full build of all dependencies in the benchmarks project
I've noticed that |
|
Thanks for the quick turnaround. I wasn't aware that the MSBuild is case sensitive :) I will review again today. |
|
@adamsitnik Your changes look good! I made some updates to your changes mainly in 3 aspects:
Please take a look at my changes and let me know if I did anything wrong. Thanks! |
@daxian-dbw your changes look good to me, I've also tested it locally and everything works as expected |
|
@adamsitnik Thank you again for the help! |
|
🎉 Handy links: |
PR Summary
This PR adds support for comparing the performance of various .NET Runtimes.
The users can specify a single
TargetFrameworkusingdotnet runorStart-Benchmarking:Or multiple target framework monikers using
dotnet run:For more information please refer to BenchmarkDotNet docs
PR Context
dotnet/sdk#17013
To get it working I had to:
TargetFrameworkasTest.Common.propssetsTargetFrameworktonet6.0. This was mandatory to be able to target multiple TFMs.Awhich references projectBand we want to reference their packages for different TFMs, we have to explicitly reference packageAandB. Referencing justAgives errors about missingB.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.@daxian-dbw @adityapatwardhan PTAL