diff options
author | Zach Koopmans <zkoopmans@google.com> | 2020-07-13 13:23:50 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-13 13:29:30 -0700 |
commit | b8d3d09bd16f1f6d684ce2ca6f16109567cb0fc2 (patch) | |
tree | bfe9865e48342ce87d7575c249502061754fb765 /scripts/benchmark.sh | |
parent | 505b4f5e5f84f5379720966b6b5adaf00178690c (diff) |
Initial golang Benchmarks
PiperOrigin-RevId: 321021071
Diffstat (limited to 'scripts/benchmark.sh')
-rwxr-xr-x | scripts/benchmark.sh | 33 |
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}" |