From f044f671282603407b0ec306feb8e11556717492 Mon Sep 17 00:00:00 2001 From: Nick Craver Date: Fri, 3 Mar 2023 06:41:53 -0500 Subject: [PATCH] Benchmarcs: update to net6.0 and stuff (#65) Done for #64, runs can now be: ```ps .\Benchmarks.cmd --filter *Lock* ``` --- Benchmarks.cmd | 2 +- tests/Benchmark/ArrayPoolStreamBenchmark.cs | 2 -- tests/Benchmark/Benchmark.csproj | 2 +- tests/Benchmark/DelegateBenchmarks.cs | 2 -- tests/Benchmark/LockBenchmarks.cs | 2 -- tests/Benchmark/Program.cs | 2 -- 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Benchmarks.cmd b/Benchmarks.cmd index b7a76ba..e5d3e96 100644 --- a/Benchmarks.cmd +++ b/Benchmarks.cmd @@ -1,2 +1,2 @@ @ECHO OFF -dotnet run -p .\tests\Benchmark\ -c Release -f netcoreapp2.2 --runtimes net472 netcoreapp2.2 -m \ No newline at end of file +dotnet run --project .\tests\Benchmark\ -c Release -f net6.0 --runtimes net472 net6.0 -m %* \ No newline at end of file diff --git a/tests/Benchmark/ArrayPoolStreamBenchmark.cs b/tests/Benchmark/ArrayPoolStreamBenchmark.cs index 73cad59..c85a31f 100644 --- a/tests/Benchmark/ArrayPoolStreamBenchmark.cs +++ b/tests/Benchmark/ArrayPoolStreamBenchmark.cs @@ -8,8 +8,6 @@ namespace Benchmark { [MemoryDiagnoser] - [SimpleJob(RuntimeMoniker.NetCoreApp31)] - [SimpleJob(RuntimeMoniker.Net472)] [WarmupCount(2)] public class ArrayPoolStreamBenchmark { diff --git a/tests/Benchmark/Benchmark.csproj b/tests/Benchmark/Benchmark.csproj index 000f9a7..8345b2f 100644 --- a/tests/Benchmark/Benchmark.csproj +++ b/tests/Benchmark/Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net461;net472;net5.0 + net461;net472;net6.0 latest true diff --git a/tests/Benchmark/DelegateBenchmarks.cs b/tests/Benchmark/DelegateBenchmarks.cs index b14f7c8..943afef 100644 --- a/tests/Benchmark/DelegateBenchmarks.cs +++ b/tests/Benchmark/DelegateBenchmarks.cs @@ -6,8 +6,6 @@ namespace Benchmark { - [SimpleJob(RuntimeMoniker.Net472)] - [SimpleJob(RuntimeMoniker.NetCoreApp31)] [MemoryDiagnoser, MinColumn, MaxColumn] [GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)] [CategoriesColumn] diff --git a/tests/Benchmark/LockBenchmarks.cs b/tests/Benchmark/LockBenchmarks.cs index 25f4a30..4f727bf 100644 --- a/tests/Benchmark/LockBenchmarks.cs +++ b/tests/Benchmark/LockBenchmarks.cs @@ -7,8 +7,6 @@ namespace Benchmark { - [SimpleJob(RuntimeMoniker.Net472)] - [SimpleJob(RuntimeMoniker.NetCoreApp31)] [MemoryDiagnoser, MinColumn, MaxColumn] public class LockBenchmarks : BenchmarkBase { diff --git a/tests/Benchmark/Program.cs b/tests/Benchmark/Program.cs index 688328c..173c649 100644 --- a/tests/Benchmark/Program.cs +++ b/tests/Benchmark/Program.cs @@ -9,9 +9,7 @@ private static void Main(string[] args) { if (args == null || args.Length == 0) { // if no args, we're probably using Ctrl+F5 in the IDE; enlargen thyself! -#pragma warning disable CA1416 // windows only try { Console.WindowWidth = Console.LargestWindowWidth - 20; } catch { } -#pragma warning restore CA1416 // windows only } BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); }