Skip to content

Commit

Permalink
Updated benchmarks to work with net8.0 updates (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
1eyewonder authored Dec 21, 2024
1 parent a5d96b2 commit 200ff61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
]
}
18 changes: 5 additions & 13 deletions benchmarks/Program.fs
Original file line number Diff line number Diff line change
@@ -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


[<EntryPoint>]
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<EitherMapBenchmarks>() |> ignore
// BenchmarkRunner.Run<TaskResult_BindCEBenchmarks>(cfg) |> ignore
// BenchmarkRunner.Run<BindSameBenchmarks>() |> ignore

BenchmarkRunner.Run<SeqTests.SeqBenchmarks>(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

0 comments on commit 200ff61

Please sign in to comment.