-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
add support for comparing various .NET Runtimes performance #15387
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
TargetFramework
usingdotnet run
orStart-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:
TargetFramework
asTest.Common.props
setsTargetFramework
tonet6.0
. This was mandatory to be able to target multiple TFMs.A
which references projectB
and we want to reference their packages for different TFMs, we have to explicitly reference packageA
andB
. Referencing justA
gives errors about missingB
.PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.@daxian-dbw @adityapatwardhan PTAL