Files
dolt/.github/workflows/sysbench-performance.yaml

53 lines
1.8 KiB
YAML

name: Benchmark Mini Sysbench Performance on PR
on:
pull_request:
paths:
- 'go/**'
branches: [ main ]
jobs:
performance:
name: Trigger Mini Benchmark Latency K8s Workflow
runs-on: ubuntu-22.04
steps:
- name: Build benchmark payload (main HEAD + PR HEAD)
uses: actions/github-script@v7
id: build_payload
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
// For PR benchmarks, use the PR base commit (the exact target commit this PR was opened/updated against),
// not the moving HEAD of `main`.
const fromSha = context.payload.pull_request.base.sha;
// The latest commit on the PR branch.
const toSha = context.payload.pull_request.head.sha;
const payload = {
from_server: "dolt",
from_version: fromSha,
to_server: "dolt",
to_version: toSha,
mode: "pullRequest",
issue_number: String(context.issue.number),
init_big_repo: "true",
actor: context.actor,
sysbench_test_time: "20",
template_script: "./.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh",
};
core.setOutput("from_sha", fromSha);
core.setOutput("to_sha", toSha);
core.setOutput("payload", JSON.stringify(payload));
- name: Log benchmark versions
shell: bash
run: |
echo "from_version_sha=${{ steps.build_payload.outputs.from_sha }}"
echo "to_version_sha=${{ steps.build_payload.outputs.to_sha }}"
- uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: benchmark-latency
client-payload: ${{ steps.build_payload.outputs.payload }}