Add one-line mechanism to exclude languages.

pull/37172/head
Paulo Castello da Costa 5 months ago
parent f52d3a02f2
commit 4057659c84
  1. 73
      tools/internal_ci/linux/grpc_e2e_performance_gke.sh
  2. 74
      tools/internal_ci/linux/grpc_e2e_performance_gke_experiment.sh

@ -119,42 +119,75 @@ buildConfigs() {
-o "loadtest_with_prebuilt_workers_${pool}.yaml" -o "loadtest_with_prebuilt_workers_${pool}.yaml"
} }
# Add languages # List all languages.
declare -A useLanguage=(
[c++]=1
[dotnet]=1
[go]=1
[java]=1
[node]=1
[ruby]=1
)
# Disable specific languages.
declare -a disabledLanguages=(
# Add a language here to disable it.
dotnet
)
for language in "${disabledLanguages[@]}"; do
unset "useLanguage[${language}]"
done
# Add arguments for languages.
declare -a configLangArgs8core=() declare -a configLangArgs8core=()
declare -a configLangArgs32core=() declare -a configLangArgs32core=()
declare -a runnerLangArgs=() declare -a runnerLangArgs=()
# c++ # c++
configLangArgs8core+=(-l c++) if [[ -v "useLanguage[c++]" ]]; then
configLangArgs32core+=(-l c++) configLangArgs8core+=(-l c++)
runnerLangArgs+=(-l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs32core+=(-l c++)
runnerLangArgs+=(-l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
# dotnet # dotnet
# configLangArgs8core+=( -l dotnet ) if [[ -v "useLanguage[dotnet]" ]]; then
# configLangArgs32core+=( -l dotnet ) configLangArgs8core+=(-l dotnet)
# runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) configLangArgs32core+=(-l dotnet)
runnerLangArgs+=(-l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}")
fi
# # go # go
configLangArgs8core+=(-l go) if [[ -v "useLanguage[go]" ]]; then
configLangArgs32core+=(-l go) configLangArgs8core+=(-l go)
runnerLangArgs+=(-l "go:${GRPC_GO_REPO}:${GRPC_GO_COMMIT}") configLangArgs32core+=(-l go)
runnerLangArgs+=(-l "go:${GRPC_GO_REPO}:${GRPC_GO_COMMIT}")
fi
# java # java
configLangArgs8core+=(-l java) if [[ -v "useLanguage[java]" ]]; then
configLangArgs32core+=(-l java) configLangArgs8core+=(-l java)
runnerLangArgs+=(-l "java:${GRPC_JAVA_REPO}:${GRPC_JAVA_COMMIT}") configLangArgs32core+=(-l java)
runnerLangArgs+=(-l "java:${GRPC_JAVA_REPO}:${GRPC_JAVA_COMMIT}")
fi
# node # node
configLangArgs8core+=(-l node) # 8-core only. if [[ -v "useLanguage[node]" ]]; then
runnerLangArgs+=(-l "node:${GRPC_NODE_REPO}:${GRPC_NODE_COMMIT}") configLangArgs8core+=(-l node) # 8-core only.
runnerLangArgs+=(-l "node:${GRPC_NODE_REPO}:${GRPC_NODE_COMMIT}")
fi
# python # python
configLangArgs8core+=(-l python) # 8-core only. if [[ -v "useLanguage[python]" ]]; then
runnerLangArgs+=(-l "python:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs8core+=(-l python) # 8-core only.
runnerLangArgs+=(-l "python:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
# ruby # ruby
configLangArgs8core+=(-l ruby) # 8-core only. if [[ -v "useLanguage[ruby]" ]]; then
runnerLangArgs+=(-l "ruby:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs8core+=(-l ruby) # 8-core only.
runnerLangArgs+=(-l "ruby:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
buildConfigs "${WORKER_POOL_8CORE}" "${BIGQUERY_TABLE_8CORE}" "${configLangArgs8core[@]}" buildConfigs "${WORKER_POOL_8CORE}" "${BIGQUERY_TABLE_8CORE}" "${configLangArgs8core[@]}"
buildConfigs "${WORKER_POOL_32CORE}" "${BIGQUERY_TABLE_32CORE}" "${configLangArgs32core[@]}" buildConfigs "${WORKER_POOL_32CORE}" "${BIGQUERY_TABLE_32CORE}" "${configLangArgs32core[@]}"

@ -110,45 +110,79 @@ buildConfigs() {
--prefix="${LOAD_TEST_PREFIX}" -u "${UNIQUE_IDENTIFIER}" -u "${pool}" \ --prefix="${LOAD_TEST_PREFIX}" -u "${UNIQUE_IDENTIFIER}" -u "${pool}" \
-a pool="${pool}" --category=scalable \ -a pool="${pool}" --category=scalable \
--allow_client_language=c++ --allow_server_language=c++ \ --allow_client_language=c++ --allow_server_language=c++ \
--allow_server_language=node \
-o "loadtest_with_prebuilt_workers_${pool}.yaml" -o "loadtest_with_prebuilt_workers_${pool}.yaml"
} }
# Add languages # List all languages.
declare -A useLanguage=(
[c++]=1
[dotnet]=1
[go]=1
[java]=1
[node]=1
[ruby]=1
)
# Disable specific languages.
declare -a disabledLanguages=(
# Add a language here to disable it.
dotnet
)
for language in "${disabledLanguages[@]}"; do
unset "useLanguage[${language}]"
done
# Add arguments for languages.
declare -a configLangArgs8core=() declare -a configLangArgs8core=()
declare -a configLangArgs32core=() declare -a configLangArgs32core=()
declare -a runnerLangArgs=() declare -a runnerLangArgs=()
# c++ # c++
configLangArgs8core+=(-l c++) if [[ -v "useLanguage[c++]" ]]; then
configLangArgs32core+=(-l c++) configLangArgs8core+=(-l c++)
runnerLangArgs+=(-l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs32core+=(-l c++)
runnerLangArgs+=(-l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
# dotnet # dotnet
# configLangArgs8core+=( -l dotnet ) if [[ -v "useLanguage[dotnet]" ]]; then
# configLangArgs32core+=( -l dotnet ) configLangArgs8core+=(-l dotnet)
# runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) configLangArgs32core+=(-l dotnet)
runnerLangArgs+=(-l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}")
fi
# # go # go
configLangArgs8core+=(-l go) if [[ -v "useLanguage[go]" ]]; then
configLangArgs32core+=(-l go) configLangArgs8core+=(-l go)
runnerLangArgs+=(-l "go:${GRPC_GO_REPO}:${GRPC_GO_COMMIT}") configLangArgs32core+=(-l go)
runnerLangArgs+=(-l "go:${GRPC_GO_REPO}:${GRPC_GO_COMMIT}")
fi
# java # java
configLangArgs8core+=(-l java) if [[ -v "useLanguage[java]" ]]; then
configLangArgs32core+=(-l java) configLangArgs8core+=(-l java)
runnerLangArgs+=(-l "java:${GRPC_JAVA_REPO}:${GRPC_JAVA_COMMIT}") configLangArgs32core+=(-l java)
runnerLangArgs+=(-l "java:${GRPC_JAVA_REPO}:${GRPC_JAVA_COMMIT}")
fi
# node # node
configLangArgs8core+=(-l node) # 8-core only. if [[ -v "useLanguage[node]" ]]; then
runnerLangArgs+=(-l "node:${GRPC_NODE_REPO}:${GRPC_NODE_COMMIT}") configLangArgs8core+=(-l node) # 8-core only.
runnerLangArgs+=(-l "node:${GRPC_NODE_REPO}:${GRPC_NODE_COMMIT}")
fi
# python # python
configLangArgs8core+=(-l python) # 8-core only. if [[ -v "useLanguage[python]" ]]; then
runnerLangArgs+=(-l "python:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs8core+=(-l python) # 8-core only.
runnerLangArgs+=(-l "python:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
# ruby # ruby
configLangArgs8core+=(-l ruby) # 8-core only. if [[ -v "useLanguage[ruby]" ]]; then
runnerLangArgs+=(-l "ruby:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}") configLangArgs8core+=(-l ruby) # 8-core only.
runnerLangArgs+=(-l "ruby:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}")
fi
buildConfigs "${WORKER_POOL_8CORE}" "${BIGQUERY_TABLE_8CORE}" "${configLangArgs8core[@]}" buildConfigs "${WORKER_POOL_8CORE}" "${BIGQUERY_TABLE_8CORE}" "${configLangArgs8core[@]}"
buildConfigs "${WORKER_POOL_32CORE}" "${BIGQUERY_TABLE_32CORE}" "${configLangArgs32core[@]}" buildConfigs "${WORKER_POOL_32CORE}" "${BIGQUERY_TABLE_32CORE}" "${configLangArgs32core[@]}"

Loading…
Cancel
Save