From 8a655528c3cfb20d1fc9b6bf87334c1310df58db Mon Sep 17 00:00:00 2001 From: ikpil Date: Sat, 3 Aug 2024 14:36:46 +0900 Subject: [PATCH] benchmark --- test/DotRecast.Benchmark/BenchmarkProgram.cs | 14 +++++++++----- .../DotRecast.Benchmark/DotRecast.Benchmark.csproj | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/test/DotRecast.Benchmark/BenchmarkProgram.cs b/test/DotRecast.Benchmark/BenchmarkProgram.cs index 47b3601..8f4c057 100644 --- a/test/DotRecast.Benchmark/BenchmarkProgram.cs +++ b/test/DotRecast.Benchmark/BenchmarkProgram.cs @@ -1,3 +1,5 @@ +using System.Collections.Immutable; +using System.Linq; using BenchmarkDotNet.Running; using DotRecast.Benchmark.Benchmarks; @@ -7,11 +9,13 @@ public static class BenchmarkProgram { public static int Main(string[] args) { - var summary = BenchmarkRunner.Run([ - //BenchmarkConverter.TypeToBenchmarks(typeof(VectorBenchmarks)), - //BenchmarkConverter.TypeToBenchmarks(typeof(PriorityQueueBenchmarks)), - BenchmarkConverter.TypeToBenchmarks(typeof(StackallocBenchmarks)), - ]); + var runs = ImmutableArray.Create( + BenchmarkConverter.TypeToBenchmarks(typeof(VectorBenchmarks)), + BenchmarkConverter.TypeToBenchmarks(typeof(PriorityQueueBenchmarks)), + BenchmarkConverter.TypeToBenchmarks(typeof(StackallocBenchmarks)) + ); + + var summary = BenchmarkRunner.Run(runs.ToArray()); return 0; } diff --git a/test/DotRecast.Benchmark/DotRecast.Benchmark.csproj b/test/DotRecast.Benchmark/DotRecast.Benchmark.csproj index c284e95..1aa890c 100644 --- a/test/DotRecast.Benchmark/DotRecast.Benchmark.csproj +++ b/test/DotRecast.Benchmark/DotRecast.Benchmark.csproj @@ -5,7 +5,6 @@ net6.0;net7.0;net8.0 true false - true