fsprojects / FSharpLint

Lint tool for F#
https://fsprojects.github.io/FSharpLint/
MIT License
300 stars 73 forks source link

Run the benchmarks using the default runtime rather than trying to fo… #694

Closed Numpsy closed 5 months ago

Numpsy commented 5 months ago

…rce .NET Core 2.1 (as that won't work when the project is built as .NET 6.0)

refs #620

It looks like BenchmarkDotNet was updated in #657 and that has fixed the Microsoft.Diagnostics.Tracing.TraceEvent related error, so now it just needs updtaing to not try running as .NET Core 2.1 - if left at default it will run as .NET 6 to match the project settings.

It could alternatively be changed to use CoreRuntime.Core60 if there was a desire to be explicit.

Numpsy commented 5 months ago

Anyway, if i run it locally with this change it runs and I get results like

BenchmarkDotNet v0.13.11, Windows 10 (10.0.19045.3930/22H2/2022Update) (Hyper-V)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 6.0.418
  [Host]     : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2 DEBUG
  Job-HPIXNA : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2

Runtime=.NET 6.0

| Method         | Mean     | Error   | StdDev   | Median   |
|--------------- |---------:|--------:|---------:|---------:|
| LintParsedFile | 346.3 ms | 7.19 ms | 20.05 ms | 338.1 ms |
knocte commented 5 months ago

Thanks!