From 94be30a18dc7c75dc70716ce1ede74a7fb1352fb Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Thu, 16 Jan 2020 13:00:58 -0800 Subject: Add run-gcp command. Add command to run benchmarks on GCP backed machines using the gcloud producer. Run with: `bazel run :benchmarks -- run-gcp [BENCHMARK_NAME]` Tested with the startup benchmark. PiperOrigin-RevId: 290126444 --- benchmarks/harness/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'benchmarks/harness/__init__.py') diff --git a/benchmarks/harness/__init__.py b/benchmarks/harness/__init__.py index 7b96d1666..61fd25f73 100644 --- a/benchmarks/harness/__init__.py +++ b/benchmarks/harness/__init__.py @@ -13,6 +13,7 @@ # limitations under the License. """Core benchmark utilities.""" +import getpass import os # LOCAL_WORKLOADS_PATH defines the path to use for local workloads. This is a @@ -23,3 +24,9 @@ LOCAL_WORKLOADS_PATH = os.path.join( # REMOTE_WORKLOADS_PATH defines the path to use for storing the workloads on the # remote host. This is a format string that accepts a single string parameter. REMOTE_WORKLOADS_PATH = "workloads/{}" + +# DEFAULT_USER is the default user running this script. +DEFAULT_USER = getpass.getuser() + +# DEFAULT_USER_HOME is the home directory of the user running the script. +DEFAULT_USER_HOME = os.environ["HOME"] if "HOME" in os.environ else "" -- cgit v1.2.3