-
Notifications
You must be signed in to change notification settings - Fork 51
96 lines (90 loc) · 2.89 KB
/
nucliadb_performance.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Performance Regression
on:
push:
branches:
- main
issue_comment:
types: [created]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions: write-all
jobs:
check-perf-main-nightly:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
name: Record performance on main (nightly)
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run the bench
run: |
make -C vectors_benchmark nightly
- name: Store performance data
uses: nuclia/nucliadb_performance@main
with:
metrics_file: vectors_benchmark/benchmark.json
influxdb_url: ${{ secrets.INFLUXDB_SERVER }}
influxdb_token: ${{ secrets.INFLUXDB_TOKEN }}
influxdb_org: nuclia
influxdb_bucket: benchmarks
check-perf-main:
if: github.event_name == 'push'
name: Record performance on main
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Run the bench
run: |
make -C vectors_benchmark fast-bench
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Store performance data
uses: nuclia/nucliadb_performance@main
with:
metrics_file: vectors_benchmark/benchmark.json
influxdb_url: ${{ secrets.INFLUXDB_SERVER }}
influxdb_token: ${{ secrets.INFLUXDB_TOKEN }}
influxdb_org: nuclia
influxdb_bucket: benchmarks
check-perf-pr:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/bench')
runs-on: ubuntu-latest
name: Check performance on the PR
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- uses: actions/checkout@v3
if: success()
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run the vectors bench
run: |
make -C vectors_benchmark fast-bench
- name: Store performance data and report back
uses: nuclia/nucliadb_performance@main
with:
metrics_file: vectors_benchmark/benchmark.json
head_ref: ${{ steps.comment-branch.outputs.head_ref }}
influxdb_url: ${{ secrets.INFLUXDB_SERVER }}
influxdb_token: ${{ secrets.INFLUXDB_TOKEN }}
influxdb_org: nuclia
influxdb_bucket: benchmarks