Skip to content

Commit ee22745

Browse files
authored
Fix GC ASPNet bnechmarks on Linux (#5239)
* Fix GC ASPNet bnechmarks on Linux When running those benchmarks on Linux, we need to use different profiles. This change adds a separate ASPNetBenchmarks-Linux.csv to use as a source when generating the suite. * Copilot feedback
1 parent 0d46311 commit ee22745

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Legend,Base CommandLine
2+
JsonMin_Linux, --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/json.benchmarks.yml --scenario mapaction --application.framework net8.0 --application.options.collectCounters true --profile aspnet-gold-lin --property os=linux --property arch=x64
3+
FortunesEf_Linux, --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/database.benchmarks.yml --scenario fortunes_ef --application.framework net8.0 --application.options.collectCounters true --profile aspnet-gold-lin --property os=linux --property arch=x64

src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure/Commands/RunCommand/CreateSuiteCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ internal static string CreateASPNetBenchmarkSuite(InputConfiguration inputConfig
108108

109109
// Copy over the pertinent resources.
110110
string destinationASPNetBenchmark = Path.Combine(aspnetBenchmarks, "ASPNetBenchmarks.csv");
111-
Core.Utilities.TryCopyFile(sourcePath: Path.Combine(_baseSuitePath, "ASPNetBenchmarks.csv"),
111+
string sourceASPNetBenchmark = Path.Combine(_baseSuitePath, OperatingSystem.IsWindows() ? "ASPNetBenchmarks.csv" : "ASPNetBenchmarks-Linux.csv");
112+
113+
Core.Utilities.TryCopyFile(sourcePath: sourceASPNetBenchmark,
112114
destinationPath: destinationASPNetBenchmark);
113115

114116
string outputPath = Path.Combine(inputConfiguration.output_path, "ASPNetBenchmarks");

src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure/GC.Infrastructure.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
<None Update="Commands\RunCommand\BaseSuite\ASPNetBenchmarks.csv">
4848
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4949
</None>
50+
<None Update="Commands\RunCommand\BaseSuite\ASPNetBenchmarks-Linux.csv">
51+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
52+
</None>
5053
<None Update="Commands\RunCommand\BaseSuite\ASPNetBenchmarks.yaml">
5154
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5255
</None>

0 commit comments

Comments
 (0)