benchmark

This commit is contained in:
ikpil 2024-08-03 14:36:46 +09:00
parent c036501879
commit 8a655528c3
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,5 @@
using System.Collections.Immutable;
using System.Linq;
using BenchmarkDotNet.Running; using BenchmarkDotNet.Running;
using DotRecast.Benchmark.Benchmarks; using DotRecast.Benchmark.Benchmarks;
@ -7,11 +9,13 @@ public static class BenchmarkProgram
{ {
public static int Main(string[] args) public static int Main(string[] args)
{ {
var summary = BenchmarkRunner.Run([ var runs = ImmutableArray.Create(
//BenchmarkConverter.TypeToBenchmarks(typeof(VectorBenchmarks)), BenchmarkConverter.TypeToBenchmarks(typeof(VectorBenchmarks)),
//BenchmarkConverter.TypeToBenchmarks(typeof(PriorityQueueBenchmarks)), BenchmarkConverter.TypeToBenchmarks(typeof(PriorityQueueBenchmarks)),
BenchmarkConverter.TypeToBenchmarks(typeof(StackallocBenchmarks)), BenchmarkConverter.TypeToBenchmarks(typeof(StackallocBenchmarks))
]); );
var summary = BenchmarkRunner.Run(runs.ToArray());
return 0; return 0;
} }

View File

@ -5,7 +5,6 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>