mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-07 11:22:02 -05:00
added nbf option
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
if [ "$#" -lt 10 ]; then
|
||||
echo "Usage: ./get-job-json.sh <jobname> <fromServer> <fromVersion> <toServer> <toVersion> <timePrefix> <actorPrefix> <format> <issueNumber> <initBigRepo>"
|
||||
echo "Usage: ./get-job-json.sh <jobname> <fromServer> <fromVersion> <toServer> <toVersion> <timePrefix> <actorPrefix> <format> <issueNumber> <initBigRepo> <nomsBinFormat>"
|
||||
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"'""
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user