From 2325860e26d417d0cae52009b0b0c62d53478784 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 10:08:10 -0700 Subject: [PATCH 01/49] update back to pr --- .github/workflows/ci-benchmarks.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 1d9477ee9f0..bedd9ebddd7 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -1,15 +1,6 @@ name: Fast Element benchmark jobs -on: - pull_request: - branches: - - master - - releases/* - - features/* - - users/* - push: - paths: - - 'packages/web-components/fast-element/**' +on: [pull_request] jobs: setup: From cb7ecf57983758c584e4933ad00da0b149dbe4c5 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 10:23:28 -0700 Subject: [PATCH 02/49] add specific operation --- packages/utilities/fast-benchmarks/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index d72effeeaf9..9c1a415e21a 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -9,7 +9,7 @@ "help": "node ./scripts/index.js --help", "benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", - "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2" + "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2 --operations=create10k" }, "author": "Microsoft", "license": "ISC", From 23f239595d15b9213dc6b589bbd0dee2092c2688 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 10:36:40 -0700 Subject: [PATCH 03/49] fix workflow syntax --- .github/workflows/ci-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index bedd9ebddd7..1fcaf20f680 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -79,7 +79,7 @@ jobs: report_results: name: Report Results - needs: [test, update10th] + needs: [test] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v2 From b50d6fb8799a4ca548fbe2ab2fdd05350ce64c2f Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 10:57:44 -0700 Subject: [PATCH 04/49] add version test --- .github/workflows/ci-benchmarks.yml | 29 ++++++++++++++++--- .../utilities/fast-benchmarks/package.json | 3 +- .../fast-benchmarks/scripts/index.js | 2 ++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 1fcaf20f680..308da65d6fb 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -34,8 +34,29 @@ jobs: - name: Prepare workspaces run: yarn prepare + test_local: + name: Run all operations for test benchmark create 10k + 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 + - name: Run tachometer + run: | + cd packages/utilities/fast-benchmarks + yarn install + yarn run benchmark:fast-element:test:local + + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_test-create10k.json test: - name: Run all operations for test benchmark + name: Run all operations for test benchmark update 10th element needs: [setup] runs-on: ubuntu-latest steps: @@ -54,8 +75,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test.json - + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json # update10th: # name: Run update 10th element benchmark # needs: [setup] @@ -79,7 +99,7 @@ jobs: report_results: name: Report Results - needs: [test] + needs: [test, test_local] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v2 @@ -90,5 +110,6 @@ jobs: - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 with: + report-id: fast-element-test name: results path: packages/utilities/fast-benchmarks/results/*.json diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 9c1a415e21a..1c02837478c 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -9,7 +9,8 @@ "help": "node ./scripts/index.js --help", "benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", - "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2 --operations=create10k" + "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 latest --operations=update10th", + "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2 --operations=create10k" }, "author": "Microsoft", "license": "ISC", diff --git a/packages/utilities/fast-benchmarks/scripts/index.js b/packages/utilities/fast-benchmarks/scripts/index.js index 3a514fc6790..60d025afe2f 100644 --- a/packages/utilities/fast-benchmarks/scripts/index.js +++ b/packages/utilities/fast-benchmarks/scripts/index.js @@ -78,6 +78,8 @@ async function runBenchmark(configPaths, pathNames) { for (let i = 0; i < configPaths.length; i++) { const configPath = configPaths[i]; const pathName = pathNames[i]; + + console.log("path name", pathName); const res = new Promise((resolve, reject) => { const args = [ "tach", From 482226a6848aaf42857d0b66232897fbab231558 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 11:10:38 -0700 Subject: [PATCH 05/49] add fast-element version --- packages/utilities/fast-benchmarks/package.json | 2 +- yarn.lock | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 1c02837478c..93055079472 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -15,7 +15,7 @@ "author": "Microsoft", "license": "ISC", "dependencies": { - "@microsoft/fast-element": "file:../../web-components/fast-element", + "@microsoft/fast-element": "1.10.1", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index bb3c067d7fa..efc4ba67179 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,8 +3633,10 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" -"@microsoft/fast-element@file:packages/web-components/fast-element": - version "1.9.0" +"@microsoft/fast-element@1.10.1": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@microsoft/fast-element/-/fast-element-1.10.1.tgz#2ca442a4a8d15f3fd796795a370e3a1bc9bd2738" + integrity sha512-cq+vBBa8JCuAhsFEwHM9386YolYu9pNb1sBodp69RqWuaU56ElC60dC3aQWuOKqAMNoQqtCHPh0RQTvVBegSyw== "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" From 46e4fefb206ce7eb7286ad452486013f60611a96 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 11:28:21 -0700 Subject: [PATCH 06/49] move local implementation to separate test --- .../fast-element/localTest/index.ts | 47 ++++++++++++++++ .../benchmarks/fast-element/test/index2.ts | 55 ------------------- .../utilities/fast-benchmarks/package.json | 2 +- 3 files changed, 48 insertions(+), 56 deletions(-) create mode 100644 packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts delete mode 100644 packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts diff --git a/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts b/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts new file mode 100644 index 00000000000..fe252cb59f1 --- /dev/null +++ b/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts @@ -0,0 +1,47 @@ +import { + attr, + css, + customElement, + FASTElement, + html, + observable, + repeat, +} from "@microsoft/fast-element"; +import { data, RandomItem } from "../../../utils/index.js"; + +@customElement({ + name: "x-item", + template: html` +
+ ${(x: XItem) => x.value} +
+ `, + styles: css` + .item { + display: flex; + } + `, +}) +class XItem extends FASTElement { + @attr value: string | undefined; + onClick(e: MouseEvent) { + console.log(e.type); + } +} + +@customElement({ + name: "x-app", + template: html` +
+ ${repeat( + x => x.items, + html` + + ` + )} +
+ `, +}) +class XApp extends FASTElement { + @observable items: RandomItem[] = data; +} diff --git a/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts b/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts deleted file mode 100644 index ed715e3eec1..00000000000 --- a/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - attr, - bind, - css, - customElement, - FASTElement, - html, - oneTime, - repeat, -} from "@microsoft/fast-element"; -import { data, RandomItem } from "../../../utils/index.js"; - -const xItemTemplate = html` -
- ${x => x.value} -
-`; - -const styles = css` - .item { - display: flex; - } -`; -@customElement({ - name: "x-item", - template: xItemTemplate, - styles, -}) -class XItem extends FASTElement { - @attr value: string | undefined; - - onClick(e: MouseEvent) { - console.log(e.type); - } -} - -const xAppTemplate = html` -
- ${repeat( - x => x.items, - html` - - ` - )} -
-`; -@customElement({ - name: "x-app", - template: xAppTemplate, -}) -class XApp extends FASTElement { - items: RandomItem[] = data; -} diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 93055079472..737718cf08e 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -10,7 +10,7 @@ "benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 latest --operations=update10th", - "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2 --operations=create10k" + "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local latest --localBenchFile=index2 --operations=create10k" }, "author": "Microsoft", "license": "ISC", From f9c0f2a5e482e2a481befec8ea4de2f91fcefed6 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 14:23:19 -0700 Subject: [PATCH 07/49] fix scripts, res dist --- packages/utilities/fast-benchmarks/scripts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utilities/fast-benchmarks/scripts/index.js b/packages/utilities/fast-benchmarks/scripts/index.js index 60d025afe2f..2ffa78fa66b 100644 --- a/packages/utilities/fast-benchmarks/scripts/index.js +++ b/packages/utilities/fast-benchmarks/scripts/index.js @@ -91,7 +91,7 @@ async function runBenchmark(configPaths, pathNames) { child.on("close", code => { if (code !== 0) { reject({ - command: `npx tach --config ${configPath} --json-file=results/${options.benchmark}/${pathName}.json`, + command: `npx tach --config ${configPath} --json-file=results/${pathName}.json`, }); return; } From 4d57b86c3e3a8a72400b90c569c4850dc09ce82e Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 15:07:22 -0700 Subject: [PATCH 08/49] test git hook --- .github/workflows/ci-benchmarks.yml | 74 ---- package.json | 335 ++++++++-------- .../utilities/fast-benchmarks/package.json | 6 +- .../results/fast-element_test-update10th.json | 372 ++++++++++++++++++ yarn.lock | 58 ++- 5 files changed, 602 insertions(+), 243 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 308da65d6fb..dc8dab3ba7f 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -33,80 +33,6 @@ jobs: run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - name: Prepare workspaces run: yarn prepare - - test_local: - name: Run all operations for test benchmark create 10k - 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 - - name: Run tachometer - run: | - cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark:fast-element:test:local - - - name: Upload results - uses: actions/upload-artifact@v2 - with: - name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test-create10k.json - test: - name: Run all operations for test benchmark update 10th element - 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 - - name: Run tachometer - run: | - cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark:fast-element:test - - - name: Upload results - uses: actions/upload-artifact@v2 - with: - name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.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 - - # - 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: [test, test_local] - runs-on: ubuntu-latest - steps: - - 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: diff --git a/package.json b/package.json index 4fa881d9cd3..38bc8e1d392 100644 --- a/package.json +++ b/package.json @@ -1,171 +1,176 @@ { - "name": "@microsoft/fast", - "description": "An unopinionated system of components, development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.", - "version": "1.8.0", - "author": { - "name": "Microsoft", - "url": "https://discord.gg/FcSNfg4" - }, - "license": "MIT", - "private": true, - "workspaces": { - "packages": [ - "packages/**/*", - "sites/fast-color-explorer", - "sites/fast-component-explorer", - "sites/site-utilities", - "sites/fast-website", - "sites/website", - "examples/design-system-tutorial" - ], - "nohoist": [ - "**/@types/chai", - "**/@types/jest", - "**/@types/karma", - "**/@types/mocha", - "**/@types/node", - "**/chai", - "**/html-minifier-terser", - "**/react-syntax-highlighter" - ] - }, - "engines": { - "yarn": ">=1.13 <2" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/fast.git" - }, - "bugs": { - "url": "https://github.com/Microsoft/fast/issues/new/choose" - }, - "scripts": { - "bump": "beachball bump", - "change": "beachball change", - "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", - "check": "beachball check ", - "publish": "beachball publish", - "publish-ci": "beachball publish -y --access public", - "integration-tests:alpha": "node build/testing/sauce-labs/test-browsers.js alpha", - "integration-tests:beta": "node build/testing/sauce-labs/test-browsers.js beta", - "integration-tests:release": "node build/testing/sauce-labs/test-browsers.js release", - "prepare": "lerna run prepare", - "test:diff:error": "echo \"Untracked files exist, try running yarn prepare to identify the culprit.\" && exit 1", - "test:diff": "git update-index --refresh && git diff-index --quiet HEAD -- || yarn test:diff:error", - "test:validation": "yarn test:diff", - "test": "yarn eslint \"/**/*.{ts}\" ", - "unit-tests": "jest --maxWorkers=4", - "coverage": "yarn jest --coverage", - "unit-tests:watch": "jest --watch", - "watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput", - "format:check": "lerna run prettier:diff", - "format": "lerna run prettier" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "build/helpers/*.ts" - ], - "coverageReporters": [ - "json", - [ - "lcov", - { - "projectRoot": "." + "name": "@microsoft/fast", + "description": "An unopinionated system of components, development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.", + "version": "1.8.0", + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", + "private": true, + "workspaces": { + "packages": [ + "packages/**/*", + "sites/fast-color-explorer", + "sites/fast-component-explorer", + "sites/site-utilities", + "sites/fast-website", + "sites/website", + "examples/design-system-tutorial" + ], + "nohoist": [ + "**/@types/chai", + "**/@types/jest", + "**/@types/karma", + "**/@types/mocha", + "**/@types/node", + "**/chai", + "**/html-minifier-terser", + "**/react-syntax-highlighter" + ] + }, + "engines": { + "yarn": ">=1.13 <2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/fast.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/fast/issues/new/choose" + }, + "scripts": { + "benchmarks": "cd packages/utilities/fast-benchmarks && yarn run benchmarks", + "bump": "beachball bump", + "change": "beachball change", + "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", + "check": "beachball check ", + "publish": "beachball publish", + "publish-ci": "beachball publish -y --access public", + "integration-tests:alpha": "node build/testing/sauce-labs/test-browsers.js alpha", + "integration-tests:beta": "node build/testing/sauce-labs/test-browsers.js beta", + "integration-tests:release": "node build/testing/sauce-labs/test-browsers.js release", + "prepare": "lerna run prepare", + "test:diff:error": "echo \"Untracked files exist, try running yarn prepare to identify the culprit.\" && exit 1", + "test:diff": "git update-index --refresh && git diff-index --quiet HEAD -- || yarn test:diff:error", + "test:validation": "yarn test:diff", + "test": "yarn eslint \"/**/*.{ts}\" ", + "unit-tests": "jest --maxWorkers=4", + "coverage": "yarn jest --coverage", + "unit-tests:watch": "jest --watch", + "watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput", + "format:check": "lerna run prettier:diff", + "format": "lerna run prettier" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" } - ] + }, + "pre-commit": [ + "benchmarks" ], - "coverageThreshold": { - "global": { - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } + "jest": { + "collectCoverage": true, + "collectCoverageFrom": [ + "build/helpers/*.ts" + ], + "coverageReporters": [ + "json", + [ + "lcov", + { + "projectRoot": "." + } + ] + ], + "coverageThreshold": { + "global": { + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } + }, + "testURL": "http://localhost", + "transform": { + "^.+\\.ts?$": "ts-jest", + "^.+\\.js?$": "babel-jest" + }, + "transformIgnorePatterns": [ + "!/node_modules/lodash-es", + "node_modules/jss-*", + "node_modules/css-vendor" + ], + "testPathIgnorePatterns": [ + "packages/", + "build/helpers/__tests__/*", + "build/helpers/" + ], + "testRegex": "/__tests__/.*\\.(test|spec)\\.(js|ts|tsx)$", + "moduleFileExtensions": [ + "ts", + "js" + ] }, - "testURL": "http://localhost", - "transform": { - "^.+\\.ts?$": "ts-jest", - "^.+\\.js?$": "babel-jest" + "lint-staged": { + "*.{ts,tsx,js,html}": [ + "prettier --write" + ] }, - "transformIgnorePatterns": [ - "!/node_modules/lodash-es", - "node_modules/jss-*", - "node_modules/css-vendor" - ], - "testPathIgnorePatterns": [ - "packages/", - "build/helpers/__tests__/*", - "build/helpers/" - ], - "testRegex": "/__tests__/.*\\.(test|spec)\\.(js|ts|tsx)$", - "moduleFileExtensions": [ - "ts", - "js" - ] - }, - "lint-staged": { - "*.{ts,tsx,js,html}": [ - "prettier --write" - ] - }, - "resolutions": { - "@types/react": "*", - "browserslist": "^4.16.5", - "clean-css": "^4.2.3", - "css-select": "^4.2.1", - "dns-packet": "^1.3.4", - "favicons/colors": "1.4.0", - "glob-parent": "^5.1.2", - "immer": "^9.0.6", - "is-svg": "^4.2.2", - "jimp": "^0.16.1", - "jpeg-js": "^0.4.3", - "js-yaml": "^3.13.1", - "karma/colors": "1.4.0", - "lodash": "^4.17.21", - "nanoid": "^3.1.31", - "node-notifier": "^9.0.0", - "trim-newlines": "^4.0.2", - "trim": "^0.0.3", - "typescript": "^3.9.0", - "ua-parser-js": "^0.7.28", - "ws": "^7.4.6", - "xmlhttprequest-ssl": "^1.6.2" - }, - "devDependencies": { - "@babel/core": "^7.12.13", - "@babel/preset-env": "^7.12.13", - "@octokit/rest": "^18.0.6", - "@types/jest": "^25.2.1", - "@types/lodash-es": "^4.17.4", - "@types/node": "^15.0.1", - "beachball": "^1.53.1", - "chalk": "^2.4.2", - "copyfiles": "^2.4.1", - "docusaurus-init": "^1.11.0", - "dotenv": "^6.0.0", - "eyes.selenium": "3.6.2", - "glob": "^7.1.2", - "husky": "^4.2.5", - "jest": "^25.4.0", - "lerna": "^3.20.2", - "lint-staged": "^10.1.2", - "markdown-it": "^12.3.2", - "prettier": "2.0.2", - "rimraf": "^3.0.2", - "ts-jest": "^25.4.0", - "ts-node": "^8.8.2", - "typescript": "^3.9.0", - "yargs": "^16.2.0" - }, - "dependencies": { - "saucelabs": "^1.5.0", - "selenium-webdriver": "^3.6.0" - } + "resolutions": { + "@types/react": "*", + "browserslist": "^4.16.5", + "clean-css": "^4.2.3", + "css-select": "^4.2.1", + "dns-packet": "^1.3.4", + "favicons/colors": "1.4.0", + "glob-parent": "^5.1.2", + "immer": "^9.0.6", + "is-svg": "^4.2.2", + "jimp": "^0.16.1", + "jpeg-js": "^0.4.3", + "js-yaml": "^3.13.1", + "karma/colors": "1.4.0", + "lodash": "^4.17.21", + "nanoid": "^3.1.31", + "node-notifier": "^9.0.0", + "trim-newlines": "^4.0.2", + "trim": "^0.0.3", + "typescript": "^3.9.0", + "ua-parser-js": "^0.7.28", + "ws": "^7.4.6", + "xmlhttprequest-ssl": "^1.6.2" + }, + "devDependencies": { + "@babel/core": "^7.12.13", + "@babel/preset-env": "^7.12.13", + "@octokit/rest": "^18.0.6", + "@types/jest": "^25.2.1", + "@types/lodash-es": "^4.17.4", + "@types/node": "^15.0.1", + "beachball": "^1.53.1", + "chalk": "^2.4.2", + "copyfiles": "^2.4.1", + "docusaurus-init": "^1.11.0", + "dotenv": "^6.0.0", + "eyes.selenium": "3.6.2", + "glob": "^7.1.2", + "husky": "^4.2.5", + "jest": "^25.4.0", + "lerna": "^3.20.2", + "lint-staged": "^10.1.2", + "markdown-it": "^12.3.2", + "prettier": "2.0.2", + "pre-commit": "1.2.2", + "rimraf": "^3.0.2", + "ts-jest": "^25.4.0", + "ts-node": "^8.8.2", + "typescript": "^3.9.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "saucelabs": "^1.5.0", + "selenium-webdriver": "^3.6.0" + } } diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 737718cf08e..5da2462800a 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -7,10 +7,10 @@ "build": "tsc && tsc --build", "benchmark": "node scripts/index.js", "help": "node ./scripts/index.js --help", - "benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", + "benchmarks": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", - "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 latest --operations=update10th", - "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local latest --localBenchFile=index2 --operations=create10k" + "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", + "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.10.1 --localBenchFile=index2 --operations=create10k" }, "author": "Microsoft", "license": "ISC", diff --git a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json index e69de29bb2d..15345d13f44 100644 --- a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json +++ b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json @@ -0,0 +1,372 @@ +{ + "benchmarks": [ + { + "name": "test-update10th [update10th]", + "bytesSent": 117574, + "version": "1.6.0", + "measurement": { + "name": "update10th", + "mode": "performance", + "entryName": "update10th" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 370.564803313502, + "high": 416.9018633511778 + }, + "differences": [ + null, + { + "absolute": { + "low": 356.50797515446993, + "high": 402.84503551020987 + }, + "percentChange": { + "low": 2536.189889658131, + "high": 2865.8326054928357 + } + }, + { + "absolute": { + "low": -16.89545195466125, + "high": 30.602118616956812 + }, + "percentChange": { + "low": -4.372397008863526, + "high": 7.915269905434383 + } + }, + { + "absolute": { + "low": 356.50587112765055, + "high": 402.84293160369594 + }, + "percentChange": { + "low": 2535.795039617326, + "high": 2865.389093940907 + } + } + ], + "samples": [ + 405.40000000596046, + 390.80000001192093, + 383.80000001192093, + 380.80000001192093, + 385.89999997615814, + 385.90000000596046, + 379.40000000596046, + 371.5, + 372.69999998807907, + 362.09999999403954, + 372.19999998807907, + 360.59999999403954, + 385.40000000596046, + 392.80000001192093, + 384.60000002384186, + 387, + 382.80000001192093, + 385.80000001192093, + 386.09999999403954, + 384.7999999821186, + 385.19999998807907, + 377, + 390.90000000596046, + 380.59999999403954, + 383.59999999403954, + 381.2000000178814, + 378.39999997615814, + 382.59999999403954, + 393.19999998807907, + 718.8999999761581 + ] + }, + { + "name": "test-update10th [usedJSHeapSize]", + "bytesSent": 117574, + "version": "1.6.0", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.054113395472584, + "high": 14.059542604527419 + }, + "differences": [ + { + "absolute": { + "low": -402.84503551020987, + "high": -356.50797515446993 + }, + "percentChange": { + "low": -96.63994037137053, + "high": -96.21978126762264 + } + }, + null, + { + "absolute": { + "low": -378.04083687034046, + "high": -367.6055071320438 + }, + "percentChange": { + "low": -96.41562476769997, + "high": -96.31761137789728 + } + }, + { + "absolute": { + "low": -0.006290308398531512, + "high": 0.002082375065201707 + }, + "percentChange": { + "low": -0.04473985189299422, + "high": 0.014809176196528101 + } + } + ], + "samples": [ + 14.062232, + 14.064435, + 14.061183, + 14.039703, + 14.062387, + 14.048535, + 14.064443, + 14.035703, + 14.0557, + 14.055446, + 14.06066, + 14.046698, + 14.069236, + 14.064658, + 14.055977, + 14.061584, + 14.056867, + 14.055072, + 14.058109, + 14.054494, + 14.055243, + 14.063016, + 14.051489, + 14.049735, + 14.055955, + 14.057813, + 14.060544, + 14.060087, + 14.060599, + 14.057237 + ] + }, + { + "name": "test-update10th [update10th]", + "bytesSent": 119552, + "version": "latest", + "measurement": { + "name": "update10th", + "mode": "performance", + "entryName": "update10th" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 381.6623358382101, + "high": 392.09766416417415 + }, + "differences": [ + { + "absolute": { + "low": -30.602118616956812, + "high": 16.89545195466125 + }, + "percentChange": { + "low": -7.672418157993271, + "high": 4.191212605420427 + } + }, + { + "absolute": { + "low": 367.6055071320438, + "high": 378.04083687034046 + }, + "percentChange": { + "low": 2615.1346018493923, + "high": 2689.3789342227874 + } + }, + null, + { + "absolute": { + "low": 367.60340289827474, + "high": 378.0387331707762 + }, + "percentChange": { + "low": 2614.72683538658, + "high": 2688.962931638024 + } + } + ], + "samples": [ + 396.90000000596046, + 389.30000001192093, + 383.90000000596046, + 392.5, + 386.09999999403954, + 399.90000000596046, + 369.2999999821186, + 374.69999998807907, + 368.40000000596046, + 371.7999999821186, + 372, + 376.60000002384186, + 382.5, + 383.30000001192093, + 384.40000000596046, + 389.5, + 382.7999999821186, + 386.60000002384186, + 396.59999999403954, + 391.40000000596046, + 383.80000001192093, + 382.40000000596046, + 385.7000000178814, + 384, + 386.39999997615814, + 381.09999999403954, + 380.59999999403954, + 391, + 409.80000001192093, + 443.09999999403954 + ] + }, + { + "name": "test-update10th [usedJSHeapSize]", + "bytesSent": 119552, + "version": "latest", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.055745059175745, + "high": 14.062118874157587 + }, + "differences": [ + { + "absolute": { + "low": -402.84293160369594, + "high": -356.50587112765055 + }, + "percentChange": { + "low": -96.63943787935165, + "high": -96.21921503292292 + } + }, + { + "absolute": { + "low": -0.002082375065201707, + "high": 0.006290308398531512 + }, + "percentChange": { + "low": -0.014815849962083289, + "high": 0.044751005555719384 + } + }, + { + "absolute": { + "low": -378.0387331707762, + "high": -367.60340289827474 + }, + "percentChange": { + "low": -96.41509017169064, + "high": -96.3170583153734 + } + }, + null + ], + "samples": [ + 14.05915, + 14.062914, + 14.039158, + 14.049913, + 14.063757, + 14.057377, + 14.065905, + 14.071427, + 14.040394, + 14.052283, + 14.054396, + 14.062922, + 14.062338, + 14.067728, + 14.048758, + 14.059535, + 14.059222, + 14.052059, + 14.068834, + 14.063647, + 14.069367, + 14.06405, + 14.060823, + 14.048379, + 14.066464, + 14.066619, + 14.063978, + 14.063835, + 14.057647, + 14.04508 + ] + } + ] +} diff --git a/yarn.lock b/yarn.lock index efc4ba67179..9e9182ae512 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8865,7 +8865,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0: +concat-stream@^1.4.7, concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -9343,6 +9343,15 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, c shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -17094,6 +17103,14 @@ lowlight@^1.14.0: fault "^1.0.0" highlight.js "~10.6.0" +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -19130,6 +19147,11 @@ os-name@^3.1.0: macos-release "^2.2.0" windows-release "^3.1.0" +os-shim@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" + integrity sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc= + os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -20701,6 +20723,15 @@ postcss@^8.4.6, postcss@^8.4.7: picocolors "^1.0.0" source-map-js "^1.0.2" +pre-commit@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" + integrity sha1-287g7p3nI15X95xW186UZBpp7sY= + dependencies: + cross-spawn "^5.0.1" + spawn-sync "^1.0.15" + which "1.2.x" + prebuild-install@^6.1.2: version "6.1.4" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" @@ -21002,6 +21033,11 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -23409,6 +23445,14 @@ spawn-command@^0.0.2-1: resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= +spawn-sync@^1.0.15: + version "1.0.15" + resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" + integrity sha1-sAeZVX63+wyDdsKdROih6mfldHY= + dependencies: + concat-stream "^1.4.7" + os-shim "^0.1.2" + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -26088,6 +26132,13 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= +which@1.2.x: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + integrity sha1-mofEN48D6CfOyvGs31bHNsAcFOU= + dependencies: + isexe "^2.0.0" + which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -26498,6 +26549,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" From c1a40c8321448bb2a53f7aa55cb206740895c014 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 15:32:31 -0700 Subject: [PATCH 09/49] revert --- package.json | 5 - .../results/fast-element_test-update10th.json | 354 +++++++++--------- yarn.lock | 58 +-- 3 files changed, 178 insertions(+), 239 deletions(-) diff --git a/package.json b/package.json index 38bc8e1d392..a5455a06592 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "url": "https://github.com/Microsoft/fast/issues/new/choose" }, "scripts": { - "benchmarks": "cd packages/utilities/fast-benchmarks && yarn run benchmarks", "bump": "beachball bump", "change": "beachball change", "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", @@ -67,9 +66,6 @@ "pre-commit": "lint-staged" } }, - "pre-commit": [ - "benchmarks" - ], "jest": { "collectCoverage": true, "collectCoverageFrom": [ @@ -162,7 +158,6 @@ "lint-staged": "^10.1.2", "markdown-it": "^12.3.2", "prettier": "2.0.2", - "pre-commit": "1.2.2", "rimraf": "^3.0.2", "ts-jest": "^25.4.0", "ts-node": "^8.8.2", diff --git a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json index 15345d13f44..faa8774a6bc 100644 --- a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json +++ b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json @@ -23,73 +23,73 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 370.564803313502, - "high": 416.9018633511778 + "low": 418.5574936082805, + "high": 467.8758397210792 }, "differences": [ null, { "absolute": { - "low": 356.50797515446993, - "high": 402.84503551020987 + "low": 404.5068586127215, + "high": 453.8252053833049 }, "percentChange": { - "low": 2536.189889658131, - "high": 2865.8326054928357 + "low": 2878.920000977545, + "high": 3229.929060711528 } }, { "absolute": { - "low": -16.89545195466125, - "high": 30.602118616956812 + "low": -38.0130234418856, + "high": 36.393023443077716 }, "percentChange": { - "low": -4.372397008863526, - "high": 7.915269905434383 + "low": -8.552411740112492, + "high": 8.187568788003615 } }, { "absolute": { - "low": 356.50587112765055, - "high": 402.84293160369594 + "low": 404.4982083011005, + "high": 453.8165549615926 }, "percentChange": { - "low": 2535.795039617326, - "high": 2865.389093940907 + "low": 2877.087529446436, + "high": 3227.879837156517 } } ], "samples": [ - 405.40000000596046, - 390.80000001192093, - 383.80000001192093, - 380.80000001192093, - 385.89999997615814, - 385.90000000596046, - 379.40000000596046, - 371.5, - 372.69999998807907, - 362.09999999403954, - 372.19999998807907, - 360.59999999403954, - 385.40000000596046, - 392.80000001192093, - 384.60000002384186, - 387, - 382.80000001192093, - 385.80000001192093, - 386.09999999403954, - 384.7999999821186, - 385.19999998807907, - 377, - 390.90000000596046, - 380.59999999403954, - 383.59999999403954, - 381.2000000178814, - 378.39999997615814, - 382.59999999403954, - 393.19999998807907, - 718.8999999761581 + 393.5, + 402.69999998807907, + 402.7000000178814, + 394.09999999403954, + 408.40000000596046, + 395.09999999403954, + 400.7000000178814, + 538.6999999880791, + 404, + 392.59999999403954, + 438.80000001192093, + 464.2000000178814, + 508.19999998807907, + 434.59999999403954, + 426.2999999821186, + 395.89999997615814, + 426, + 551.7000000178814, + 455.80000001192093, + 455, + 550.5, + 432.7999999821186, + 612.0999999940395, + 405.5, + 411.59999999403954, + 392.19999998807907, + 401, + 393.5, + 612, + 396.2999999821186 ] }, { @@ -115,79 +115,79 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 14.054113395472584, - "high": 14.059542604527419 + "low": 14.046607207674546, + "high": 14.054662125658789 }, "differences": [ { "absolute": { - "low": -402.84503551020987, - "high": -356.50797515446993 + "low": -453.8252053833049, + "high": -404.5068586127215 }, "percentChange": { - "low": -96.63994037137053, - "high": -96.21978126762264 + "low": -97.00622913543458, + "high": -96.65347018390675 } }, null, { "absolute": { - "low": -378.04083687034046, - "high": -367.6055071320438 + "low": -457.8326318196642, + "high": -402.11943217517006 }, "percentChange": { - "low": -96.41562476769997, - "high": -96.31761137789728 + "low": -97.03415553009407, + "high": -96.63710985933523 } }, { "absolute": { - "low": -0.006290308398531512, - "high": 0.002082375065201707 + "low": -0.014102530828603747, + "high": -0.003198202504725076 }, "percentChange": { - "low": -0.04473985189299422, - "high": 0.014809176196528101 + "low": -0.10029675715130996, + "high": -0.022758812831874104 } } ], "samples": [ - 14.062232, - 14.064435, - 14.061183, - 14.039703, - 14.062387, - 14.048535, - 14.064443, - 14.035703, - 14.0557, - 14.055446, - 14.06066, - 14.046698, - 14.069236, - 14.064658, - 14.055977, - 14.061584, - 14.056867, - 14.055072, - 14.058109, - 14.054494, - 14.055243, - 14.063016, - 14.051489, - 14.049735, - 14.055955, - 14.057813, - 14.060544, - 14.060087, - 14.060599, - 14.057237 + 14.054687, + 14.066721, + 14.061316, + 14.037834, + 14.038739, + 14.043633, + 14.060127, + 14.039792, + 14.059118, + 14.039964, + 14.054077, + 14.060214, + 14.043143, + 14.05679, + 14.042428, + 14.061754, + 14.034361, + 14.045844, + 14.043341, + 14.026835, + 14.037937, + 14.059991, + 14.058622, + 14.055476, + 14.066783, + 14.053226, + 14.049112, + 14.068376, + 14.0523, + 14.046499 ] }, { "name": "test-update10th [update10th]", "bytesSent": 119552, - "version": "latest", + "version": "1.10.1", "measurement": { "name": "update10th", "mode": "performance", @@ -207,79 +207,79 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 381.6623358382101, - "high": 392.09766416417415 + "low": 416.17006713297826, + "high": 471.8832661951893 }, "differences": [ { "absolute": { - "low": -30.602118616956812, - "high": 16.89545195466125 + "low": -36.393023443077716, + "high": 38.0130234418856 }, "percentChange": { - "low": -7.672418157993271, - "high": 4.191212605420427 + "low": -8.217856487110584, + "high": 8.58336620744642 } }, { "absolute": { - "low": 367.6055071320438, - "high": 378.04083687034046 + "low": 402.11943217517006, + "high": 457.8326318196642 }, "percentChange": { - "low": 2615.1346018493923, - "high": 2689.3789342227874 + "low": 2861.928669063402, + "high": 3258.4501209065666 } }, null, { "absolute": { - "low": 367.60340289827474, - "high": 378.0387331707762 + "low": 402.1107818572308, + "high": 457.82398140427017 }, "percentChange": { - "low": 2614.72683538658, - "high": 2688.962931638024 + "low": 2860.106608202675, + "high": 3256.383392694746 } } ], "samples": [ - 396.90000000596046, - 389.30000001192093, - 383.90000000596046, - 392.5, - 386.09999999403954, - 399.90000000596046, - 369.2999999821186, - 374.69999998807907, - 368.40000000596046, - 371.7999999821186, - 372, - 376.60000002384186, - 382.5, - 383.30000001192093, - 384.40000000596046, - 389.5, - 382.7999999821186, - 386.60000002384186, - 396.59999999403954, - 391.40000000596046, - 383.80000001192093, - 382.40000000596046, - 385.7000000178814, - 384, - 386.39999997615814, - 381.09999999403954, - 380.59999999403954, - 391, - 409.80000001192093, - 443.09999999403954 + 398, + 387.09999999403954, + 390.09999999403954, + 387.5, + 389.40000000596046, + 393.5, + 477.59999999403954, + 454.09999999403954, + 411.69999998807907, + 398.5, + 471.59999999403954, + 406.59999999403954, + 444.69999998807907, + 453.40000000596046, + 470.19999998807907, + 437.60000002384186, + 742.4000000059605, + 490, + 449.90000000596046, + 597.5999999940395, + 498, + 527.1999999880791, + 398.19999998807907, + 398.59999999403954, + 424.09999999403954, + 397.09999999403954, + 401.59999999403954, + 413.59999999403954, + 402.40000000596046, + 408.5 ] }, { "name": "test-update10th [usedJSHeapSize]", "bytesSent": 119552, - "version": "latest", + "version": "1.10.1", "measurement": { "name": "usedJSHeapSize", "mode": "expression", @@ -299,73 +299,73 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 14.055745059175745, - "high": 14.062118874157587 + "low": 14.055610027467281, + "high": 14.062960039199382 }, "differences": [ { "absolute": { - "low": -402.84293160369594, - "high": -356.50587112765055 + "low": -453.8165549615926, + "high": -404.4982083011005 }, "percentChange": { - "low": -96.63943787935165, - "high": -96.21921503292292 + "low": -97.0043856060924, + "high": -96.65141026497308 } }, { "absolute": { - "low": -0.002082375065201707, - "high": 0.006290308398531512 + "low": 0.003198202504725076, + "high": 0.014102530828603747 }, "percentChange": { - "low": -0.014815849962083289, - "high": 0.044751005555719384 + "low": 0.02274894137609521, + "high": 0.10038238858704586 } }, { "absolute": { - "low": -378.0387331707762, - "high": -367.60340289827474 + "low": -457.82398140427017, + "high": -402.1107818572308 }, "percentChange": { - "low": -96.41509017169064, - "high": -96.3170583153734 + "low": -97.03232923909158, + "high": -96.63503982278979 } }, null ], "samples": [ + 14.067407, + 14.068533, + 14.064939, + 14.072032, + 14.052961, + 14.041445, + 14.048059, + 14.069951, + 14.059963, + 14.060732, + 14.061753, + 14.0451, + 14.039854, + 14.044865, + 14.058013, + 14.063448, + 14.068704, + 14.047315, + 14.069702, + 14.047309, + 14.061824, + 14.06535, 14.05915, - 14.062914, - 14.039158, - 14.049913, - 14.063757, - 14.057377, - 14.065905, - 14.071427, - 14.040394, - 14.052283, - 14.054396, - 14.062922, - 14.062338, - 14.067728, - 14.048758, - 14.059535, - 14.059222, - 14.052059, - 14.068834, - 14.063647, - 14.069367, - 14.06405, - 14.060823, - 14.048379, - 14.066464, - 14.066619, - 14.063978, - 14.063835, - 14.057647, - 14.04508 + 14.045282, + 14.065971, + 14.070905, + 14.06687, + 14.062969, + 14.060151, + 14.067994 ] } ] diff --git a/yarn.lock b/yarn.lock index 9e9182ae512..efc4ba67179 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8865,7 +8865,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.4.7, concat-stream@^1.5.0: +concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -9343,15 +9343,6 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, c shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -17103,14 +17094,6 @@ lowlight@^1.14.0: fault "^1.0.0" highlight.js "~10.6.0" -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -19147,11 +19130,6 @@ os-name@^3.1.0: macos-release "^2.2.0" windows-release "^3.1.0" -os-shim@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" - integrity sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc= - os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -20723,15 +20701,6 @@ postcss@^8.4.6, postcss@^8.4.7: picocolors "^1.0.0" source-map-js "^1.0.2" -pre-commit@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" - integrity sha1-287g7p3nI15X95xW186UZBpp7sY= - dependencies: - cross-spawn "^5.0.1" - spawn-sync "^1.0.15" - which "1.2.x" - prebuild-install@^6.1.2: version "6.1.4" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" @@ -21033,11 +21002,6 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -23445,14 +23409,6 @@ spawn-command@^0.0.2-1: resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= -spawn-sync@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" - integrity sha1-sAeZVX63+wyDdsKdROih6mfldHY= - dependencies: - concat-stream "^1.4.7" - os-shim "^0.1.2" - spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -26132,13 +26088,6 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= -which@1.2.x: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" - integrity sha1-mofEN48D6CfOyvGs31bHNsAcFOU= - dependencies: - isexe "^2.0.0" - which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -26549,11 +26498,6 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" From 8c15a0acf7b0e9a9aedc3bde6d749919b88aec29 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Tue, 17 May 2022 15:41:48 -0700 Subject: [PATCH 10/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index dc8dab3ba7f..b4b8ad16abe 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -33,9 +33,12 @@ jobs: run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - name: Prepare workspaces run: yarn prepare + - uses: actions/download-artifact@v2 + with: + name: Get results folder + path: packages/utilities/fast-benchmarks/results - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 with: - report-id: fast-element-test name: results path: packages/utilities/fast-benchmarks/results/*.json From 9ab1a7c6086fdba03a8fc99b6ec187a1b4ef6ce6 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Tue, 17 May 2022 15:54:57 -0700 Subject: [PATCH 11/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index b4b8ad16abe..d9173709c3b 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: Get results folder - path: packages/utilities/fast-benchmarks/results + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 with: From 112ac0714e735c3144c0e38664e7c41802b45b22 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 16:10:50 -0700 Subject: [PATCH 12/49] upload artifact instead of download --- .github/workflows/ci-benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index d9173709c3b..bef180fdd54 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -33,9 +33,9 @@ jobs: run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - name: Prepare workspaces run: yarn prepare - - uses: actions/download-artifact@v2 + - uses: actions/upload-artifact@v3 with: - name: Get results folder + name: Upload results folder path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 From 48117aa7c76a18a2218a1e203b90cbc1b37088a8 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Tue, 17 May 2022 16:18:50 -0700 Subject: [PATCH 13/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index bef180fdd54..762bc426d4e 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -40,5 +40,5 @@ jobs: - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 with: - name: results - path: packages/utilities/fast-benchmarks/results/*.json + report-id: results + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json From fad4a7df17b6939f69fe98dddb130910b61daf43 Mon Sep 17 00:00:00 2001 From: Wendy Date: Tue, 17 May 2022 16:38:49 -0700 Subject: [PATCH 14/49] add local results --- .github/workflows/ci-benchmarks.yml | 11 + .../utilities/fast-benchmarks/package.json | 2 +- .../fast-element_localTest-create10k.json | 372 ++++++++++++++++++ 3 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 762bc426d4e..bbc8a34584f 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -33,6 +33,7 @@ jobs: run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - name: Prepare workspaces run: yarn prepare + - uses: actions/upload-artifact@v3 with: name: Upload results folder @@ -42,3 +43,13 @@ jobs: with: report-id: results path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + + - uses: actions/upload-artifact@v3 + with: + name: Upload results folder + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json + - name: Report Tachometer Result + uses: andrewiggins/tachometer-reporter-action@v2 + with: + report-id: results-create-local + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 5da2462800a..16fd01cef37 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -15,7 +15,7 @@ "author": "Microsoft", "license": "ISC", "dependencies": { - "@microsoft/fast-element": "1.10.1", + "@microsoft/fast-element": "file:../../web-components/fast-element", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json new file mode 100644 index 00000000000..5e4c597d146 --- /dev/null +++ b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json @@ -0,0 +1,372 @@ +{ + "benchmarks": [ + { + "name": "localTest-create10k [create10k]", + "bytesSent": 124203, + "version": "local", + "measurement": { + "name": "create10k", + "mode": "performance", + "entryName": "create10k" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 686.0708454090732, + "high": 722.909154592119 + }, + "differences": [ + null, + { + "absolute": { + "low": 672.9369927290196, + "high": 709.7753753388391 + }, + "percentChange": { + "low": 5122.895744836445, + "high": 5404.984130876386 + } + }, + { + "absolute": { + "low": 1.203214651703064, + "high": 51.10345201257954 + }, + "percentChange": { + "low": 0.11218675271706044, + "high": 7.598831865984282 + } + }, + { + "absolute": { + "low": 672.0261584086642, + "high": 708.8644684591947 + }, + "percentChange": { + "low": 4784.906123405382, + "high": 5047.215229485703 + } + } + ], + "samples": [ + 850.6999999880791, + 803.4000000059605, + 753, + 694.0999999940395, + 766.2000000178814, + 759.4000000059605, + 743.2000000178814, + 807.7999999821186, + 690.1999999880791, + 660.2000000178814, + 683.5999999940395, + 674.2000000178814, + 686.9000000059605, + 688.6999999880791, + 671.4000000059605, + 668.8000000119209, + 668.5, + 703.9000000059605, + 724.0999999940395, + 685.5, + 661.4000000059605, + 682.1999999880791, + 687.4000000059605, + 670.5, + 666.5999999940395, + 690.5, + 674, + 676.0999999940395, + 665.5999999940395, + 676.5999999940395 + ] + }, + { + "name": "localTest-create10k [usedJSHeapSize]", + "bytesSent": 124203, + "version": "local", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 13.09704015337759, + "high": 13.170591779955744 + }, + "differences": [ + { + "absolute": { + "low": -709.7753753388391, + "high": -672.9369927290196 + }, + "percentChange": { + "low": -98.18472032766155, + "high": -98.08667714663744 + } + }, + null, + { + "absolute": { + "low": -682.0327205397273, + "high": -648.3729808638489 + }, + "percentChange": { + "low": -98.11216285447465, + "high": -98.01547800233725 + } + }, + { + "absolute": { + "low": -0.9478630151298765, + "high": -0.8738781848701181 + }, + "percentChange": { + "low": -6.748715223005029, + "high": -6.222319704350866 + } + } + ], + "samples": [ + 13.118835, + 13.128293, + 13.107615, + 13.11414, + 13.112682, + 13.113882, + 13.110876, + 13.11583, + 13.14489, + 13.11321, + 13.090687, + 13.145216, + 13.117054, + 13.09704, + 13.129447, + 13.118197, + 13.13322, + 13.099888, + 13.132015, + 13.108301, + 13.113091, + 13.650585, + 13.120183, + 13.100044, + 13.11917, + 13.092217, + 13.111349, + 13.120223, + 13.111074, + 13.125225 + ] + }, + { + "name": "localTest-create10k [create10k]", + "bytesSent": 119454, + "version": "1.10.1", + "measurement": { + "name": "create10k", + "mode": "performance", + "entryName": "create10k" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 661.506837010923, + "high": 695.1664963259865 + }, + "differences": [ + { + "absolute": { + "low": -51.10345201257954, + "high": -1.203214651703064 + }, + "percentChange": { + "low": -7.182927149693794, + "high": -0.24182929315682902 + } + }, + { + "absolute": { + "low": 648.3729808638489, + "high": 682.0327205397273 + }, + "percentChange": { + "low": 4935.855500081641, + "high": 5193.764899504558 + } + }, + null, + { + "absolute": { + "low": 647.4621499695536, + "high": 681.1218102340226 + }, + "percentChange": { + "low": 4610.00706600888, + "high": 4849.683998630518 + } + } + ], + "samples": [ + 792.7000000178814, + 729.7000000178814, + 711.4000000059605, + 682.9000000059605, + 698.1000000238419, + 792.5, + 773.4000000059605, + 731.3000000119209, + 653.4000000059605, + 646.7999999821186, + 652.3000000119209, + 647, + 648.5, + 650.5999999940395, + 655.0999999940395, + 658, + 712.8000000119209, + 650.0999999940395, + 663.9000000059605, + 646.3000000119209, + 664.4000000059605, + 662.5, + 655, + 643.5999999940395, + 649.1999999880791, + 652.1999999880791, + 694.1999999880791, + 643.1999999880791, + 654.5, + 634.5 + ] + }, + { + "name": "localTest-create10k [usedJSHeapSize]", + "bytesSent": 119454, + "version": "1.10.1", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.040689275825581, + "high": 14.048683857507747 + }, + "differences": [ + { + "absolute": { + "low": -708.8644684591947, + "high": -672.0261584086642 + }, + "percentChange": { + "low": -98.05853011025253, + "high": -97.95427729179582 + } + }, + { + "absolute": { + "low": 0.8738781848701181, + "high": 0.9478630151298765 + }, + "percentChange": { + "low": 6.634337228429958, + "high": 7.23627893235327 + } + }, + { + "absolute": { + "low": -681.1218102340226, + "high": -647.4621499695536 + }, + "percentChange": { + "low": -97.98091279877696, + "high": -97.87816802147563 + } + }, + null + ], + "samples": [ + 14.008827, + 14.037812, + 14.033684, + 14.031134, + 14.048527, + 14.055861, + 14.051452, + 14.032812, + 14.050182, + 14.048286, + 14.053466, + 14.049177, + 14.053242, + 14.050347, + 14.04946, + 14.053048, + 14.049671, + 14.048801, + 14.054006, + 14.054102, + 14.031999, + 14.033008, + 14.047551, + 14.049642, + 14.051624, + 14.051492, + 14.031452, + 14.047082, + 14.032027, + 14.050823 + ] + } + ] +} From d66b394dc8f11f3fc81234a60dee11655655130d Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 10:54:19 -0700 Subject: [PATCH 15/49] report local build res --- .github/workflows/ci-benchmarks.yml | 46 +++++++++++++++++++---------- yarn.lock | 6 ++-- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index bbc8a34584f..ea9dd5fad40 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -34,22 +34,36 @@ jobs: - name: Prepare workspaces run: yarn prepare - - uses: actions/upload-artifact@v3 - with: - name: Upload results folder - path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - - name: Report Tachometer Result - uses: andrewiggins/tachometer-reporter-action@v2 - with: - report-id: results - path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + - name: Benchmark local create10k + run: | + cd packages/utilities/fast-benchmarks + npx tachometer \ + --config dist/fast-element_localTest-create10k.config.json \ + --json-file results/fast-element_localTest-create10k.config.json - - uses: actions/upload-artifact@v3 - with: - name: Upload results folder - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - - name: Report Tachometer Result + - name: Report localTest-create10k uses: andrewiggins/tachometer-reporter-action@v2 with: - report-id: results-create-local - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json + report-id: localTest-create10k + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.config.json + pr-bench-name: users/wendy/local-build-actions + base-bench-name: master + # - uses: actions/upload-artifact@v3 + # with: + # name: Upload results folder + # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + # - name: Report Tachometer Result + # uses: andrewiggins/tachometer-reporter-action@v2 + # with: + # report-id: results + # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + + # - uses: actions/upload-artifact@v3 + # with: + # name: Upload results folder + # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json + # - name: Report Tachometer Result + # uses: andrewiggins/tachometer-reporter-action@v2 + # with: + # report-id: results-create-local + # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json diff --git a/yarn.lock b/yarn.lock index efc4ba67179..bb3c067d7fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,10 +3633,8 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" -"@microsoft/fast-element@1.10.1": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@microsoft/fast-element/-/fast-element-1.10.1.tgz#2ca442a4a8d15f3fd796795a370e3a1bc9bd2738" - integrity sha512-cq+vBBa8JCuAhsFEwHM9386YolYu9pNb1sBodp69RqWuaU56ElC60dC3aQWuOKqAMNoQqtCHPh0RQTvVBegSyw== +"@microsoft/fast-element@file:packages/web-components/fast-element": + version "1.9.0" "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" From d2cf729b852100186f673d8e2e7a5e5acf800036 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 11:03:09 -0700 Subject: [PATCH 16/49] use benchmark script --- .github/workflows/ci-benchmarks.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index ea9dd5fad40..e2e1ef84689 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -37,9 +37,7 @@ jobs: - name: Benchmark local create10k run: | cd packages/utilities/fast-benchmarks - npx tachometer \ - --config dist/fast-element_localTest-create10k.config.json \ - --json-file results/fast-element_localTest-create10k.config.json + yarn run benchmark:fast-element:test:local - name: Report localTest-create10k uses: andrewiggins/tachometer-reporter-action@v2 From 8c4a3f0e816bdcbeff50afe84310cf46ff941ff4 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 11:13:20 -0700 Subject: [PATCH 17/49] git res path --- .github/workflows/ci-benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index e2e1ef84689..9a981e3e8f3 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -43,7 +43,7 @@ jobs: uses: andrewiggins/tachometer-reporter-action@v2 with: report-id: localTest-create10k - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.config.json + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json pr-bench-name: users/wendy/local-build-actions base-bench-name: master # - uses: actions/upload-artifact@v3 @@ -64,4 +64,4 @@ jobs: # uses: andrewiggins/tachometer-reporter-action@v2 # with: # report-id: results-create-local - # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json + # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json \ No newline at end of file From ea6867ee852eae707e567170338bbdc637c45970 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 11:47:08 -0700 Subject: [PATCH 18/49] get rid of pr-bench-name --- .github/workflows/ci-benchmarks.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 9a981e3e8f3..3913c3cabaf 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -44,8 +44,7 @@ jobs: with: report-id: localTest-create10k path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - pr-bench-name: users/wendy/local-build-actions - base-bench-name: master + # - uses: actions/upload-artifact@v3 # with: # name: Upload results folder From bee4daab9fb5f1f559792eab05b9b773acdc3d58 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 14:18:50 -0700 Subject: [PATCH 19/49] add fozen lockfile to setupCommand --- packages/utilities/fast-benchmarks/scripts/template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index da5d669f70e..7ffb4b8692b 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -225,7 +225,7 @@ async function generateBenchmarks( ref, subdir: `packages/web-components/${library}`, setupCommands: [ - "yarn install", + "yarn install --frozen-lockfile", `yarn --cwd ./packages/web-components/${library} build`, ], }, From ec0beb36a4fa9337f0d49e87653aaa2c6ede3481 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 14:20:30 -0700 Subject: [PATCH 20/49] add some logs --- packages/utilities/fast-benchmarks/scripts/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/utilities/fast-benchmarks/scripts/index.js b/packages/utilities/fast-benchmarks/scripts/index.js index 2ffa78fa66b..cd0871744d6 100644 --- a/packages/utilities/fast-benchmarks/scripts/index.js +++ b/packages/utilities/fast-benchmarks/scripts/index.js @@ -115,13 +115,18 @@ async function runBenchmark(configPaths, pathNames) { const run = async () => { try { + console.log("RUNNIN "); await checkNpmRegistryIsAvailable(); const { tsConfigPath, tachoConfigPaths, pathNames } = await generateTemplates( options ); await buildBenchmark(tsConfigPath); + console.log("RUNNIN 1 >>>>>>>>>"); + await runBenchmark(tachoConfigPaths, pathNames); + console.log("RUNNIN 2 >>>>>>>>>"); } catch (error) { + console.error("ERRROR", error); return error; } }; From 4db6779b325e15cf67160e0e6765352d79e7f410 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 14:47:43 -0700 Subject: [PATCH 21/49] remove cache steps --- .github/workflows/ci-benchmarks.yml | 34 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 3913c3cabaf..dc738aed8f0 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -12,28 +12,30 @@ jobs: with: initialize: true - uses: actions/checkout@v2 + + - uses: actions/setup-node@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- + node-version: 16 + cache: 'npm' + - name: Install package dependencies run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - name: Prepare workspaces run: yarn prepare + #version test + - name: Benchmark versions update10th + run: | + cd packages/utilities/fast-benchmarks + yarn run benchmark:fast-element:test + + - name: Report update10th + uses: andrewiggins/tachometer-reporter-action@v2 + with: + report-id: update10th + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + + #local test - name: Benchmark local create10k run: | cd packages/utilities/fast-benchmarks From be0f927e3c4eae533d530f36a24c7927f60cbc15 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:09:47 -0700 Subject: [PATCH 22/49] redo --- .github/workflows/ci-benchmarks.yml | 119 ++++++++++++++++++---------- 1 file changed, 77 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index dc738aed8f0..1d9477ee9f0 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -1,6 +1,15 @@ name: Fast Element benchmark jobs -on: [pull_request] +on: + pull_request: + branches: + - master + - releases/* + - features/* + - users/* + push: + paths: + - 'packages/web-components/fast-element/**' jobs: setup: @@ -12,57 +21,83 @@ jobs: with: initialize: true - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 with: - node-version: 16 - cache: 'npm' - + 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 - #version test - - name: Benchmark versions update10th + test: + name: Run all operations for test 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 + - name: Run tachometer run: | - cd packages/utilities/fast-benchmarks - yarn run benchmark:fast-element:test + cd packages/utilities/fast-benchmarks + yarn install + yarn run benchmark:fast-element:test - - name: Report update10th - uses: andrewiggins/tachometer-reporter-action@v2 + - name: Upload results + uses: actions/upload-artifact@v2 with: - report-id: update10th - path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_test.json - #local test - - name: Benchmark local create10k - run: | - cd packages/utilities/fast-benchmarks - yarn run benchmark:fast-element:test:local + # 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 + + # - name: Upload results + # uses: actions/upload-artifact@v2 + # with: + # name: results + # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - - name: Report localTest-create10k + report_results: + name: Report Results + needs: [test, update10th] + runs-on: ubuntu-latest + steps: + - 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: - report-id: localTest-create10k - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - - # - uses: actions/upload-artifact@v3 - # with: - # name: Upload results folder - # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - # - name: Report Tachometer Result - # uses: andrewiggins/tachometer-reporter-action@v2 - # with: - # report-id: results - # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - - # - uses: actions/upload-artifact@v3 - # with: - # name: Upload results folder - # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - # - name: Report Tachometer Result - # uses: andrewiggins/tachometer-reporter-action@v2 - # with: - # report-id: results-create-local - # path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json \ No newline at end of file + name: results + path: packages/utilities/fast-benchmarks/results/*.json From 5bf39b171aee477bffebde98d70acbedbafa7977 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:13:08 -0700 Subject: [PATCH 23/49] add local --- .github/workflows/ci-benchmarks.yml | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 1d9477ee9f0..0295bf1f10e 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -43,7 +43,7 @@ jobs: - name: Prepare workspaces run: yarn prepare - test: + update10th: name: Run all operations for test benchmark needs: [setup] runs-on: ubuntu-latest @@ -63,32 +63,32 @@ jobs: uses: actions/upload-artifact@v2 with: name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test.json + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.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 + testLocal: + name: Run create10k 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:test:local - # - name: Upload results - # uses: actions/upload-artifact@v2 - # with: - # name: results - # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json report_results: name: Report Results - needs: [test, update10th] + needs: [testLocal, update10th] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v2 From 211dc3cecb6734e2268270b73597faf26b0a3a01 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:16:19 -0700 Subject: [PATCH 24/49] trigger on pr --- .github/workflows/ci-benchmarks.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 0295bf1f10e..9727296fd07 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -1,15 +1,6 @@ name: Fast Element benchmark jobs -on: - pull_request: - branches: - - master - - releases/* - - features/* - - users/* - push: - paths: - - 'packages/web-components/fast-element/**' +on: [pull_request] jobs: setup: From 2255c3bed1c1108f39bb665f89be4abdcebaaf1f Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:28:15 -0700 Subject: [PATCH 25/49] add post commit hook --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a5455a06592..c3ca045207f 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "scripts": { "bump": "beachball bump", + "benchmark": "cd packages/utilities/fast-benchmarks && yarn run benchmark:fast-element:test:local", "change": "beachball change", "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", "check": "beachball check ", @@ -63,7 +64,8 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged" + "pre-commit": "lint-staged", + "post-commit": "benchmark" } }, "jest": { From ef849aec28a367b3891c1217698726c3e9b9bc2a Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:31:01 -0700 Subject: [PATCH 26/49] pre-push --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3ca045207f..70df8d179ee 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "husky": { "hooks": { "pre-commit": "lint-staged", - "post-commit": "benchmark" + "pre-push": "benchmark" } }, "jest": { From be3eed3488b98dec0ac789e86d163fcbcbc3c5e7 Mon Sep 17 00:00:00 2001 From: Wendy Date: Wed, 18 May 2022 15:35:41 -0700 Subject: [PATCH 27/49] trigger hook --- .../fast-benchmarks/results/result.json | 148 ------------------ 1 file changed, 148 deletions(-) delete mode 100644 packages/utilities/fast-benchmarks/results/result.json diff --git a/packages/utilities/fast-benchmarks/results/result.json b/packages/utilities/fast-benchmarks/results/result.json deleted file mode 100644 index ae10e971ddf..00000000000 --- a/packages/utilities/fast-benchmarks/results/result.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "benchmarks": [ - { - "name": "my-benchmark-createDelete5x-memory", - "bytesSent": 2462, - "version": "1.8.0", - "measurement": { - "name": "usedJSHeapSize", - "mode": "expression", - "expression": "window.usedJSHeapSize" - }, - "browser": { - "name": "chrome", - "headless": true, - "windowSize": { - "width": 1024, - "height": 768 - }, - "addArguments": [ - "--js-flags=--expose-gc", - "--enable-precise-memory-info" - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" - }, - "mean": { - "low": 2.798855688350844, - "high": 2.8072279116491567 - }, - "differences": [ - null, - { - "absolute": { - "low": -0.006109477419492123, - "high": 0.006640144086160134 - }, - "percentChange": { - "low": -0.21799172212870524, - "high": 0.2369253286071103 - } - } - ], - "samples": [ - 2.808279, - 2.801631, - 2.802211, - 2.808047, - 2.810679, - 2.808827, - 2.804287, - 2.812383, - 2.781763, - 2.810795, - 2.789987, - 2.794883, - 2.811811, - 2.783375, - 2.777799, - 2.806811, - 2.808839, - 2.809983, - 2.812307, - 2.808351, - 2.779391, - 2.808427, - 2.812959, - 2.810375, - 2.811219, - 2.811399, - 2.797831, - 2.809859, - 2.811671, - 2.785075 - ] - }, - { - "name": "my-benchmark-createDelete5x-memory", - "bytesSent": 2462, - "version": "1.9.0", - "measurement": { - "name": "usedJSHeapSize", - "mode": "expression", - "expression": "window.usedJSHeapSize" - }, - "browser": { - "name": "chrome", - "headless": true, - "windowSize": { - "width": 1024, - "height": 768 - }, - "addArguments": [ - "--js-flags=--expose-gc", - "--enable-precise-memory-info" - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" - }, - "mean": { - "low": 2.7979686936484023, - "high": 2.8075842396849304 - }, - "differences": [ - { - "absolute": { - "low": -0.006640144086160134, - "high": 0.006109477419492123 - }, - "percentChange": { - "low": -0.23688137250091656, - "high": 0.2179495582601153 - } - }, - null - ], - "samples": [ - 2.809623, - 2.810455, - 2.811059, - 2.810767, - 2.805663, - 2.775991, - 2.811427, - 2.812123, - 2.778291, - 2.812443, - 2.792823, - 2.775027, - 2.811891, - 2.811607, - 2.810131, - 2.810563, - 2.809639, - 2.809727, - 2.811411, - 2.805347, - 2.810707, - 2.805539, - 2.785347, - 2.783935, - 2.776715, - 2.811763, - 2.812499, - 2.807943, - 2.796287, - 2.806551 - ] - } - ] -} From 0e7b605a419b64ea3646b55d1b180400fa9e3abf Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Wed, 18 May 2022 15:39:02 -0700 Subject: [PATCH 28/49] test hook --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 70df8d179ee..4ce15d3e370 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,7 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged", - "pre-push": "benchmark" + "pre-commit": "npm run benchmark" } }, "jest": { From 02083ade177e83998be8c82a7af6b869342bc256 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 09:44:16 -0700 Subject: [PATCH 29/49] test with versioned workspace --- .github/workflows/ci-benchmarks.yml | 28 +- .../utilities/fast-benchmarks/package.json | 2 +- .../fast-element_localTest-create10k.json | 364 +++++++++--------- .../web-components/fast-element/package.json | 176 ++++----- yarn.lock | 3 - 5 files changed, 273 insertions(+), 300 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 9727296fd07..a52e5d405ff 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -34,28 +34,6 @@ jobs: - name: Prepare workspaces run: yarn prepare - update10th: - name: Run all operations for test 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 - - name: Run tachometer - run: | - cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark:fast-element:test - - - name: Upload results - uses: actions/upload-artifact@v2 - with: - name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json - testLocal: name: Run create10k element benchmark needs: [setup] @@ -68,18 +46,16 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark:fast-element:test:local + yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k - name: Upload results uses: actions/upload-artifact@v2 with: name: results path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - report_results: name: Report Results - needs: [testLocal, update10th] + needs: [testLocal] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v2 diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 16fd01cef37..c84c9affa58 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -15,7 +15,7 @@ "author": "Microsoft", "license": "ISC", "dependencies": { - "@microsoft/fast-element": "file:../../web-components/fast-element", + "@microsoft/fast-element": "1.9.1", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json index 5e4c597d146..3dc267d1eb0 100644 --- a/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json +++ b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json @@ -2,7 +2,7 @@ "benchmarks": [ { "name": "localTest-create10k [create10k]", - "bytesSent": 124203, + "bytesSent": 124156, "version": "local", "measurement": { "name": "create10k", @@ -23,78 +23,78 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 686.0708454090732, - "high": 722.909154592119 + "low": 656.2061180565081, + "high": 665.9272152887461 }, "differences": [ null, { "absolute": { - "low": 672.9369927290196, - "high": 709.7753753388391 + "low": 642.1506750083594, + "high": 651.8717786702281 }, "percentChange": { - "low": 5122.895744836445, - "high": 5404.984130876386 + "low": 4568.648008087548, + "high": 4637.911651537858 } }, { "absolute": { - "low": 1.203214651703064, - "high": 51.10345201257954 + "low": -5.490759052563835, + "high": 36.484092396228576 }, "percentChange": { - "low": 0.11218675271706044, - "high": 7.598831865984282 + "low": -0.9244285146995573, + "high": 5.725353796795471 } }, { "absolute": { - "low": 672.0261584086642, - "high": 708.8644684591947 + "low": 642.1655132091593, + "high": 651.8866148694282 }, "percentChange": { - "low": 4784.906123405382, - "high": 5047.215229485703 + "low": 4573.597207488145, + "high": 4642.902695489103 } } ], "samples": [ - 850.6999999880791, - 803.4000000059605, - 753, - 694.0999999940395, - 766.2000000178814, - 759.4000000059605, - 743.2000000178814, - 807.7999999821186, - 690.1999999880791, - 660.2000000178814, - 683.5999999940395, - 674.2000000178814, - 686.9000000059605, - 688.6999999880791, - 671.4000000059605, - 668.8000000119209, - 668.5, - 703.9000000059605, - 724.0999999940395, - 685.5, - 661.4000000059605, - 682.1999999880791, - 687.4000000059605, - 670.5, - 666.5999999940395, - 690.5, - 674, - 676.0999999940395, - 665.5999999940395, - 676.5999999940395 + 681, + 649.8000000119209, + 679.1999999880791, + 665.5, + 654.6000000238419, + 660.8000000119209, + 678, + 668.0999999642372, + 655.1999999880791, + 683.1999999880791, + 688.1000000238419, + 656.3000000119209, + 654.1000000238419, + 675.6000000238419, + 663.1000000238419, + 647.8999999761581, + 654.8000000119209, + 661.8000000119209, + 642.8999999761581, + 656.0999999642372, + 654.5, + 643.7000000476837, + 651.1000000238419, + 673.9000000357628, + 665.6000000238419, + 646.6999999880791, + 675.1000000238419, + 647.5, + 653.4000000357628, + 644.3999999761581 ] }, { "name": "localTest-create10k [usedJSHeapSize]", - "bytesSent": 124203, + "bytesSent": 124156, "version": "local", "measurement": { "name": "usedJSHeapSize", @@ -115,79 +115,79 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 13.09704015337759, - "high": 13.170591779955744 + "low": 14.049849525352856, + "high": 14.061030141313816 }, "differences": [ { "absolute": { - "low": -709.7753753388391, - "high": -672.9369927290196 + "low": -651.8717786702281, + "high": -642.1506750083594 }, "percentChange": { - "low": -98.18472032766155, - "high": -98.08667714663744 + "low": -97.8894798914553, + "high": -97.85816840426678 } }, null, { "absolute": { - "low": -682.0327205397273, - "high": -648.3729808638489 + "low": -651.9313948128939, + "high": -611.0977255220288 }, "percentChange": { - "low": -98.11216285447465, - "high": -98.01547800233725 + "low": -97.89164822784461, + "high": -97.75392395385029 } }, { "absolute": { - "low": -0.9478630151298765, - "high": -0.8738781848701181 + "low": 0.007572614132296841, + "high": 0.022101785867711363 }, "percentChange": { - "low": -6.748715223005029, - "high": -6.222319704350866 + "low": 0.05391137816005071, + "high": 0.1574356756306405 } } ], "samples": [ - 13.118835, - 13.128293, - 13.107615, - 13.11414, - 13.112682, - 13.113882, - 13.110876, - 13.11583, - 13.14489, - 13.11321, - 13.090687, - 13.145216, - 13.117054, - 13.09704, - 13.129447, - 13.118197, - 13.13322, - 13.099888, - 13.132015, - 13.108301, - 13.113091, - 13.650585, - 13.120183, - 13.100044, - 13.11917, - 13.092217, - 13.111349, - 13.120223, - 13.111074, - 13.125225 + 14.042323, + 14.066664, + 14.063874, + 14.035961, + 14.026999, + 14.046914, + 14.067111, + 14.074182, + 14.037626, + 14.039938, + 14.027129, + 14.063121, + 14.062894, + 14.027526, + 14.059491, + 14.050642, + 14.069321, + 14.066356, + 14.049903, + 14.07867, + 14.047201, + 14.068638, + 14.061324, + 14.059864, + 14.070647, + 14.064498, + 14.043131, + 14.05132, + 14.067982, + 14.071945 ] }, { "name": "localTest-create10k [create10k]", - "bytesSent": 119454, - "version": "1.10.1", + "bytesSent": 119298, + "version": "1.8.0", "measurement": { "name": "create10k", "mode": "performance", @@ -207,79 +207,79 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 661.506837010923, - "high": 695.1664963259865 + "low": 625.1531661206998, + "high": 665.9868338808897 }, "differences": [ { "absolute": { - "low": -51.10345201257954, - "high": -1.203214651703064 + "low": -36.484092396228576, + "high": 5.490759052563835 }, "percentChange": { - "low": -7.182927149693794, - "high": -0.24182929315682902 + "low": -5.515025855381156, + "high": 0.8266434415975789 } }, { "absolute": { - "low": 648.3729808638489, - "high": 682.0327205397273 + "low": 611.0977255220288, + "high": 651.9313948128939 }, "percentChange": { - "low": 4935.855500081641, - "high": 5193.764899504558 + "low": 4347.755168459803, + "high": 4638.296746753635 } }, null, { "absolute": { - "low": 647.4621499695536, - "high": 681.1218102340226 + "low": 611.1125629602851, + "high": 651.9462317746376 }, "percentChange": { - "low": 4610.00706600888, - "high": 4849.683998630518 + "low": 4352.458831010695, + "high": 4643.300309243986 } } ], "samples": [ - 792.7000000178814, - 729.7000000178814, - 711.4000000059605, - 682.9000000059605, - 698.1000000238419, - 792.5, - 773.4000000059605, - 731.3000000119209, - 653.4000000059605, - 646.7999999821186, - 652.3000000119209, - 647, - 648.5, - 650.5999999940395, - 655.0999999940395, - 658, - 712.8000000119209, - 650.0999999940395, - 663.9000000059605, - 646.3000000119209, - 664.4000000059605, - 662.5, - 655, - 643.5999999940395, - 649.1999999880791, - 652.1999999880791, - 694.1999999880791, - 643.1999999880791, - 654.5, - 634.5 + 663.6999999880791, + 634.5, + 636.0999999642372, + 635, + 631.8000000119209, + 628.1999999880791, + 641.5, + 636.8999999761581, + 633.5, + 629.0999999642372, + 650, + 634.5, + 631.5, + 634.1999999880791, + 636.8999999761581, + 618.1000000238419, + 626.7999999523163, + 628.1000000238419, + 647.3000000119209, + 628.2000000476837, + 842.9000000357628, + 611.3000000119209, + 630.1000000238419, + 623.3999999761581, + 619.5, + 629.6000000238419, + 650.5, + 840.3999999761581, + 608.8000000119209, + 604.7000000476837 ] }, { "name": "localTest-create10k [usedJSHeapSize]", - "bytesSent": 119454, - "version": "1.10.1", + "bytesSent": 119298, + "version": "1.8.0", "measurement": { "name": "usedJSHeapSize", "mode": "expression", @@ -299,73 +299,73 @@ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" }, "mean": { - "low": 14.040689275825581, - "high": 14.048683857507747 + "low": 14.035963380752078, + "high": 14.045241885914587 }, "differences": [ { "absolute": { - "low": -708.8644684591947, - "high": -672.0261584086642 + "low": -651.8866148694282, + "high": -642.1655132091593 }, "percentChange": { - "low": -98.05853011025253, - "high": -97.95427729179582 + "low": -97.89170072733121, + "high": -97.86043643486924 } }, { "absolute": { - "low": 0.8738781848701181, - "high": 0.9478630151298765 + "low": -0.022101785867711363, + "high": -0.007572614132296841 }, "percentChange": { - "low": 6.634337228429958, - "high": 7.23627893235327 + "low": -0.1572148999541157, + "high": -0.05390905171073043 } }, { "absolute": { - "low": -681.1218102340226, - "high": -647.4621499695536 + "low": -651.9462317746376, + "high": -611.1125629602851 }, "percentChange": { - "low": -97.98091279877696, - "high": -97.87816802147563 + "low": -97.89387216033809, + "high": -97.75629664139802 } }, null ], "samples": [ - 14.008827, - 14.037812, - 14.033684, - 14.031134, - 14.048527, - 14.055861, - 14.051452, - 14.032812, - 14.050182, - 14.048286, - 14.053466, - 14.049177, - 14.053242, - 14.050347, - 14.04946, - 14.053048, - 14.049671, - 14.048801, - 14.054006, - 14.054102, - 14.031999, - 14.033008, - 14.047551, - 14.049642, - 14.051624, - 14.051492, - 14.031452, - 14.047082, - 14.032027, - 14.050823 + 14.029456, + 14.012073, + 14.050417, + 14.03265, + 14.032775, + 14.031108, + 14.051811, + 14.049096, + 14.052766, + 14.056264, + 14.055737, + 14.038716, + 14.04397, + 14.056429, + 14.036335, + 14.025586, + 14.044231, + 14.047976, + 14.048912, + 14.044429, + 14.036702, + 14.037932, + 14.049999, + 14.032336, + 14.029085, + 14.052773, + 14.051911, + 14.0107, + 14.049156, + 14.026748 ] } ] diff --git a/packages/web-components/fast-element/package.json b/packages/web-components/fast-element/package.json index dc0711af102..3d62a71b42a 100644 --- a/packages/web-components/fast-element/package.json +++ b/packages/web-components/fast-element/package.json @@ -1,90 +1,90 @@ { - "name": "@microsoft/fast-element", - "description": "A library for constructing Web Components", - "version": "1.9.0", - "author": { - "name": "Microsoft", - "url": "https://discord.gg/FcSNfg4" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/fast.git" - }, - "bugs": { - "url": "https://github.com/Microsoft/fast/issues/new/choose" - }, - "main": "dist/esm/index.js", - "type": "module", - "types": "dist/fast-element.d.ts", - "unpkg": "dist/fast-element.min.js", - "sideEffects": [ - "./dist/esm/debug.js", - "./dist/esm/polyfills.js" - ], - "scripts": { - "clean:dist": "node ../../../build/clean.js dist", - "doc": "api-extractor run --local", - "doc:ci": "api-extractor run", - "build": "yarn build:tsc && yarn build:rollup && yarn doc", - "build:rollup": "rollup -c", - "build:tsc": "tsc -p ./tsconfig.json", - "dev": "tsc -p ./tsconfig.json -w", - "tdd": "yarn dev & yarn test-chrome:watch", - "prepare": "yarn clean:dist && yarn build", - "prettier": "prettier --config ../../../.prettierrc --write \"**/*.ts\"", - "prettier:diff": "prettier --config ../../../.prettierrc \"**/*.ts\" --list-different", - "eslint": "eslint . --ext .ts", - "eslint:fix": "eslint . --ext .ts --fix", - "test": "yarn eslint && yarn test-chrome:verbose && yarn doc:ci", - "test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", - "test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", - "test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage", - "test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage --reporter=mocha", - "test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js", - "test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging", - "test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js --reporter=mocha", - "test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha", - "test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage", - "test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage --reporter=mocha" - }, - "devDependencies": { - "@microsoft/api-extractor": "7.19.4", - "@types/chai": "^4.2.11", - "@types/karma": "^5.0.0", - "@types/mocha": "^7.0.2", - "@types/webpack-env": "^1.15.2", - "chai": "^4.2.0", - "esm": "^3.2.25", - "ignore-loader": "^0.1.2", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.1", - "jsdom": "^16.2.2", - "jsdom-global": "3.0.2", - "karma": "^5.0.4", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage": "^2.0.2", - "karma-coverage-istanbul-reporter": "^3.0.0", - "karma-firefox-launcher": "^2.1.0", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-source-map-support": "^1.4.0", - "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^4.0.2", - "mocha": "^7.1.2", - "prettier": "2.0.2", - "rollup": "^2.7.6", - "rollup-plugin-filesize": "^9.1.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-transform-tagged-template": "^0.0.3", - "rollup-plugin-typescript2": "^0.27.0", - "source-map": "^0.7.3", - "source-map-loader": "^0.2.4", - "ts-loader": "^7.0.2", - "ts-node": "^8.9.1", - "tsconfig-paths": "^3.9.0", - "tslib": "^1.11.1", - "typescript": "^3.9.0", - "webpack": "^4.44.0" - } + "name": "@microsoft/fast-element", + "description": "A library for constructing Web Components", + "version": "1.9.1", + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/fast.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/fast/issues/new/choose" + }, + "main": "dist/esm/index.js", + "type": "module", + "types": "dist/fast-element.d.ts", + "unpkg": "dist/fast-element.min.js", + "sideEffects": [ + "./dist/esm/debug.js", + "./dist/esm/polyfills.js" + ], + "scripts": { + "clean:dist": "node ../../../build/clean.js dist", + "doc": "api-extractor run --local", + "doc:ci": "api-extractor run", + "build": "yarn build:tsc && yarn build:rollup && yarn doc", + "build:rollup": "rollup -c", + "build:tsc": "tsc -p ./tsconfig.json", + "dev": "tsc -p ./tsconfig.json -w", + "tdd": "yarn dev & yarn test-chrome:watch", + "prepare": "yarn clean:dist && yarn build", + "prettier": "prettier --config ../../../.prettierrc --write \"**/*.ts\"", + "prettier:diff": "prettier --config ../../../.prettierrc \"**/*.ts\" --list-different", + "eslint": "eslint . --ext .ts", + "eslint:fix": "eslint . --ext .ts --fix", + "test": "yarn eslint && yarn test-chrome:verbose && yarn doc:ci", + "test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", + "test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", + "test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage", + "test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage --reporter=mocha", + "test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js", + "test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging", + "test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js --reporter=mocha", + "test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha", + "test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage", + "test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage --reporter=mocha" + }, + "devDependencies": { + "@microsoft/api-extractor": "7.19.4", + "@types/chai": "^4.2.11", + "@types/karma": "^5.0.0", + "@types/mocha": "^7.0.2", + "@types/webpack-env": "^1.15.2", + "chai": "^4.2.0", + "esm": "^3.2.25", + "ignore-loader": "^0.1.2", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.1", + "jsdom": "^16.2.2", + "jsdom-global": "3.0.2", + "karma": "^5.0.4", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage": "^2.0.2", + "karma-coverage-istanbul-reporter": "^3.0.0", + "karma-firefox-launcher": "^2.1.0", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-source-map-support": "^1.4.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "^4.0.2", + "mocha": "^7.1.2", + "prettier": "2.0.2", + "rollup": "^2.7.6", + "rollup-plugin-filesize": "^9.1.2", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-transform-tagged-template": "^0.0.3", + "rollup-plugin-typescript2": "^0.27.0", + "source-map": "^0.7.3", + "source-map-loader": "^0.2.4", + "ts-loader": "^7.0.2", + "ts-node": "^8.9.1", + "tsconfig-paths": "^3.9.0", + "tslib": "^1.11.1", + "typescript": "^3.9.0", + "webpack": "^4.44.0" + } } diff --git a/yarn.lock b/yarn.lock index bb3c067d7fa..2a5665365fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,9 +3633,6 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" -"@microsoft/fast-element@file:packages/web-components/fast-element": - version "1.9.0" - "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" resolved "https://registry.yarnpkg.com/@microsoft/fast-jss-manager-react/-/fast-jss-manager-react-4.8.0.tgz#0694b18e9250a26a443ad0d6ab5938bbca2147ca" From ac16a4a6e5ab1e014973915faf0f1bf270e5ad34 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 09:54:16 -0700 Subject: [PATCH 30/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index a52e5d405ff..05a601a944c 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -46,6 +46,7 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks + yarn install yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k - name: Upload results From 82a26ccae54b2c24376e1e5fcb028e028fbaab87 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 10:24:53 -0700 Subject: [PATCH 31/49] delete steps from jobs --- .github/workflows/ci-benchmarks.yml | 111 +++++++++++----------------- 1 file changed, 45 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 05a601a944c..763b092bafc 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -3,69 +3,48 @@ 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 - - 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 - - testLocal: - name: Run create10k 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 --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k - - - name: Upload results - uses: actions/upload-artifact@v2 - with: - name: results - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - report_results: - name: Report Results - needs: [testLocal] - runs-on: ubuntu-latest - steps: - - 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 + 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: Run tachometer and generate results file + run: | + cd packages/utilities/fast-benchmarks + yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json + - 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 From 4be2d0eb4ab964172f35e053329f908d09e47925 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 10:26:29 -0700 Subject: [PATCH 32/49] hard code branch name --- packages/utilities/fast-benchmarks/scripts/template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 7ffb4b8692b..4a156675f11 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -327,11 +327,11 @@ export async function generateTemplates(options) { try { const tsConfigPath = await generateTsConfig(options); const fileName = `${options.library}_${options.benchmark}`; - //special handling if 'local' version was passed in as an option const localProps = { branchName: "", operationProps: {} }; if (options.versions.includes(LOCAL)) { - localProps.branchName = await getLocalGitBranchName(); + // localProps.branchName = await getLocalGitBranchName(); + localProps.branchName = "users/wendy/local-build-actions"; // check if user passed in localBenchFile for different implementation of local if (options.localBenchFile) localProps.operationProps = await generateHtmlTemplates( From 5f89d02888cdca742ed25943fad30edcc4a19190 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 10:28:47 -0700 Subject: [PATCH 33/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 763b092bafc..33b4843d818 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -3,9 +3,9 @@ name: Fast Element benchmark jobs on: [pull_request] jobs: - name: Setup Tachometer Reporting - runs-on: ubuntu-latest - steps: + set_up: + runs-on: ubuntu-latest + steps: - name: Initialize tachometer comment uses: andrewiggins/tachometer-reporter-action@v2 with: From f8e7a0b726c5af3863c285216567f949b458bc35 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Thu, 19 May 2022 10:47:59 -0700 Subject: [PATCH 34/49] hardcode local fast-element version --- .github/workflows/ci-benchmarks.yml | 6 ++--- .../fast-benchmarks/scripts/template.js | 27 ++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 33b4843d818..ed225fb08dd 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -36,15 +36,15 @@ jobs: - name: Upload results uses: actions/upload-artifact@v2 with: - name: results + name: results-create10k path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - uses: actions/download-artifact@v2 with: - name: results + name: results-create10k 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 + report-id: results-create10k path: packages/utilities/fast-benchmarks/results/*.json diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 4a156675f11..78d6557b29f 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -216,19 +216,26 @@ async function generateBenchmarks( if (isBranch) { const ref = isLocalBranch ? localProps.branchName : MASTER; + // bench.packageVersions = { + // label: version, + // dependencies: { + // [dep]: { + // kind: "git", + // repo: "https://github.com/microsoft/fast.git", + // ref, + // subdir: `packages/web-components/${library}`, + // setupCommands: [ + // "yarn install --frozen-lockfile", + // `yarn --cwd ./packages/web-components/${library} build`, + // ], + // }, + // }, + // }; + bench.packageVersions = { label: version, dependencies: { - [dep]: { - kind: "git", - repo: "https://github.com/microsoft/fast.git", - ref, - subdir: `packages/web-components/${library}`, - setupCommands: [ - "yarn install --frozen-lockfile", - `yarn --cwd ./packages/web-components/${library} build`, - ], - }, + [dep]: "1.9.1", }, }; } else { From 1bd7f26f38fc80a4b776c5bdf5307f82125aa95b Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 10:15:44 -0700 Subject: [PATCH 35/49] take out swapping package version prop from config --- .github/workflows/ci-benchmarks.yml | 2 +- .../utilities/fast-benchmarks/scripts/template.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index ed225fb08dd..e06b0251288 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -32,7 +32,7 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks - yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k + yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k --localBenchFile=index2 - name: Upload results uses: actions/upload-artifact@v2 with: diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 78d6557b29f..683154f5148 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -232,12 +232,12 @@ async function generateBenchmarks( // }, // }; - bench.packageVersions = { - label: version, - dependencies: { - [dep]: "1.9.1", - }, - }; + // bench.packageVersions = { + // label: version, + // dependencies: { + // [dep]: "1.9.1", + // }, + // }; } else { bench.packageVersions = { label: version, From 4e63c617ad718845e912dbb53c0223a71cca8a68 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 11:00:44 -0700 Subject: [PATCH 36/49] change to local build --- packages/utilities/fast-benchmarks/package.json | 2 +- yarn.lock | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index c84c9affa58..16fd01cef37 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -15,7 +15,7 @@ "author": "Microsoft", "license": "ISC", "dependencies": { - "@microsoft/fast-element": "1.9.1", + "@microsoft/fast-element": "file:../../web-components/fast-element", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 2a5665365fd..b486f425887 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,6 +3633,9 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" +"@microsoft/fast-element@file:packages/web-components/fast-element": + version "1.9.1" + "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" resolved "https://registry.yarnpkg.com/@microsoft/fast-jss-manager-react/-/fast-jss-manager-react-4.8.0.tgz#0694b18e9250a26a443ad0d6ab5938bbca2147ca" From c380bca740a7e41fd62ef276a0bc9dbf0d9440d1 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 11:01:30 -0700 Subject: [PATCH 37/49] install before building benchmark --- .github/workflows/ci-benchmarks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index e06b0251288..dd71792da67 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -32,6 +32,7 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks + yarn install yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k --localBenchFile=index2 - name: Upload results uses: actions/upload-artifact@v2 From 9e103c95090d588a3e256174cd88aa707c12d241 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 12:02:58 -0700 Subject: [PATCH 38/49] fix build --- .github/workflows/ci-benchmarks.yml | 3 +-- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index dd71792da67..31f184506ce 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -32,8 +32,7 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.8.0 --operations=create10k --localBenchFile=index2 + yarn run benchmark --library=fast-element --benchmark=localTest --versions local latest --operations=create10k --localBenchFile=index2 - name: Upload results uses: actions/upload-artifact@v2 with: diff --git a/yarn.lock b/yarn.lock index b486f425887..f38089a0e4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14246,9 +14246,9 @@ immediate@~3.0.5: integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= immer@8.0.1, immer@^9.0.6, immer@^9.0.7: - version "9.0.12" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" - integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== + version "9.0.14" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.14.tgz#e05b83b63999d26382bb71676c9d827831248a48" + integrity sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw== import-fresh@^2.0.0: version "2.0.0" From d5a908e88296fd4f883ccac095b17e8be0620652 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 12:56:46 -0700 Subject: [PATCH 39/49] update local path to file --- packages/utilities/fast-benchmarks/.gitignore | 1 - packages/utilities/fast-benchmarks/package.json | 2 +- .../utilities/fast-benchmarks/scripts/template.js | 13 +++++++------ packages/web-components/fast-element/package.json | 2 +- yarn.lock | 3 --- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/utilities/fast-benchmarks/.gitignore b/packages/utilities/fast-benchmarks/.gitignore index 91fccea4af1..00f18cfa9eb 100644 --- a/packages/utilities/fast-benchmarks/.gitignore +++ b/packages/utilities/fast-benchmarks/.gitignore @@ -1,4 +1,3 @@ tsconfig.tsbuildinfo node_modules dist -yarn.lock diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index 16fd01cef37..beeeb780a5e 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -15,7 +15,7 @@ "author": "Microsoft", "license": "ISC", "dependencies": { - "@microsoft/fast-element": "file:../../web-components/fast-element", + "@microsoft/fast-element": "^1.9.0", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 683154f5148..049454a0270 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -232,12 +232,13 @@ async function generateBenchmarks( // }, // }; - // bench.packageVersions = { - // label: version, - // dependencies: { - // [dep]: "1.9.1", - // }, - // }; + bench.packageVersions = { + label: version, + dependencies: { + [dep]: + "file:/Users/wendy/code/fast/packages/web-components/fast-element", + }, + }; } else { bench.packageVersions = { label: version, diff --git a/packages/web-components/fast-element/package.json b/packages/web-components/fast-element/package.json index 3d62a71b42a..b50a735571d 100644 --- a/packages/web-components/fast-element/package.json +++ b/packages/web-components/fast-element/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/fast-element", "description": "A library for constructing Web Components", - "version": "1.9.1", + "version": "1.9.0", "author": { "name": "Microsoft", "url": "https://discord.gg/FcSNfg4" diff --git a/yarn.lock b/yarn.lock index f38089a0e4f..054325c8536 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,9 +3633,6 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" -"@microsoft/fast-element@file:packages/web-components/fast-element": - version "1.9.1" - "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" resolved "https://registry.yarnpkg.com/@microsoft/fast-jss-manager-react/-/fast-jss-manager-react-4.8.0.tgz#0694b18e9250a26a443ad0d6ab5938bbca2147ca" From cfc4c1f2f67036f01fe0725d54a2bf946ecded19 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 14:06:59 -0700 Subject: [PATCH 40/49] add to nohoist --- package.json | 4 ++- .../utilities/fast-benchmarks/package.json | 13 ++++--- .../fast-benchmarks/scripts/template.js | 35 +++++++++---------- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 4ce15d3e370..5f7cec123d8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,9 @@ "**/@types/node", "**/chai", "**/html-minifier-terser", - "**/react-syntax-highlighter" + "**/react-syntax-highlighter", + "**/tachometer", + "**/chromedriver" ] }, "engines": { diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index beeeb780a5e..b1430d9ac0f 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -1,8 +1,14 @@ { - "name": "fast-benchmarks", + "name": "@microsoft/fast-benchmarks", "version": "1.0.0", "description": "utility library benchmarking for FAST libraries", "type": "module", + "private": true, + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", "scripts": { "build": "tsc && tsc --build", "benchmark": "node scripts/index.js", @@ -10,10 +16,9 @@ "benchmarks": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", - "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.10.1 --localBenchFile=index2 --operations=create10k" + "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.10.1 --localBenchFile=index2 --operations=create10k", + "link": "rm -f node_modules/@microsoft/fast-element && ln -s ../../web-components/fast-element node_modules/@microsoft/fast-element" }, - "author": "Microsoft", - "license": "ISC", "dependencies": { "@microsoft/fast-element": "^1.9.0", "tachometer": "^0.5.10" diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 049454a0270..7ca6280924e 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -216,29 +216,28 @@ async function generateBenchmarks( if (isBranch) { const ref = isLocalBranch ? localProps.branchName : MASTER; - // bench.packageVersions = { - // label: version, - // dependencies: { - // [dep]: { - // kind: "git", - // repo: "https://github.com/microsoft/fast.git", - // ref, - // subdir: `packages/web-components/${library}`, - // setupCommands: [ - // "yarn install --frozen-lockfile", - // `yarn --cwd ./packages/web-components/${library} build`, - // ], - // }, - // }, - // }; - bench.packageVersions = { label: version, dependencies: { - [dep]: - "file:/Users/wendy/code/fast/packages/web-components/fast-element", + [dep]: { + kind: "git", + repo: "https://github.com/microsoft/fast.git", + ref, + subdir: `packages/web-components/${library}`, + setupCommands: [ + "yarn install", + `yarn --cwd ./packages/web-components/${library} build`, + ], + }, }, }; + + // bench.packageVersions = { + // label: version, + // dependencies: { + // [dep]: "file:../../web-components/fast-element", + // }, + // }; } else { bench.packageVersions = { label: version, From e24be3206807758b3a674f61464cd966c1c3c886 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 14:11:14 -0700 Subject: [PATCH 41/49] install --- .github/workflows/ci-benchmarks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 31f184506ce..835ba78d29b 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -32,6 +32,7 @@ jobs: - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks + yarn install yarn run benchmark --library=fast-element --benchmark=localTest --versions local latest --operations=create10k --localBenchFile=index2 - name: Upload results uses: actions/upload-artifact@v2 From 027656f7e6b2fb46211631333a773f0fe00c97ce Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 14:20:30 -0700 Subject: [PATCH 42/49] Update ci-benchmarks.yml --- .github/workflows/ci-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 835ba78d29b..727b4c3245b 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -33,7 +33,7 @@ jobs: run: | cd packages/utilities/fast-benchmarks yarn install - yarn run benchmark --library=fast-element --benchmark=localTest --versions local latest --operations=create10k --localBenchFile=index2 + yarn run benchmark --library=fast-element --benchmark=localTest --versions 1.4.0 1.9.0 --operations=create10k - name: Upload results uses: actions/upload-artifact@v2 with: From 4e250e77560b138351cfbaac9a73c5a3000a102e Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 14:37:42 -0700 Subject: [PATCH 43/49] depe --- .../fast-benchmarks/scripts/template.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 7ca6280924e..847e08f111e 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -216,21 +216,21 @@ async function generateBenchmarks( if (isBranch) { const ref = isLocalBranch ? localProps.branchName : MASTER; - bench.packageVersions = { - label: version, - dependencies: { - [dep]: { - kind: "git", - repo: "https://github.com/microsoft/fast.git", - ref, - subdir: `packages/web-components/${library}`, - setupCommands: [ - "yarn install", - `yarn --cwd ./packages/web-components/${library} build`, - ], - }, - }, - }; + // bench.packageVersions = { + // label: version, + // dependencies: { + // [dep]: { + // kind: "git", + // repo: "https://github.com/microsoft/fast.git", + // ref, + // subdir: `packages/web-components/${library}`, + // setupCommands: [ + // "yarn install", + // `yarn --cwd ./packages/web-components/${library} build`, + // ], + // }, + // }, + // }; // bench.packageVersions = { // label: version, From 452b36ade2dc842a53381e207e259cd1ba408374 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 14:42:57 -0700 Subject: [PATCH 44/49] add working workflow --- .github/workflows/ci-benchmarks.yml | 114 +++++++++++++++++----------- 1 file changed, 70 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 727b4c3245b..6f9f3b916fc 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -3,49 +3,75 @@ name: Fast Element benchmark jobs on: [pull_request] jobs: - set_up: + # 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: Run tachometer and generate results file - run: | - cd packages/utilities/fast-benchmarks - yarn install - yarn run benchmark --library=fast-element --benchmark=localTest --versions 1.4.0 1.9.0 --operations=create10k - - name: Upload results - uses: actions/upload-artifact@v2 - with: - name: results-create10k - path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json - - uses: actions/download-artifact@v2 - with: - name: results-create10k - path: packages/utilities/fast-benchmarks/results - # Read all the results and post comment - - name: Report Tachometer Result - uses: andrewiggins/tachometer-reporter-action@v2 - with: - report-id: results-create10k - path: packages/utilities/fast-benchmarks/results/*.json + - 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 + + 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:test + # 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: [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 \ No newline at end of file From 3a829cfe0e2874b074fc0b4dd9166bb34c2c6712 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 15:07:16 -0700 Subject: [PATCH 45/49] delete some scripts --- .github/workflows/ci-benchmarks.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 6f9f3b916fc..c0bce57c40c 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -15,27 +15,6 @@ jobs: 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 update10th: name: Run update 10th element benchmark @@ -74,4 +53,4 @@ jobs: uses: andrewiggins/tachometer-reporter-action@v2 with: name: results - path: packages/utilities/fast-benchmarks/results/*.json \ No newline at end of file + path: packages/utilities/fast-benchmarks/results/*.json From 2bb249c4a5a725f41a729fa063e128780f517a67 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 15:12:11 -0700 Subject: [PATCH 46/49] add packageVersion --- .../fast-benchmarks/scripts/template.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 847e08f111e..7ca6280924e 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -216,21 +216,21 @@ async function generateBenchmarks( if (isBranch) { const ref = isLocalBranch ? localProps.branchName : MASTER; - // bench.packageVersions = { - // label: version, - // dependencies: { - // [dep]: { - // kind: "git", - // repo: "https://github.com/microsoft/fast.git", - // ref, - // subdir: `packages/web-components/${library}`, - // setupCommands: [ - // "yarn install", - // `yarn --cwd ./packages/web-components/${library} build`, - // ], - // }, - // }, - // }; + bench.packageVersions = { + label: version, + dependencies: { + [dep]: { + kind: "git", + repo: "https://github.com/microsoft/fast.git", + ref, + subdir: `packages/web-components/${library}`, + setupCommands: [ + "yarn install", + `yarn --cwd ./packages/web-components/${library} build`, + ], + }, + }, + }; // bench.packageVersions = { // label: version, From 7ccc77a4395bdcabd15ad26c7d3128e39b637c01 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 15:30:03 -0700 Subject: [PATCH 47/49] turn off no hoist for packages --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 5f7cec123d8..4ce15d3e370 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,7 @@ "**/@types/node", "**/chai", "**/html-minifier-terser", - "**/react-syntax-highlighter", - "**/tachometer", - "**/chromedriver" + "**/react-syntax-highlighter" ] }, "engines": { From 24cf18d6577d7ebdfabc34f9cd658059979f7143 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 15:40:19 -0700 Subject: [PATCH 48/49] add local test --- .github/workflows/ci-benchmarks.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index c0bce57c40c..895e747e96b 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -36,10 +36,30 @@ jobs: with: name: results path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + create10k: + name: Run create 10k 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:test:local + # Upload this benchmarks results + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json report_results: name: Report Results - needs: [update10th] + needs: [update10th, create10k] runs-on: ubuntu-latest steps: # Download the results artifact From 935e831f7e35f86f585b1650b17b5275e118ef8c Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Mon, 23 May 2022 15:54:09 -0700 Subject: [PATCH 49/49] clean up --- .../fast-benchmarks/scripts/index.js | 3 - .../fast-benchmarks/scripts/template.js | 28 +----- .../fast-benchmarks/utils/index.d.ts | 27 ------ .../utilities/fast-benchmarks/utils/index.js | 94 ------------------- 4 files changed, 1 insertion(+), 151 deletions(-) delete mode 100644 packages/utilities/fast-benchmarks/utils/index.d.ts delete mode 100644 packages/utilities/fast-benchmarks/utils/index.js diff --git a/packages/utilities/fast-benchmarks/scripts/index.js b/packages/utilities/fast-benchmarks/scripts/index.js index cd0871744d6..2f489a589d8 100644 --- a/packages/utilities/fast-benchmarks/scripts/index.js +++ b/packages/utilities/fast-benchmarks/scripts/index.js @@ -115,16 +115,13 @@ async function runBenchmark(configPaths, pathNames) { const run = async () => { try { - console.log("RUNNIN "); await checkNpmRegistryIsAvailable(); const { tsConfigPath, tachoConfigPaths, pathNames } = await generateTemplates( options ); await buildBenchmark(tsConfigPath); - console.log("RUNNIN 1 >>>>>>>>>"); await runBenchmark(tachoConfigPaths, pathNames); - console.log("RUNNIN 2 >>>>>>>>>"); } catch (error) { console.error("ERRROR", error); return error; diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index 7ca6280924e..9ab5ff7b5a0 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -231,13 +231,6 @@ async function generateBenchmarks( }, }, }; - - // bench.packageVersions = { - // label: version, - // dependencies: { - // [dep]: "file:../../web-components/fast-element", - // }, - // }; } else { bench.packageVersions = { label: version, @@ -253,27 +246,9 @@ async function generateBenchmarks( }; } - //adjust some settings to separately report memory benchmark results - // const memoryBench = JSON.parse(JSON.stringify(bench)); - // const memoryMeasurement = [ - // { - // name: "usedJSHeapSize", - // mode: "expression", - // expression: "window.usedJSHeapSize", - // }, - // ]; - // memoryBench.name = `${name}-memory`; - // memoryBench.measurement = memoryMeasurement; - // memoryBench.browser.addArguments = [ - // "--js-flags=--expose-gc", - // "--enable-precise-memory-info", - // ]; - // memoryBenchmarks.push(memoryBench); - if (!memory) benchmarks.push(bench); }); - // tachoData[`${operation}-memory`] = memoryBenchmarks; if (!memory) tachoData[operation] = benchmarks; }); return tachoData; @@ -337,8 +312,7 @@ export async function generateTemplates(options) { //special handling if 'local' version was passed in as an option const localProps = { branchName: "", operationProps: {} }; if (options.versions.includes(LOCAL)) { - // localProps.branchName = await getLocalGitBranchName(); - localProps.branchName = "users/wendy/local-build-actions"; + localProps.branchName = await getLocalGitBranchName(); // check if user passed in localBenchFile for different implementation of local if (options.localBenchFile) localProps.operationProps = await generateHtmlTemplates( diff --git a/packages/utilities/fast-benchmarks/utils/index.d.ts b/packages/utilities/fast-benchmarks/utils/index.d.ts deleted file mode 100644 index 8249a7cd1f3..00000000000 --- a/packages/utilities/fast-benchmarks/utils/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export declare const _random: (max: number) => number; -export declare const adjectives: string[]; -export declare const colours: string[]; -export declare const nouns: string[]; -export declare class RandomItem { - readonly id: number; - label: string; - constructor(id: number); -} -export declare const data: RandomItem[]; -export declare const destroy: (container: { - innerHTML: string; -}) => void; -export declare const getTestStartName: (name: any) => string; -export declare const updateComplete: () => Promise; -declare global { - interface Window { - gc: () => void; - usedJSHeapSize: number; - } - interface Performance { - memory: { - usedJSHeapSize: number; - }; - } -} -export declare function measureMemory(): void; diff --git a/packages/utilities/fast-benchmarks/utils/index.js b/packages/utilities/fast-benchmarks/utils/index.js deleted file mode 100644 index 30e412464ca..00000000000 --- a/packages/utilities/fast-benchmarks/utils/index.js +++ /dev/null @@ -1,94 +0,0 @@ -export const _random = (max) => { - return Math.round(Math.random() * 1000) % max; -}; -//generate 10k, pass this value in -const itemCount = 10000; -let id = 0; -export const adjectives = [ - "pretty", - "large", - "big", - "small", - "tall", - "short", - "long", - "handsome", - "plain", - "quaint", - "clean", - "elegant", - "easy", - "angry", - "crazy", - "helpful", - "mushy", - "odd", - "unsightly", - "adorable", - "important", - "inexpensive", - "cheap", - "expensive", - "fancy", -]; -export const colours = [ - "red", - "yellow", - "blue", - "green", - "pink", - "brown", - "purple", - "brown", - "white", - "black", - "orange", -]; -export const nouns = [ - "table", - "chair", - "house", - "bbq", - "desk", - "car", - "pony", - "cookie", - "sandwich", - "burger", - "pizza", - "mouse", - "keyboard", -]; -export class RandomItem { - constructor(id) { - this.id = id; - this.label = - adjectives[_random(adjectives.length)] + - " " + - colours[_random(colours.length)] + - " " + - nouns[_random(nouns.length)]; - } -} -function generateData(count) { - const data = []; - for (let i = 0; i < count; i++) { - data.push(new RandomItem(++id)); - } - return data; -} -export const data = generateData(itemCount); -export const destroy = (container) => { - container.innerHTML = ""; -}; -export const getTestStartName = (name) => `${name}-start`; -export const updateComplete = () => new Promise(r => requestAnimationFrame(r)); -export function measureMemory() { - if (window && performance && performance.memory) { - // Report results in MBs\ - window.usedJSHeapSize = performance.memory.usedJSHeapSize / 1e6; - } - else { - window.usedJSHeapSize = 0; - } -}