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 2fc88e0877..f48cc878c9 100755 --- a/.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh +++ b/.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh @@ -3,7 +3,7 @@ set -e if [ "$#" -lt 10 ]; then - echo "Usage: ./get-job-json.sh " + echo "Usage: ./get-job-json.sh " exit 1 fi @@ -17,6 +17,7 @@ actorPrefix="$7" format="$8" issueNumber="$9" initBigRepo="${10}" +nomsBinFormat="${11}" tpccRegex="tpcc%" readTests="('oltp_read_only', 'oltp_point_select', 'select_random_points', 'select_random_ranges', 'covering_index_scan', 'index_scan', 'table_scan', 'groupby_scan')" @@ -75,7 +76,8 @@ echo ' "--sysbenchQueries='"$medianLatencyChangeWritesQuery"'", "--tpccQueries='"$tpccLatencyQuery"'", "--tpccQueries='"$tpccTpsQuery"'", - "--init-big-repo='"$initBigRepo"'"" + "--init-big-repo='"$initBigRepo"'"", + "--noms-bin-format='"$nomsBinFormat"'"" ] } ], diff --git a/.github/scripts/performance-benchmarking/run-benchmarks.sh b/.github/scripts/performance-benchmarking/run-benchmarks.sh index 9a90e38962..25d4a9c112 100755 --- a/.github/scripts/performance-benchmarking/run-benchmarks.sh +++ b/.github/scripts/performance-benchmarking/run-benchmarks.sh @@ -62,7 +62,8 @@ source \ "$actorprefix" \ "$format" \ "$issuenumber" \ - "$INIT_BIG_REPO" > job.json + "$INIT_BIG_REPO" \ + "$NOMS_BIN_FORMAT" > 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 9c1d437d13..576facf798 100644 --- a/.github/workflows/ci-performance-benchmarks.yaml +++ b/.github/workflows/ci-performance-benchmarks.yaml @@ -42,6 +42,15 @@ jobs: echo "::set-output name=benchmark::true" performance: + strategy: + matrix: + biginit: ["true", "false"] + nbf: ["__LD_1__", "__DOLT_1__"] + exclude: + - biginit: "true" + nbf: "__DOLT_1__" + - bigint: "false" + nbf: "__LD_1__" runs-on: ubuntu-18.04 needs: [validate-commentor, check-comments] if: ${{ needs.check-comments.outputs.benchmark == 'true' }} @@ -95,5 +104,6 @@ jobs: ACTOR: ${{ github.actor }} REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} KUBECONFIG: "./kubeconfig" - INIT_BIG_REPO: "true" + INIT_BIG_REPO: ${{ matrix.biginit }} + NOMS_BIN_FORMAT: ${{ matrix.nbf }} 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 75a35f98df..22acff9bf6 100644 --- a/go/performance/utils/sysbench_runner/config.go +++ b/go/performance/utils/sysbench_runner/config.go @@ -281,6 +281,8 @@ type Config struct { ScriptDir string // InitBigRepo downloads a database with existing chunks and commits InitBigRepo bool + // NomsBinFormat specifies the NomsBinFormat + NomsBinFormat string } // NewConfig returns a new Config diff --git a/go/performance/utils/sysbench_runner/dolt.go b/go/performance/utils/sysbench_runner/dolt.go index b08ec21502..67aee65e8b 100644 --- a/go/performance/utils/sysbench_runner/dolt.go +++ b/go/performance/utils/sysbench_runner/dolt.go @@ -32,6 +32,7 @@ const ( dbName = "test" luaPath = "?.lua" bigEmptyRepo = "max-hoffman/big-empty" + nbfEnvVar = "DOLT_DEFAULT_BIN_FORMAT" ) var stampFunc = func() string { return time.Now().UTC().Format(stampFormat) } @@ -50,7 +51,7 @@ func BenchmarkDolt(ctx context.Context, config *Config, serverConfig *ServerConf return nil, err } - testRepo, err := initDoltRepo(ctx, serverConfig, config.InitBigRepo) + testRepo, err := initDoltRepo(ctx, serverConfig, config.InitBigRepo, config.NomsBinFormat) if err != nil { return nil, err } @@ -133,7 +134,7 @@ func doltVersion(ctx context.Context, config *ServerConfig) error { } // initDoltRepo initializes a dolt repo and returns the repo path -func initDoltRepo(ctx context.Context, config *ServerConfig, initBigRepo bool) (string, error) { +func initDoltRepo(ctx context.Context, config *ServerConfig, initBigRepo bool, nbf string) (string, error) { cwd, err := os.Getwd() if err != nil { return "", err @@ -152,6 +153,12 @@ func initDoltRepo(ctx context.Context, config *ServerConfig, initBigRepo bool) ( return "", err } + if nbf != "" { + if err = os.Setenv(nbfEnvVar, nbf); err != nil { + return "", err + } + } + doltInit := ExecCommand(ctx, config.ServerExec, "init") doltInit.Dir = testRepo err = doltInit.Run()