Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schniz/benchy-action
a hassle-free GitHub Action to benchmark your code continuously.
https://github.com/schniz/benchy-action
action actions benchmark github-actions performance
Last synced: 3 days ago
JSON representation
a hassle-free GitHub Action to benchmark your code continuously.
- Host: GitHub
- URL: https://github.com/schniz/benchy-action
- Owner: Schniz
- Created: 2022-12-08T19:26:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-06T10:45:10.000Z (about 1 year ago)
- Last Synced: 2024-12-10T16:21:55.932Z (18 days ago)
- Topics: action, actions, benchmark, github-actions, performance
- Language: TypeScript
- Homepage:
- Size: 979 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# benchy-action
A continuous benchmarking tool for GitHub Actions.
## Installation
You can [install the GitHub app here](https://github.com/apps/benchy-commenter) to get comments on pull requests and commits
automatically.This is not mandatory, and you can use this action without the app: instead of getting comments,
the action will print an ASCII table in the logs.## Example usage
```yaml
name: My CI test
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: Schniz/benchy-action@v2
with:
key: "a value to track"
value: 666
```## The `id-token` Permissions
Benchy is built to be hassle-free and to be used as fast as possible: without any authentication or registration.
So, in order to authenticate the requests from GitHub Actions we use the [OpenID Connect feature of GitHub Actions](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#overview-of-openid-connect) to get an ID token that is signed by GitHub and contains the information about the repository and the workflow run.Enabling `id-token: write` on the GitHub Actions job will enable the action to get an ID token and use it to authenticate the requests to the Benchy API.
## Action Inputs
| Name | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `key` | The key to track |
| `value` | The value to track |
| `json` | Data to track in a JSON format |
| `input_file` | Path to a JSON file to track data from |
| `track_file_size` | A glob pattern to track the size of files in the repository. For example, `dist/**/*.min.js` will track the size of all the minified JavaScript files in the `dist` directory. |See the [JSON Schema](./dist/file-schema.json) for the format of the JSON value/file.