Skip to content

Commit

Permalink
Update benchmarks (#2865)
Browse files Browse the repository at this point in the history
* Add create10k and hydrate1k benchmark
* Track all run timings in replace1k
* Setup infra to customize measures per benchmark
* Update tachometer and v8-deopt-viewer

Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
  • Loading branch information
andrewiggins and marvinhagemeister authored Dec 15, 2020
1 parent 5ac1684 commit 1a0837f
Show file tree
Hide file tree
Showing 15 changed files with 659 additions and 256 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
report-id: 02_replace1k
base-bench-name: preact-master
pr-bench-name: preact-local
summarize: 'duration, usedJSHeapSize'

bench_03_update10th1k_x16:
name: Bench 03_update10th1k_x16
Expand Down Expand Up @@ -195,3 +196,69 @@ jobs:
report-id: 03_update10th1k_x16
base-bench-name: preact-master
pr-bench-name: preact-local

bench_07_create10k:
name: Bench 07_create10k
runs-on: ubuntu-latest
needs: build_test
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- uses: actions/download-artifact@v2
with:
name: build-output
- uses: andrewiggins/download-base-artifact@v1
with:
artifact: npm-package
required: false
- name: install & build
run: |
cd benches
npm ci
- name: bench
run: |
export CHROMEDRIVER_FILEPATH=$(which chromedriver)
cd benches
npm run bench 07_create10k.html
- uses: andrewiggins/tachometer-reporter-action@v2
with:
path: benches/results/07_create10k.json
report-id: 07_create10k
base-bench-name: preact-master
pr-bench-name: preact-local

bench_hydrate1k:
name: Bench hydrate1k
runs-on: ubuntu-latest
needs: build_test
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- uses: actions/download-artifact@v2
with:
name: build-output
- uses: andrewiggins/download-base-artifact@v1
with:
artifact: npm-package
required: false
- name: install & build
run: |
cd benches
npm ci
- name: bench
run: |
export CHROMEDRIVER_FILEPATH=$(which chromedriver)
cd benches
npm run bench hydrate1k.html
- uses: andrewiggins/tachometer-reporter-action@v2
with:
path: benches/results/hydrate1k.json
report-id: hydrate1k
base-bench-name: preact-master
pr-bench-name: preact-local
10 changes: 10 additions & 0 deletions benches/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* Add `preact-release` proxy
- to capture slowdowns overtime
* Report `initial-run` metric to PR
- to capture unoptimized runtime which would be an important metric to understand perf characteristic before optimizations kick in
* Add warmup reporting to all benchmarks
* Add UIBench
* Add bench mimicking speedometer
* Add a realworld-like bench?
* Add a specialized bench that hits certain code paths other's miss (e.g. style attribute handling?)
* Add analyze script and PR to add --trace to tachometer
109 changes: 58 additions & 51 deletions benches/package-lock.json

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

6 changes: 3 additions & 3 deletions benches/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "Benchmarks for Preact",
"scripts": {
"prepare": "cd proxy-packages/preact-v8-proxy && npm ci",
"start": "node ./scripts config text_update.html && tach --config dist/text_update.config.json --manual",
"start": "node ./scripts config many_updates.html && tach --config dist/many_updates.config.json --manual",
"bench": "node ./scripts bench",
"deopts": "node ./scripts deopts",
"help": "node ./scripts --help"
Expand All @@ -22,7 +22,7 @@
"globby": "^11.0.0",
"sade": "^1.7.3",
"strip-ansi": "^6.0.0",
"tachometer": "^0.5.1",
"v8-deopt-viewer": "^0.1.4"
"tachometer": "^0.5.5",
"v8-deopt-viewer": "^0.2.1"
}
}
Loading

0 comments on commit 1a0837f

Please sign in to comment.