diff --git a/.vscode/launch.json b/.vscode/launch.json index 0bebc49a..05714b78 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,14 +5,14 @@ "name": "benchmarks", "type": "coreclr", "request": "launch", - "program": "${workspaceFolder}/benchmarks/bin/Release/net7.0/benchmarks.exe", - "args": [], + "program": "${workspaceFolder}/benchmarks/bin/Release/net8.0/benchmarks.exe", + "args": ["-m", "--runtimes", "net8.0", "--filter", "*"], "env": { "ASPNETCORE_ENVIRONMENT": "Development" }, "console": "integratedTerminal", "preLaunchTask": "build release", - "cwd": "${workspaceFolder}/benchmarks/bin/Release/net7.0/" + "cwd": "${workspaceFolder}/benchmarks/bin/Release/net8.0/" } ] } diff --git a/benchmarks/Program.fs b/benchmarks/Program.fs index 6a3054f6..59e7b3d7 100644 --- a/benchmarks/Program.fs +++ b/benchmarks/Program.fs @@ -1,28 +1,20 @@ -open System -open BenchmarkDotNet.Running -open benchmarks +open BenchmarkDotNet.Running open BenchmarkDotNet.Configs -open BenchmarkDotNet.Jobs open BenchmarkDotNet.Columns -open BenchmarkDotNet.Environments open BenchmarkDotNet.Reports -open FsToolkit.ErrorHandling.Benchmarks -open ApplicativeTests +open System.Reflection + [] let main argv = let cfg = DefaultConfig.Instance - // .AddJob(Job.Default.WithRuntime(CoreRuntime.Core50)) - .AddJob(Job.Default.WithRuntime(CoreRuntime.Core70)) .AddColumn(StatisticColumn.P80, StatisticColumn.P95) .WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend)) - // BenchmarkRunner.Run() |> ignore - // BenchmarkRunner.Run(cfg) |> ignore - // BenchmarkRunner.Run() |> ignore - BenchmarkRunner.Run(cfg, argv) + // see here for console args: https://benchmarkdotnet.org/articles/guides/console-args.html + BenchmarkRunner.Run(assembly = Assembly.GetExecutingAssembly(), config = cfg, args = argv) |> ignore 0 // return an integer exit code