ordo-one / package-benchmark

Swift benchmark runner with many performance metrics and great CI support
Apache License 2.0
313 stars 25 forks source link

Better CI file Docs #273

Open MahdiBM opened 2 weeks ago

MahdiBM commented 2 weeks ago

As I mentioned to @hassila while he was helping me understand this great benchmarking package, I've put together some CI files that I think can be very nice to have for others as well.

I propose updating the docs CI section to point to a bunch of different sample CI files, each with a short explanation, so users have options on choosing how to put together their CI.

To meet our needs at work, I've created these 2 CI files that I propose to somehow add to the docs since they can be helpful for others as well:

  1. Benchmarking against thresholds. Advantages compared to the default CI that currently is in the docs:
    • Checks against static thresholds, not the default branch.
    • Caches the .build for faster benchmarking.
    • Sends a comment with full info to the related PR, if existent.
    • The benchmark results are attached to the comment too, other than the check result.
    • The formatting looks much nicer:
    • The blue timestamp text, links to a website to see the time in your own timezone if needed.

Screenshot 2024-09-13 at 7 28 58 PM

  1. Updating Thresholds Using The Same CI Running The Benchmarks
    • You can manually trigger this workflow for your branches.
    • It then commits the changes to the branch.