From edb1468e869a6bab421f653f38596d6303976672 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Sat, 15 Feb 2020 01:50:29 +0000 Subject: [PATCH] test: use a live endpoint for performance benchmarks (#62) * feat: live perf tests * fix: add logging to ensure running * fix: blacken * fix: remove debug content * fix: remove unused import --- .kokoro/continuous/storage_perf_bench.cfg | 1 + tests/perf/benchwrapper.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .kokoro/continuous/storage_perf_bench.cfg diff --git a/.kokoro/continuous/storage_perf_bench.cfg b/.kokoro/continuous/storage_perf_bench.cfg new file mode 100644 index 000000000..8f43917d9 --- /dev/null +++ b/.kokoro/continuous/storage_perf_bench.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/tests/perf/benchwrapper.py b/tests/perf/benchwrapper.py index 9ebb3f455..c81d6bb20 100644 --- a/tests/perf/benchwrapper.py +++ b/tests/perf/benchwrapper.py @@ -2,7 +2,6 @@ import sys import time import grpc -import os from concurrent import futures import storage_pb2_grpc import storage_pb2 @@ -12,10 +11,10 @@ parser = argparse.ArgumentParser() -if os.environ.get("STORAGE_EMULATOR_HOST") is None: - sys.exit( - "This benchmarking server only works when connected to an emulator. Please set STORAGE_EMULATOR_HOST." - ) +# if os.environ.get("STORAGE_EMULATOR_HOST") is None: +# sys.exit( +# "This benchmarking server only works when connected to an emulator. Please set STORAGE_EMULATOR_HOST." +# ) parser.add_argument("--port", help="The port to run on.") @@ -24,7 +23,8 @@ if args.port is None: sys.exit("Usage: python3 main.py --port 8081") -client = storage.Client.create_anonymous_client() +# client = storage.Client.create_anonymous_client() +client = storage.Client() class StorageBenchWrapperServicer(storage_pb2_grpc.StorageBenchWrapperServicer):