Performance Regression #1192
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Performance Regression | |
on: | |
push: | |
branches: | |
- main | |
issue_comment: | |
types: [created] | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
trigger-internal-perf-job: | |
name: Trigger Internal Performance Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Compute if node was modified | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
node_modified: | |
- 'nucliadb_core/**' | |
- 'nucliadb_node/src/**' | |
- 'nucliadb_paragraphs/**' | |
- 'nucliadb_procs/**' | |
- 'nucliadb_relations/**' | |
- 'nucliadb_relations2/**' | |
- 'nucliadb_telemetry/**' | |
- 'nucliadb_texts/**' | |
- 'nucliadb_texts2/**' | |
- 'nucliadb_vectors/**' | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GH_CICD_PUBLIC }} | |
repository: nuclia/nucliadb_deploy | |
event-type: performance-tests | |
client-payload: '{"nucliadb_checkout_id": "${{ github.sha }}", "build_node_bindings": ${{ steps.filter.outputs.node_modified }}}' | |
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: | |
head_ref: main | |
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: | |
head_ref: main | |
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 | |