scheduler benchmark: allow to override bench prefix

Right now, hack/jenkins/dockerized.sh is solely utilized by scheduler perf jenkins job.
There's an effort to extend the scheduler performance suite. In order to run
individual subsuites separately, we need a way to select a subset of benchmark tests
to be run. Golang exposes -bench option which allows to specify a prefix
of benchmark tests to be run.
This commit is contained in:
Jan Chaloupka 2019-12-04 18:45:46 +01:00
parent f4caa62593
commit f967c544ad

View File

@ -22,7 +22,7 @@ set -o xtrace
retry() {
for i in {1..5}; do
if "$@"
then
then
return 0
else
sleep "${i}"
@ -59,7 +59,7 @@ cd "${GOPATH}/src/k8s.io/kubernetes"
./hack/install-etcd.sh
# Run the benchmark tests and pretty-print the results into a separate file.
make test-integration WHAT="$*" KUBE_TEST_ARGS="-run='XXX' -bench=. -benchmem -alsologtostderr=false -logtostderr=false" \
make test-integration WHAT="$*" KUBE_TEST_ARGS="-run='XXX' -bench=${TEST_PREFIX:-.} -benchmem -alsologtostderr=false -logtostderr=false" \
| (go run test/integration/benchmark/extractlog/main.go) \
| tee \
>(prettybench -no-passthrough > "${ARTIFACTS}/BenchmarkResults.txt") \