scheduler_perf: allow to override the default benchtime

The new benchmark requires the benchtime to be set to a very small number
so each test is run at most once. Some machines can have too powerfull resources
and decrease running time of some tests under the default 1s. Also, the old suite
expects the benchtime to be set to 1s. Allow to override the benchtime for the
new test suite will allow to run the same script from both suites.
This commit is contained in:
Jan Chaloupka 2020-02-24 19:18:47 +01:00
parent 94837daab2
commit b50f60c98f

View File

@ -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=${TEST_PREFIX:-.} -benchmem -alsologtostderr=false -logtostderr=false -data-items-dir=${ARTIFACTS}" \
make test-integration WHAT="$*" KUBE_TEST_ARGS="-run='XXX' -bench=${TEST_PREFIX:-.} -benchtime=${BENCHTIME:-1s} -benchmem -alsologtostderr=false -logtostderr=false -data-items-dir=${ARTIFACTS}" \
| (go run test/integration/benchmark/extractlog/main.go) \
| tee \
>(prettybench -no-passthrough > "${ARTIFACTS}/BenchmarkResults.txt") \