-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
816 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Fast Element benchmark jobs | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
# If you'd like a message to appear in existing results comment that the | ||
# benchmarks are current running and the shown results are out of date, run a | ||
# job before the benchmarks with the initialize option set to true. | ||
setup: | ||
name: Setup Tachometer Reporting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Initialize tachometer comment | ||
uses: andrewiggins/tachometer-reporter-action@v2 | ||
with: | ||
initialize: true | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo '::set-output name=dir::$(yarn cache dir)' | ||
|
||
- name: Set up node_modules cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: | | ||
${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install package dependencies | ||
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline | ||
- name: Prepare workspaces | ||
run: yarn prepare | ||
|
||
create10k: | ||
name: Run create 10k items benchmark | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.x" | ||
- run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline | ||
# Run benchmarks. Ensure each job's results file has a unique name | ||
- name: Run tachometer | ||
run: | | ||
cd packages/utilities/fast-benchmarks | ||
yarn install | ||
yarn run benchmark:fast-element:create10k | ||
# Upload this benchmarks results | ||
- name: Upload results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: results | ||
path: packages/utilities/fast-benchmarks/results/fast-element_test-create10k.json | ||
|
||
update10th: | ||
name: Run update 10th element benchmark | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- 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:fast-element:update10th | ||
# Upload this benchmarks results | ||
- name: Upload results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: results | ||
path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json | ||
|
||
report_results: | ||
name: Report Results | ||
needs: [create10k, update10th] | ||
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 |
7 changes: 7 additions & 0 deletions
7
change/fast-benchmarks-9a607d76-22aa-4cdd-bd1a-4b186cb44969.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
{ | ||
"name": "fast-benchmarks", | ||
"version": "1.0.0", | ||
"description": "", | ||
"description": "utility library benchmarking for FAST libraries", | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc && tsc --build", | ||
"benchmark": "node scripts/index.js", | ||
"help": "node ./scripts/index.js --help", | ||
"benchmark:binding": "tach --config benchmarks/fast-element/binding/tachometer.json", | ||
"debug:binding": "tach --config fast-element/binding/tachometer.json --manual" | ||
"benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", | ||
"debug:binding": "tach --config fast-element/binding/tachometer.json --manual", | ||
"benchmark:fast-element:create10k": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=create10k", | ||
"benchmark:fast-element:update10th": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th" | ||
}, | ||
"author": "Microsoft", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@microsoft/fast-element": "file:../../web-components/fast-element", | ||
"@microsoft/fast-foundation": "^2.45.0", | ||
"@microsoft/fast-element": "1.10.1", | ||
"tachometer": "^0.5.10" | ||
}, | ||
"devDependencies": { | ||
"chalk": "^5.0.1", | ||
"chromedriver": "^99.0.0", | ||
"chromedriver": "^101.0.0", | ||
"commander": "^9.2.0", | ||
"cross-spawn": "^7.0.3", | ||
"typescript": "^4.3.5" | ||
"typescript": "^4.6.2" | ||
} | ||
} |
Oops, something went wrong.