summaryrefslogtreecommitdiffhomepage
path: root/scripts/benchmark.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/benchmark.sh')
-rwxr-xr-xscripts/benchmark.sh33
1 files changed, 9 insertions, 24 deletions
diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh
index e0f6df438..c49f988b8 100755
--- a/scripts/benchmark.sh
+++ b/scripts/benchmark.sh
@@ -16,30 +16,15 @@
source $(dirname $0)/common.sh
-# gcloud may be installed as a "snap". If it is, include it in PATH.
-declare -r snap="/snap/bin"
-if [[ -d "${snap}" ]]; then
- export PATH="${PATH}:${snap}"
-fi
-
-# Make sure we can find gcloud and exit if not.
-which gcloud
+make load-all-images
-# Exporting for subprocesses as GCP APIs and tools check this environmental
-# variable for authentication.
-export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_KEYSTORE_DIR}/${GCLOUD_CREDENTIALS}"
-
-gcloud auth activate-service-account \
- --key-file "${GOOGLE_APPLICATION_CREDENTIALS}"
+if [[ -z "${1:-}" ]]; then
+ target=$(query "attr(tags, manual, tests(//test/benchmarks/...))")
+else
+ target="$1"
+fi
-gcloud config set project ${PROJECT}
-gcloud config set compute/zone ${ZONE}
+install_runsc_for_benchmarks benchmark
-bazel run //benchmarks:benchmarks -- \
- --verbose \
- run-gcp \
- "(startup|absl)" \
- --internal \
- --runtime=runc \
- --runtime=runsc \
- --installers=head
+echo $target
+benchmark_runsc $target "${@:2}"