-
Notifications
You must be signed in to change notification settings - Fork 23
68 lines (59 loc) · 2.22 KB
/
perf-v2.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Perf Test V2
on:
push:
branches: [main]
paths:
- 'packages/replicache/**'
- 'packages/replicache-perf/**'
jobs:
benchmark:
name: Performance regression check
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
# Clear out potential user data dirs left over from previous failures.
- run: rm -rf /tmp/replicache-playwright-*
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run build
working-directory: packages/replicache-perf
# Run benchmark and stores the output to a file
- name: Run benchmark
working-directory: packages/replicache-perf
run: |
npm run build
npx tsx src/runner.ts --format=json | tee perf-temp-output.json
node tool/split-perf.js perf-temp-output.json perf-v2-output.json perf-v2-p95-output.json
shell: bash
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
# What benchmark tool the output.json came from
tool: 'customSmallerIsBetter'
# Where the output from the benchmark tool is stored
output-file-path: packages/replicache-perf/perf-v2-output.json
# Workflow will fail when an alert happens
fail-on-alert: true
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
benchmark-data-dir-path: perf-v2
auto-push: true
alert-threshold: '130%'
comment-on-alert: true
- name: Store benchmark result p95
uses: rhysd/github-action-benchmark@v1
with:
# What benchmark tool the output.json came from
tool: 'customSmallerIsBetter'
# Where the output from the benchmark tool is stored
output-file-path: packages/replicache-perf/perf-v2-p95-output.json
# Workflow will NOT fail when an alert happens
fail-on-alert: false
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
benchmark-data-dir-path: perf-v2/p95
auto-push: true
alert-threshold: '1000%'
comment-on-alert: false