Porting CoreClr benchmarks into the repo.#31
Conversation
AndyAyersMS
left a comment
There was a problem hiding this comment.
Does the global solution get messed up because the projects don't have unique GUIDs?
How are you handling package references for span in netcoreapp 1.1 and 2.0? Is referring to the portable span?
|
@AndyAyersMS I will remove the solution file. It's not needed anymore. It was my initial attempt. The whole GUID stuff was a mess. dotnet restore ./src/coreclr/harness/harness.csproj
dotnet publish ./src/coreclr/harness/harness.csproj -c release -f netcoreapp1.1
dotnet publish ./src/coreclr/harness/harness.csproj -c release -f netcoreapp2.0
dotnet publish ./src/coreclr/harness/harness.csproj -c release -f netcoreapp2.1
``` #Resolved |
| <ProjectReference Include="..\V8\Richards\Richards.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)'!='netcoreapp1.1'"> |
There was a problem hiding this comment.
@AndyAyersMS This is how I handle different releases. #Resolved
|
|
||
| ```log | ||
| Xunit-Performance-Api | ||
| Copyright (c) Microsoft Corporation 2015 |
There was a problem hiding this comment.
nit: 2015 -> 2018? #Resolved
There was a problem hiding this comment.
| ```cmd | ||
| dotnet restore Harness/Harness.csproj | ||
| dotnet publish Harness/Harness.csproj -c <Configuration> -f <Framework> | ||
| ``` |
There was a problem hiding this comment.
is publish required? why not just dotnet run -c Release -f <Framework> ? #Resolved
There was a problem hiding this comment.
This is to publish (build) a self contained folder. I do not like dotnet run when running benchmarks. It's slower because it implies: build -> run. dotnet <path to dll> should be the way to run benchmarks.
Below is the step to run benchmarks.
In reply to: 188951947 [](ancestors = 188951947)
|
|
||
| <WarningLevel>4</WarningLevel> | ||
| <TreatWarningsAsErrors>false</TreatWarningsAsErrors> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
|
btw should we keep the |
|
We do not need to keep it. I was trying to keep the same structure Drew has on his port of CoreFx. We could come up with something better. In reply to: 389869235 [](ancestors = 389869235) |
|
|
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFrameworks>netcoreapp1.1;netcoreapp2.0;netcoreapp2.1</TargetFrameworks> |
There was a problem hiding this comment.
Do we still need to build for netcoreapp1.1? Also, should we add net461 here? #Resolved
There was a problem hiding this comment.
There is no draw back at the moment on supporting netcoreapp1.1. Once we stop providing support we could remove it.
In reply to: 188997692 [](ancestors = 188997692)
There was a problem hiding this comment.
I will add desktop after some testing... Mono is missing too
In reply to: 189015906 [](ancestors = 189015906,188997692)
|
@jorive, how do these benchmarks stay in sync with CoreCLR? I'm thinking we should work with the corefx folks that own the mirror to set it up to sync these files. This will require that the directory structures remain largely the same (it does not have to be the same from the root directory, but could be the same within the coreclr directory), but will give us the benefit of not having to manually port changes. What do you think? #Resolved |
|
The directory is very closed to CoreClr, so you could potentially script a copy *.cs between benchmarks. The idea is that eventually we make CoreClr use these benchmarks :) In reply to: 389905514 [](ancestors = 389905514) |
|
I just found out that some benchmarks depend on CORE_ROOT being defined... I'll fix it :( |
|
The reliance on CORE_ROOT is usually a workaround for not being able to locate an assembly's directory, either to reference it (for the roslyn tests) or to find co-located input files. IIRC there were some missing APIs back when we first set up the benchmarks. See for instance dotnet/coreclr#9281. It would be nice to fix the underlying problem, but I think that's only possible in netstandard1.5 and up. |
|
@AndyAyersMS It seems a problem with the build in coreclr instead. With the current build, the resources/input-data are side-by-side with the assemblies, so they will not need to search for them in the source tree :) |
|
CoreCLR is actually the same way. The input files are copied into the same directory as the test assembly during build via project file directives. But on older netstandards the app cannot easily figure out where that assembly is located in the file system. |
|
OK, finally, all benchmarks build and run/pass. |
|
Latest change looks good to me. |
We also have two Csc benchmarks in Scenarios (compile hello world and compile roslyn), so maybe this one could be just deleted? the code looks good to me! great job @jorive 🍻 ! |
- Updated to .NET Core tooling (Cli). - Reorganized the folders. - Renamed PerfHarness to PerformanceHarness and placed it side-by-side to the benchmarks. - Added a reference of the benchmarks to the harness. - Enabled treat warnings as error. - Fixed warning/errors. - Adams needed to define XUNIT_PERF. - Added logs folder to .gitignore. - Added ms-python.python vscode extension suggestion. - Added initial README.md for the CoreClr benchmarks. - Moved common package reference to common.props - Added a prefix to the benchmark assembly names so it is easy to find/iterate on automation/ad-hoc runs - Removed CORE_ROOT dependency!!! - NOTE: CscBench code could be improved/cleaned (for example, it does not run on .NET Framework) - Bonus: Enable Desktop: net461
Background
The idea is to have a single repository with .NET benchmarks that can be built and tested against different stages of the .NET pipeline/repositories/branches/releases.
What's in this PR?
This is the initial work to bring the benchmarks from CoreClr into this repo.
Additionally, I have converted the benchmarks old MSBuild/C# csproj into the .NET Core C# csproj, configured the projects with a
common.propsimport, set treat warnings as errors, fixed the errors, and made the harness reference all the benchmarks (a single project needs to be built).Finally, the benchmarks support
netcoreapp1.1,netcoreapp2.0, andnetcoreapp2.1target frameworks (next, I might add desktop, thoughts?).What's missing?