From 88440b090b5a5b899042af247fecfd7b173af0af Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Thu, 2 Jun 2022 16:23:58 -0700 Subject: [PATCH] refactor 'init-big-repo' flag to make setup work optional --- .../get-dolt-dolt-job-json.sh | 7 ++++--- .../performance-benchmarking/run-benchmarks.sh | 13 ++++++++++++- .github/workflows/ci-performance-benchmarks.yaml | 1 + go/performance/utils/sysbench_runner/config.go | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh b/.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh index 7d9c77d668..2fc88e0877 100755 --- a/.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh +++ b/.github/scripts/performance-benchmarking/get-dolt-dolt-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 @@ -16,6 +16,7 @@ timePrefix="$6" actorPrefix="$7" format="$8" issueNumber="$9" +initBigRepo="${10}" tpccRegex="tpcc%" readTests="('oltp_read_only', 'oltp_point_select', 'select_random_points', 'select_random_ranges', 'covering_index_scan', 'index_scan', 'table_scan', 'groupby_scan')" @@ -74,7 +75,7 @@ echo ' "--sysbenchQueries='"$medianLatencyChangeWritesQuery"'", "--tpccQueries='"$tpccLatencyQuery"'", "--tpccQueries='"$tpccTpsQuery"'", - "--init-big-repo" + "--init-big-repo='"$initBigRepo"'"" ] } ], diff --git a/.github/scripts/performance-benchmarking/run-benchmarks.sh b/.github/scripts/performance-benchmarking/run-benchmarks.sh index c4358c8b06..9a90e38962 100755 --- a/.github/scripts/performance-benchmarking/run-benchmarks.sh +++ b/.github/scripts/performance-benchmarking/run-benchmarks.sh @@ -51,7 +51,18 @@ fi # or default to -1 issuenumber=${ISSUE_NUMBER:-"-1"} -source "$TEMPLATE_SCRIPT" "$jobname" "$FROM_SERVER" "$FROM_VERSION" "$TO_SERVER" "$TO_VERSION" "$timeprefix" "$actorprefix" "$format" "$issuenumber" > job.json +source \ + "$TEMPLATE_SCRIPT" \ + "$jobname" \ + "$FROM_SERVER" \ + "$FROM_VERSION" \ + "$TO_SERVER" \ + "$TO_VERSION" \ + "$timeprefix" \ + "$actorprefix" \ + "$format" \ + "$issuenumber" \ + "$INIT_BIG_REPO" > job.json out=$(KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json || true) diff --git a/.github/workflows/ci-performance-benchmarks.yaml b/.github/workflows/ci-performance-benchmarks.yaml index 081452d803..9c1d437d13 100644 --- a/.github/workflows/ci-performance-benchmarks.yaml +++ b/.github/workflows/ci-performance-benchmarks.yaml @@ -95,4 +95,5 @@ jobs: ACTOR: ${{ github.actor }} REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} KUBECONFIG: "./kubeconfig" + INIT_BIG_REPO: "true" TEMPLATE_SCRIPT: "./.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh" diff --git a/go/performance/utils/sysbench_runner/config.go b/go/performance/utils/sysbench_runner/config.go index 651e5bb1a1..75a35f98df 100644 --- a/go/performance/utils/sysbench_runner/config.go +++ b/go/performance/utils/sysbench_runner/config.go @@ -279,7 +279,7 @@ type Config struct { TestOptions []string // ScriptDir is a path to a directory of lua scripts ScriptDir string - // DirtyClone downloads a database with existing chunks and commits + // InitBigRepo downloads a database with existing chunks and commits InitBigRepo bool }