revert: Get rid of benchmark action

It did not work, and is not worth trying to fix.

This reverts commit 34cdc50fa58b1ba6cdeefb59e9b8907334b5f72f.
This reverts commit d49d0cb88db1c6d72d7811db3777a515ce490844.
This reverts commit ab3af71bac07798ef242463d1c85a33d7aa0ff24.
This commit is contained in:
Sam Therapy 2023-05-22 18:24:36 +02:00
parent e3bf492c97
commit 02b5ab5e17
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 32 additions and 81 deletions

View file

@ -1,47 +0,0 @@
name: Benchmark
on:
push:
branches: [master]
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run Benchmarks
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore Cache
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Run benchmarks
run: dotnet run -c Release --framework net7.0 --project ./src/Xdg.Benchmarks/Xdg.Benchmarks.fsproj --exporters json --filter '*'
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Benchmark.Net Benchmark
tool: 'benchmarkdotnet'
output-file-path: BenchmarkDotNet.Artifacts/results/Program.Benchmarks-report-full-compressed.json
gh-repository: github.com/xdg-net/xdg-net.github.io
benchmark-data-dir-path: benchmarks
github-token: ${{ secrets.GH_PAGES_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
summary-always: true
fail-on-alert: true
alert-comment-cc-users: '@SamTherapy'

View file

@ -8,51 +8,49 @@ open Xdg.Directories;
[<SimpleJob(RuntimeMoniker.Net462)>]
[<SimpleJob(RuntimeMoniker.Net70, baseline = true)>]
[<SimpleJob(RuntimeMoniker.NativeAot70)>]
[<JsonExporterAttribute.Full>]
[<JsonExporterAttribute.FullCompressed>]
type Benchmarks() =
// Base Directory
[<Benchmark>]
member _.DataHome () = BaseDirectory.DataHome
// [<Benchmark>]
// member _.ConfigHome () = BaseDirectory.ConfigHome
// [<Benchmark>]
// member _.StateHome () = BaseDirectory.StateHome
// [<Benchmark>]
// member _.BinHome () = BaseDirectory.BinHome
// [<Benchmark>]
// member _.DataDirs () = BaseDirectory.DataDirs
// [<Benchmark>]
// member _.ConfigDirs () = BaseDirectory.ConfigDirs
// [<Benchmark>]
// member _.CacheHome () = BaseDirectory.CacheHome
// [<Benchmark>]
// member _.RuntimeDir() = BaseDirectory.RuntimeDir
[<Benchmark>]
member _.ConfigHome () = BaseDirectory.ConfigHome
[<Benchmark>]
member _.StateHome () = BaseDirectory.StateHome
[<Benchmark>]
member _.BinHome () = BaseDirectory.BinHome
[<Benchmark>]
member _.DataDirs () = BaseDirectory.DataDirs
[<Benchmark>]
member _.ConfigDirs () = BaseDirectory.ConfigDirs
[<Benchmark>]
member _.CacheHome () = BaseDirectory.CacheHome
[<Benchmark>]
member _.RuntimeDir() = BaseDirectory.RuntimeDir
// User Directories
// [<Benchmark>]
// member _.DesktopDir () = UserDirectory.DesktopDir
// [<Benchmark>]
// member _.DownloadDir () = UserDirectory.DownloadDir
[<Benchmark>]
member _.DesktopDir () = UserDirectory.DesktopDir
[<Benchmark>]
member _.DownloadDir () = UserDirectory.DownloadDir
[<Benchmark>]
member _.DocumentsDir () = UserDirectory.DocumentsDir
// [<Benchmark>]
// member _.MusicDir () = UserDirectory.MusicDir
// [<Benchmark>]
// member _.PicturesDir () = UserDirectory.PicturesDir
// [<Benchmark>]
// member _.VideosDir () = UserDirectory.VideosDir
// [<Benchmark>]
// member _.TemplatesDir () = UserDirectory.TemplatesDir
// [<Benchmark>]
// member _.PublicDir () = UserDirectory.PublicDir
[<Benchmark>]
member _.MusicDir () = UserDirectory.MusicDir
[<Benchmark>]
member _.PicturesDir () = UserDirectory.PicturesDir
[<Benchmark>]
member _.VideosDir () = UserDirectory.VideosDir
[<Benchmark>]
member _.TemplatesDir () = UserDirectory.TemplatesDir
[<Benchmark>]
member _.PublicDir () = UserDirectory.PublicDir
// Other
[<Benchmark>]
member _.Home () = Other.Home
// [<Benchmark>]
// member _.Applications () = Other.Applications
// [<Benchmark>]
// member _.Fonts () = Other.Fonts
[<Benchmark>]
member _.Applications () = Other.Applications
[<Benchmark>]
member _.Fonts () = Other.Fonts
BenchmarkRunner.Run<Benchmarks>() |> ignore