@@ -19,7 +19,6 @@ cd "$(dirname "$0")/../../.."
19
19
20
20
source tools/internal_ci/helper_scripts/prepare_build_linux_rc
21
21
22
-
23
22
# Environment variables to select repos and branches for various repos.
24
23
# You can edit these lines if you want to run from a fork.
25
24
GRPC_CORE_REPO=grpc/grpc
@@ -43,20 +42,20 @@ gcloud auth configure-docker
43
42
# Connect to benchmarks-prod2 cluster.
44
43
gcloud config set project grpc-testing
45
44
gcloud container clusters get-credentials benchmarks-prod2 \
46
- --zone us-central1-b --project grpc-testing
45
+ --zone us-central1-b --project grpc-testing
47
46
48
47
# Set up environment variables.
49
48
LOAD_TEST_PREFIX=" ${KOKORO_BUILD_INITIATOR} "
50
49
# BEGIN differentiate experimental configuration from master configuration.
51
50
if [[ " ${KOKORO_BUILD_INITIATOR%% -* } " == kokoro && " ${KOKORO_GITHUB_COMMIT_URL%/* } " == " https://github.com/grpc/grpc/commit" ]]; then
52
- # Use "official" BQ tables only for builds initiated by Kokoro and running
53
- # from grpc/grpc. These results show up in the "official" public dashboard.
54
- BIGQUERY_TABLE_8CORE=e2e_benchmarks.ci_master_results_8core
55
- BIGQUERY_TABLE_32CORE=e2e_benchmarks.ci_master_results_32core
51
+ # Use "official" BQ tables only for builds initiated by Kokoro and running
52
+ # from grpc/grpc. These results show up in the "official" public dashboard.
53
+ BIGQUERY_TABLE_8CORE=e2e_benchmarks.ci_master_results_8core
54
+ BIGQUERY_TABLE_32CORE=e2e_benchmarks.ci_master_results_32core
56
55
else
57
- # Use experimental BQ tables otherwise.
58
- BIGQUERY_TABLE_8CORE=e2e_benchmarks.experimental_results
59
- BIGQUERY_TABLE_32CORE=e2e_benchmarks.experimental_results_32core
56
+ # Use experimental BQ tables otherwise.
57
+ BIGQUERY_TABLE_8CORE=e2e_benchmarks.experimental_results
58
+ BIGQUERY_TABLE_32CORE=e2e_benchmarks.experimental_results_32core
60
59
fi
61
60
# END differentiate experimental configuration from master configuration.
62
61
CLOUD_LOGGING_URL=" https://source.cloud.google.com/results/invocations/${KOKORO_BUILD_ID} "
@@ -67,9 +66,9 @@ ROOT_DIRECTORY_OF_DOCKERFILES="../test-infra/containers/pre_built_workers/"
67
66
GRPC_COMMIT=" $( git show --format=" %H" --no-patch) "
68
67
# Prebuilt workers for core languages are always built from grpc/grpc.
69
68
if [[ " ${KOKORO_GITHUB_COMMIT_URL%/* } " == " https://github.com/grpc/grpc/commit" ]]; then
70
- GRPC_CORE_COMMIT=" ${KOKORO_GIT_COMMIT} "
69
+ GRPC_CORE_COMMIT=" ${KOKORO_GIT_COMMIT} "
71
70
else
72
- GRPC_CORE_COMMIT=" $( git ls-remote -h " https://github.com/${GRPC_CORE_REPO} .git" " ${GRPC_CORE_GITREF} " | cut -f1) "
71
+ GRPC_CORE_COMMIT=" $( git ls-remote -h " https://github.com/${GRPC_CORE_REPO} .git" " ${GRPC_CORE_GITREF} " | cut -f1) "
73
72
fi
74
73
75
74
GRPC_DOTNET_COMMIT=" $( git ls-remote " https://github.com/${GRPC_DOTNET_REPO} .git" " ${GRPC_DOTNET_GITREF} " | cut -f1) "
94
93
95
94
# Build test configurations.
96
95
buildConfigs () {
97
- local -r pool=" $1 "
98
- local -r table=" $2 "
99
- shift 2
100
- tools/run_tests/performance/loadtest_config.py " $@ " \
101
- -t ./tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml \
102
- -s driver_pool=" ${DRIVER_POOL} " -s driver_image= \
103
- -s client_pool=" ${pool} " -s server_pool=" ${pool} " \
104
- -s big_query_table=" ${table} " -s timeout_seconds=900 \
105
- -s prebuilt_image_prefix=" ${PREBUILT_IMAGE_PREFIX} " \
106
- -s prebuilt_image_tag=" ${UNIQUE_IDENTIFIER} " \
107
- -a ci_buildNumber=" ${KOKORO_BUILD_NUMBER} " \
108
- -a ci_buildUrl=" ${CLOUD_LOGGING_URL} " \
109
- -a ci_jobName=" ${KOKORO_JOB_NAME} " \
110
- -a ci_gitCommit=" ${GRPC_COMMIT} " \
111
- -a ci_gitCommit_core=" ${GRPC_CORE_COMMIT} " \
112
- -a ci_gitCommit_dotnet=" ${GRPC_DOTNET_COMMIT} " \
113
- -a ci_gitCommit_go=" ${GRPC_GO_COMMIT} " \
114
- -a ci_gitCommit_java=" ${GRPC_JAVA_COMMIT} " \
115
- -a ci_gitActualCommit=" ${KOKORO_GIT_COMMIT} " \
116
- --prefix=" ${LOAD_TEST_PREFIX} " -u " ${UNIQUE_IDENTIFIER} " -u " ${pool} " \
117
- -a pool=" ${pool} " --category=scalable \
118
- --allow_client_language=c++ --allow_server_language=c++ \
119
- --allow_server_language=node \
120
- -o " loadtest_with_prebuilt_workers_${pool} .yaml"
96
+ local -r pool=" $1 "
97
+ local -r table=" $2 "
98
+ shift 2
99
+ tools/run_tests/performance/loadtest_config.py " $@ " \
100
+ -t ./tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml \
101
+ -s driver_pool=" ${DRIVER_POOL} " -s driver_image= \
102
+ -s client_pool=" ${pool} " -s server_pool=" ${pool} " \
103
+ -s big_query_table=" ${table} " -s timeout_seconds=900 \
104
+ -s prebuilt_image_prefix=" ${PREBUILT_IMAGE_PREFIX} " \
105
+ -s prebuilt_image_tag=" ${UNIQUE_IDENTIFIER} " \
106
+ -a ci_buildNumber=" ${KOKORO_BUILD_NUMBER} " \
107
+ -a ci_buildUrl=" ${CLOUD_LOGGING_URL} " \
108
+ -a ci_jobName=" ${KOKORO_JOB_NAME} " \
109
+ -a ci_gitCommit=" ${GRPC_COMMIT} " \
110
+ -a ci_gitCommit_core=" ${GRPC_CORE_COMMIT} " \
111
+ -a ci_gitCommit_dotnet=" ${GRPC_DOTNET_COMMIT} " \
112
+ -a ci_gitCommit_go=" ${GRPC_GO_COMMIT} " \
113
+ -a ci_gitCommit_java=" ${GRPC_JAVA_COMMIT} " \
114
+ -a ci_gitActualCommit=" ${KOKORO_GIT_COMMIT} " \
115
+ --prefix=" ${LOAD_TEST_PREFIX} " -u " ${UNIQUE_IDENTIFIER} " -u " ${pool} " \
116
+ -a pool=" ${pool} " --category=scalable \
117
+ --allow_client_language=c++ --allow_server_language=c++ \
118
+ --allow_server_language=node \
119
+ -o " loadtest_with_prebuilt_workers_${pool} .yaml"
121
120
}
122
121
123
122
# Add languages
@@ -126,61 +125,61 @@ declare -a configLangArgs32core=()
126
125
declare -a runnerLangArgs=()
127
126
128
127
# c++
129
- configLangArgs8core+=( -l c++ )
130
- configLangArgs32core+=( -l c++ )
131
- runnerLangArgs+=( -l " cxx:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
128
+ configLangArgs8core+=(-l c++)
129
+ configLangArgs32core+=(-l c++)
130
+ runnerLangArgs+=(-l " cxx:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
132
131
133
132
# dotnet
134
133
# configLangArgs8core+=( -l dotnet )
135
134
# configLangArgs32core+=( -l dotnet )
136
135
# runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" )
137
136
138
137
# # go
139
- configLangArgs8core+=( -l go )
140
- configLangArgs32core+=( -l go )
141
- runnerLangArgs+=( -l " go:${GRPC_GO_REPO} :${GRPC_GO_COMMIT} " )
138
+ configLangArgs8core+=(-l go)
139
+ configLangArgs32core+=(-l go)
140
+ runnerLangArgs+=(-l " go:${GRPC_GO_REPO} :${GRPC_GO_COMMIT} " )
142
141
143
142
# java
144
- configLangArgs8core+=( -l java )
145
- configLangArgs32core+=( -l java )
146
- runnerLangArgs+=( -l " java:${GRPC_JAVA_REPO} :${GRPC_JAVA_COMMIT} " )
143
+ configLangArgs8core+=(-l java)
144
+ configLangArgs32core+=(-l java)
145
+ runnerLangArgs+=(-l " java:${GRPC_JAVA_REPO} :${GRPC_JAVA_COMMIT} " )
147
146
148
147
# node
149
- configLangArgs8core+=( -l node ) # 8-core only.
150
- runnerLangArgs+=( -l " node:${GRPC_NODE_REPO} :${GRPC_NODE_COMMIT} " )
148
+ configLangArgs8core+=(-l node) # 8-core only.
149
+ runnerLangArgs+=(-l " node:${GRPC_NODE_REPO} :${GRPC_NODE_COMMIT} " )
151
150
152
151
# python
153
- configLangArgs8core+=( -l python ) # 8-core only.
154
- runnerLangArgs+=( -l " python:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
152
+ configLangArgs8core+=(-l python) # 8-core only.
153
+ runnerLangArgs+=(-l " python:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
155
154
156
155
# ruby
157
- configLangArgs8core+=( -l ruby ) # 8-core only.
158
- runnerLangArgs+=( -l " ruby:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
156
+ configLangArgs8core+=(-l ruby) # 8-core only.
157
+ runnerLangArgs+=(-l " ruby:${GRPC_CORE_REPO} :${GRPC_CORE_COMMIT} " )
159
158
160
159
buildConfigs " ${WORKER_POOL_8CORE} " " ${BIGQUERY_TABLE_8CORE} " " ${configLangArgs8core[@]} "
161
160
buildConfigs " ${WORKER_POOL_32CORE} " " ${BIGQUERY_TABLE_32CORE} " " ${configLangArgs32core[@]} "
162
161
163
162
# Delete prebuilt images on exit.
164
163
deleteImages () {
165
- echo " deleting images on exit"
166
- ../test-infra/bin/delete_prebuilt_workers \
164
+ echo " deleting images on exit"
165
+ ../test-infra/bin/delete_prebuilt_workers \
167
166
-p " ${PREBUILT_IMAGE_PREFIX} " \
168
167
-t " ${UNIQUE_IDENTIFIER} "
169
168
}
170
169
trap deleteImages EXIT
171
170
172
171
# Build and push prebuilt images for running tests.
173
172
time ../test-infra/bin/prepare_prebuilt_workers " ${runnerLangArgs[@]} " \
174
- -p " ${PREBUILT_IMAGE_PREFIX} " \
175
- -t " ${UNIQUE_IDENTIFIER} " \
176
- -r " ${ROOT_DIRECTORY_OF_DOCKERFILES} "
173
+ -p " ${PREBUILT_IMAGE_PREFIX} " \
174
+ -t " ${UNIQUE_IDENTIFIER} " \
175
+ -r " ${ROOT_DIRECTORY_OF_DOCKERFILES} "
177
176
178
177
# Run tests.
179
178
time ../test-infra/bin/runner \
180
- -i " loadtest_with_prebuilt_workers_${WORKER_POOL_8CORE} .yaml" \
181
- -i " loadtest_with_prebuilt_workers_${WORKER_POOL_32CORE} .yaml" \
182
- -log-url-prefix " ${LOG_URL_PREFIX} " \
183
- -polling-interval 5s \
184
- -delete-successful-tests \
185
- -c " ${WORKER_POOL_8CORE} :2" -c " ${WORKER_POOL_32CORE} :2" \
186
- -o " runner/sponge_log.xml"
179
+ -i " loadtest_with_prebuilt_workers_${WORKER_POOL_8CORE} .yaml" \
180
+ -i " loadtest_with_prebuilt_workers_${WORKER_POOL_32CORE} .yaml" \
181
+ -log-url-prefix " ${LOG_URL_PREFIX} " \
182
+ -polling-interval 5s \
183
+ -delete-successful-tests \
184
+ -c " ${WORKER_POOL_8CORE} :2" -c " ${WORKER_POOL_32CORE} :2" \
185
+ -o " runner/sponge_log.xml"
0 commit comments