Add benchmark tracking workflow with GitHub Pages#3028
Add benchmark tracking workflow with GitHub Pages#3028dantleech merged 1 commit intophpactor:masterfrom
Conversation
|
nice, this made me wonder if PHPBench could support JSON output by default (PR): Using a currently custom report: but maybe I could add it as a default 🤔 or maybe just a documented exeample. |
|
thanks, I'll try and replace the custom converson script with a PHPBench report 👍 |
|
nm, think we've figured it out: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target |
|
@AJenbo I've now made the report generation possible natively in the newly tagged PHPBench 1.6.0: In You can then generate the JSON report with: |
|
Nice! |
This adds a GitHub Actions workflow that tracks PHPBench results over time
using benchmark-action/github-action-benchmark
and publishes them to GitHub Pages.
Here's what it looks like in practice on our project:
https://ajenbo.github.io/phpantom_lsp/dev/bench/
On push to master:
gh-pagesbranchhttps://phpactor.github.io/phpactor/dev/bench/On pull requests:
Since PHPBench's XML output isn't directly compatible with the benchmark action,
a small PHP converter script (
.github/phpbench_to_json.php) bridges the two formats.The
gh-pagesbranch is created automatically on the first run.We use phpactor's benchmarks as the basis for performance testing in PHPantom and wanted to give something back. Hopefully this is useful for tracking regressions upstream too.