Skip to content

Commit

Permalink
Add benchmark github actions workflow, run and report tachometer resu…
Browse files Browse the repository at this point in the history
…lts (#5991)

* pass local branch name from github actions  (#6019)

* better null check

Co-authored-by: Wendy <[email protected]>
  • Loading branch information
prudepixie and Wendy authored May 24, 2022
1 parent 7062900 commit 67afcd4
Show file tree
Hide file tree
Showing 20 changed files with 1,654 additions and 586 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/ci-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Fast Element benchmark jobs

on: [pull_request]

jobs:
setup:
name: Setup Tachometer Reporting
runs-on: ubuntu-latest
steps:
- name: Initialize tachometer comment
uses: andrewiggins/tachometer-reporter-action@v2
with:
initialize: true
render_create10k:
name: Run render create10k benchmark
needs: [setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Run tachometer and generate results file
run: |
cd packages/utilities/fast-benchmarks
yarn install
yarn run benchmark --library=fast-element --benchmark=render --versions latest local --localBenchFile=index2 --branchName=${GITHUB_HEAD_REF} --operations=create10k
# Upload this benchmarks results
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: results
path: packages/utilities/fast-benchmarks/results/fast-element_render-create10k.json
render_update10th:
name: Run render update 10th benchmark
needs: [setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Run tachometer and generate results file
run: |
cd packages/utilities/fast-benchmarks
yarn install
yarn run benchmark --library=fast-element --benchmark=render --versions latest local --localBenchFile=index2 --branchName=${GITHUB_HEAD_REF} --operations=update10th
# Upload this benchmarks results
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: results
path: packages/utilities/fast-benchmarks/results/fast-element_render-update10th.json
render_createDelete5x:
name: Run render create and delete 5 times benchmark
needs: [setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Run tachometer and generate results file
run: |
cd packages/utilities/fast-benchmarks
yarn install
yarn run benchmark --library=fast-element --benchmark=render --versions latest local --localBenchFile=index2 --branchName=${GITHUB_HEAD_REF} --operations=createDelete5x
# Upload this benchmarks results
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: results
path: packages/utilities/fast-benchmarks/results/fast-element_render-createDelete5x.json
report_results:
name: Report Results
needs: [render_create10k, render_update10th, render_createDelete5x]
runs-on: ubuntu-latest
steps:
# Download the results artifact
- uses: actions/download-artifact@v2
with:
name: results
path: packages/utilities/fast-benchmarks/results

# Read all the results and post comment
- name: Report Tachometer Result
uses: andrewiggins/tachometer-reporter-action@v2
with:
name: results
path: packages/utilities/fast-benchmarks/results/*.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "run workflow on any push",
"packageName": "fast-benchmarks",
"email": "email not defined",
"dependentChangeType": "patch"
}
Loading

0 comments on commit 67afcd4

Please sign in to comment.