From f4e1e26058dc7e1bbd2e1467505a7744b7378477 Mon Sep 17 00:00:00 2001 From: ikpil Date: Sat, 21 Dec 2024 16:25:55 +0900 Subject: [PATCH] modified to load all benchmark types at once --- .../DotRecast.Tool.Benchmark.csproj | 2 +- tool/DotRecast.Tool.Benchmark/Program.cs | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tool/DotRecast.Tool.Benchmark/DotRecast.Tool.Benchmark.csproj b/tool/DotRecast.Tool.Benchmark/DotRecast.Tool.Benchmark.csproj index d9b3ed08..38cf32e0 100644 --- a/tool/DotRecast.Tool.Benchmark/DotRecast.Tool.Benchmark.csproj +++ b/tool/DotRecast.Tool.Benchmark/DotRecast.Tool.Benchmark.csproj @@ -12,7 +12,7 @@ - + diff --git a/tool/DotRecast.Tool.Benchmark/Program.cs b/tool/DotRecast.Tool.Benchmark/Program.cs index 761d7c61..436f79a6 100644 --- a/tool/DotRecast.Tool.Benchmark/Program.cs +++ b/tool/DotRecast.Tool.Benchmark/Program.cs @@ -1,6 +1,6 @@ using System; +using System.Reflection; using BenchmarkDotNet.Running; -using DotRecast.Tool.Benchmark.DotRecast.Core; namespace DotRecast.Tool.Benchmark; @@ -8,14 +8,7 @@ public static class Program { public static int Main(string[] args) { - Type[] benchmarkTypes = - [ - typeof(VectorBenchmarks), - typeof(PriorityQueueBenchmarks), - typeof(ArrayBenchmarks) - ]; - - var switcher = new BenchmarkSwitcher(benchmarkTypes); + var switcher = BenchmarkSwitcher.FromAssembly(Assembly.GetExecutingAssembly()); if (args == null || args.Length == 0) {