Skip to content

Commit 200ff61

Browse files
authored
Updated benchmarks to work with net8.0 updates (#291)
1 parent a5d96b2 commit 200ff61

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"name": "benchmarks",
66
"type": "coreclr",
77
"request": "launch",
8-
"program": "${workspaceFolder}/benchmarks/bin/Release/net7.0/benchmarks.exe",
9-
"args": [],
8+
"program": "${workspaceFolder}/benchmarks/bin/Release/net8.0/benchmarks.exe",
9+
"args": ["-m", "--runtimes", "net8.0", "--filter", "*"],
1010
"env": {
1111
"ASPNETCORE_ENVIRONMENT": "Development"
1212
},
1313
"console": "integratedTerminal",
1414
"preLaunchTask": "build release",
15-
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net7.0/"
15+
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net8.0/"
1616
}
1717
]
1818
}

benchmarks/Program.fs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1-
open System
2-
open BenchmarkDotNet.Running
3-
open benchmarks
1+
open BenchmarkDotNet.Running
42
open BenchmarkDotNet.Configs
5-
open BenchmarkDotNet.Jobs
63
open BenchmarkDotNet.Columns
7-
open BenchmarkDotNet.Environments
84
open BenchmarkDotNet.Reports
9-
open FsToolkit.ErrorHandling.Benchmarks
10-
open ApplicativeTests
5+
open System.Reflection
6+
117

128
[<EntryPoint>]
139
let main argv =
1410

1511
let cfg =
1612
DefaultConfig.Instance
17-
// .AddJob(Job.Default.WithRuntime(CoreRuntime.Core50))
18-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core70))
1913
.AddColumn(StatisticColumn.P80, StatisticColumn.P95)
2014
.WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend))
21-
// BenchmarkRunner.Run<EitherMapBenchmarks>() |> ignore
22-
// BenchmarkRunner.Run<TaskResult_BindCEBenchmarks>(cfg) |> ignore
23-
// BenchmarkRunner.Run<BindSameBenchmarks>() |> ignore
2415

25-
BenchmarkRunner.Run<SeqTests.SeqBenchmarks>(cfg, argv)
16+
// see here for console args: https://benchmarkdotnet.org/articles/guides/console-args.html
17+
BenchmarkRunner.Run(assembly = Assembly.GetExecutingAssembly(), config = cfg, args = argv)
2618
|> ignore
2719

2820
0 // return an integer exit code

0 commit comments

Comments
 (0)