diff --git a/.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh b/.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh index 5681e4139a..7a5aebf61e 100755 --- a/.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh +++ b/.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh @@ -63,6 +63,7 @@ echo ' "alert_recipients": "'$ACTOR_EMAIL'" }, "labels": { + "app": "performance-benchmarking" "k8s-liquidata-inc-monitored-job": "created-by-static-config" } }, diff --git a/.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh b/.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh index e435eab400..baf030f445 100755 --- a/.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh +++ b/.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh @@ -2,8 +2,8 @@ set -e -if [ "$#" -lt 9 ]; then - echo "Usage: ./get-job-json.sh " +if [ "$#" -lt 10 ]; then + echo "Usage: ./get-job-json.sh " exit 1 fi @@ -18,7 +18,8 @@ format="$8" issueNumber="$9" initBigRepo="${10}" nomsBinFormat="${11}" -withTpcc="${12}" +sysbenchTestTime="${12}" +withTpcc="${13}" precision="1" tpccRegex="tpcc%" @@ -30,6 +31,10 @@ if [ -n "$nomsBinFormat" ]; then nomsBinFormat="\"--noms-bin-format=$nomsBinFormat\"," fi +if [ -n "$sysbenchTestTime" ]; then + sysbenchTestTime="\"--sysbench-test-time=$sysbenchTestTime\"," +fi + if [ -n "$withTpcc" ]; then withTpcc="\"--withTpcc=$withTpcc\"," fi @@ -101,6 +106,7 @@ echo ' "--region=us-west-2", "--results-dir='$timeprefix'", "--results-prefix='$actorprefix'", + '"$sysbenchTestTime"' '"$withTpcc"' '"$initBigRepo"' '"$nomsBinFormat"' diff --git a/.github/scripts/performance-benchmarking/run-benchmarks.sh b/.github/scripts/performance-benchmarking/run-benchmarks.sh index d7adf3c770..c0057d3644 100755 --- a/.github/scripts/performance-benchmarking/run-benchmarks.sh +++ b/.github/scripts/performance-benchmarking/run-benchmarks.sh @@ -70,18 +70,19 @@ fi issuenumber=${ISSUE_NUMBER:-"-1"} source \ - "$TEMPLATE_SCRIPT" \ - "$jobname" \ - "$FROM_SERVER" \ - "$FROM_VERSION" \ - "$TO_SERVER" \ - "$TO_VERSION" \ - "$timeprefix" \ - "$actorprefix" \ - "$format" \ - "$issuenumber" \ - "$INIT_BIG_REPO" \ - "$NOMS_BIN_FORMAT" \ + "$TEMPLATE_SCRIPT" \ + "$jobname" \ + "$FROM_SERVER" \ + "$FROM_VERSION" \ + "$TO_SERVER" \ + "$TO_VERSION" \ + "$timeprefix" \ + "$actorprefix" \ + "$format" \ + "$issuenumber" \ + "$INIT_BIG_REPO" \ + "$NOMS_BIN_FORMAT" \ + "$SYSBENCH_TEST_TIME" \ "$WITH_TPCC" > job.json out=$(KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json || true) diff --git a/.github/workflows/k8s-benchmark-latency.yaml b/.github/workflows/k8s-benchmark-latency.yaml index 307ab04b4d..00a596ed27 100644 --- a/.github/workflows/k8s-benchmark-latency.yaml +++ b/.github/workflows/k8s-benchmark-latency.yaml @@ -53,6 +53,7 @@ jobs: KUBECONFIG: "./kubeconfig" INIT_BIG_REPO: ${{ github.event.client_payload.init_big_repo }} NOMS_BIN_FORMAT: "__DOLT__" + SYSBENCH_TEST_TIME: ${{ github.event.client_payload.sysbench_test_time }} TEMPLATE_SCRIPT: ${{ github.event.client_payload.template_script }} # TODO: skipping tpcc with Doltgres and Postgres, not currently working diff --git a/.github/workflows/performance-benchmarks-pull-report.yaml b/.github/workflows/performance-benchmarks-pull-report.yaml index 3f4e3fbef3..63d1ce2b90 100644 --- a/.github/workflows/performance-benchmarks-pull-report.yaml +++ b/.github/workflows/performance-benchmarks-pull-report.yaml @@ -25,10 +25,11 @@ jobs: if: ${{ needs.validate-commentor.outputs.valid == 'true' }} outputs: benchmark: ${{ steps.set_benchmark.outputs.benchmark }} + sysbench-test-time: ${{ steps.set_benchmark.outputs.sysbench-test-time }} comment-body: ${{ steps.set_body.outputs.body }} steps: - name: Check for Deploy Trigger - uses: dolthub/pull-request-comment-trigger@master + uses: dolthub/pull-request-comment-trigger@v2 id: check with: trigger: '#benchmark' @@ -40,6 +41,7 @@ jobs: id: set_benchmark run: | echo "benchmark=true" >> $GITHUB_OUTPUT + echo "sysbench-test-time=20" >> $GITHUB_OUTPUT performance: runs-on: ubuntu-22.04 @@ -47,7 +49,7 @@ jobs: if: ${{ needs.check-comments.outputs.benchmark == 'true' }} name: Trigger Benchmark Latency K8s Workflow steps: - - uses: dolthub/pull-request-comment-branch@v4 + - uses: dolthub/pull-request-comment-branch@v3 id: comment-branch with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -57,8 +59,8 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: core.setOutput("pull_number", JSON.stringify(context.issue.number)); - - uses: peter-evans/repository-dispatch@v2.0.0 + - uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.REPO_ACCESS_TOKEN }} event-type: benchmark-latency - client-payload: '{"from_server": "doltgres", "from_version": "${{ github.sha }}", "to_server": "doltgres", "to_version": "${{ steps.comment-branch.outputs.head_sha }}", "mode": "pullRequest", "issue_number": "${{ steps.get_pull_number.outputs.pull_number }}", "init_big_repo": "true", "actor": "${{ github.actor }}", "template_script": "./.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh"}' + client-payload: '{"from_server": "doltgres", "from_version": "${{ github.sha }}", "to_server": "doltgres", "to_version": "${{ steps.comment-branch.outputs.head_sha }}", "mode": "pullRequest", "issue_number": "${{ steps.get_pull_number.outputs.pull_number }}", "init_big_repo": "true", "actor": "${{ github.actor }}", "sysbench_test_time": "${{ needs.check-comments.outputs.sysbench-test-time }}", "template_script": "./.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh"}'