Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Add benchmarks
Browse files Browse the repository at this point in the history
This is almost entirely different from the original in #164. Instead it:

- uses benchmark.js rather than implementing our own
- mostly defers to benchmark.js stats logic for reporting
- skips `@actions/core` for generating the GitHub Actions summary, it wasn't really doing a lot for us
  • Loading branch information
eyelidlessness committed Feb 6, 2023
1 parent 485730c commit 3048222
Show file tree
Hide file tree
Showing 5 changed files with 332 additions and 43 deletions.
1 change: 1 addition & 0 deletions .github/workflows/npmjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- run: npm test
- run: npm run benchmarks
- if: github.event_name == 'release' && github.event.action == 'published' && matrix.node == '16'
run: npm publish
env:
Expand Down
118 changes: 88 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"contributors": [],
"scripts": {
"benchmarks": "vite-node ./test/benchmarks.ts",
"build": "vite build && npm run tsc",
"start": "vite",
"eslint-check": "eslint app.ts src/**/*.ts vite.config.ts test/**/*.ts",
Expand Down Expand Up @@ -65,13 +66,15 @@
},
"devDependencies": {
"@prettier/plugin-xml": "^2.2.0",
"@types/benchmark": "^2.1.2",
"@types/css.escape": "^1.5.0",
"@types/express": "^4.17.14",
"@types/node": "^18.11.17",
"@types/prettier": "^2.7.2",
"@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.47.0",
"@vitest/coverage-istanbul": "^0.26.2",
"benchmark": "^2.1.4",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
"docdash": "^1.2.0",
Expand All @@ -91,10 +94,12 @@
"http-server": "^13.1.0",
"istanbul-reporter-shield-badge": "^1.2.1",
"markdown-eslint-parser": "^1.2.1",
"microtime": "^3.1.1",
"pretty-format": "^29.3.1",
"rimraf": "^3.0.2",
"typescript": "^4.9.4",
"vite": "^4.0.3",
"vite-node": "^0.28.4",
"vite-plugin-node": "^1.0.0",
"vitest": "^0.26.2"
},
Expand Down
Loading

0 comments on commit 3048222

Please sign in to comment.