-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪Add PerfTests for startup and JIT comparing v4 and v5 (#1283)
Dump some tests used to benchmark #1126
- Loading branch information
1 parent
5f13d99
commit 46e607d
Showing
10 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,12 @@ | |
"commands": [ | ||
"dotnet-dotcover" | ||
] | ||
}, | ||
"timeitsharp": { | ||
"version": "0.0.8", | ||
"commands": [ | ||
"dotnet-timeit" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>perftest</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\UnitsNet\UnitsNet.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using UnitsNet; | ||
using UnitsNet.Units; | ||
|
||
Console.WriteLine(Power.From(5, PowerUnit.Watt)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC2155 | ||
declare -r dirname=$(dirname -- "$0") | ||
|
||
pushd "$dirname" || exit | ||
dotnet publish | ||
dotnet timeit "$dirname/timeit.json" | ||
popd || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"warmUpCount": 10, | ||
"count": 20, | ||
"scenarios": [{ "name": "Default" }], | ||
"processName": "../../Artifacts/PerfTest_Startup/net7.0/PerfTest_Startup.exe", | ||
"workingDirectory": "$(CWD)/", | ||
"processTimeout": 15 | ||
} |
15 changes: 15 additions & 0 deletions
15
PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>perftest_before</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="UnitsNet" Version="4.144.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
|
||
using UnitsNet; | ||
using UnitsNet.Units; | ||
|
||
Console.WriteLine(Power.From(5, PowerUnit.Watt)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC2155 | ||
declare -r dirname=$(dirname -- "$0") | ||
|
||
pushd "$dirname" || exit | ||
dotnet publish | ||
dotnet timeit "$dirname/timeit.json" | ||
popd || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"warmUpCount": 5, | ||
"count": 10, | ||
"scenarios": [{ "name": "Default" }], | ||
"processName": "../../Artifacts/PerfTest_Startup_v4_144_0/net7.0/PerfTest_Startup_v4_144_0.exe", | ||
"workingDirectory": "$(CWD)/", | ||
"processTimeout": 15 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters