diff options
author | Sree Kuchibhotla <sreek@google.com> | 2016-04-12 17:40:24 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2016-04-12 17:40:24 -0700 |
commit | 478bd4449bf39a99abc0fa09749cd71c67a36241 (patch) | |
tree | 8f330af02d21d95eb98166ccc0476e869e29ccd2 /tools/run_tests | |
parent | c2b6a0bcf98fb3d153e319a4be255da8540977c8 (diff) |
Misc changes to stress test scripts
Diffstat (limited to 'tools/run_tests')
-rw-r--r-- | tools/run_tests/stress_test/configs/asan.json | 6 | ||||
-rw-r--r-- | tools/run_tests/stress_test/configs/opt.json | 2 | ||||
-rw-r--r-- | tools/run_tests/stress_test/configs/tsan.json | 6 | ||||
-rwxr-xr-x | tools/run_tests/stress_test/run_on_gke.py | 18 |
4 files changed, 25 insertions, 7 deletions
diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index 768088d93d..c558855314 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -11,13 +11,13 @@ "baseTemplates": { "default": { "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", - "pollIntervalSecs": 60, + "pollIntervalSecs": 120, "clientArgs": { "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", "metrics_port": 8081, - "metrics_collection_interval_secs":60 + "metrics_collection_interval_secs":120 }, "metricsPort": 8081, "metricsArgs": { @@ -66,7 +66,7 @@ "stress-client-asan": { "clientTemplate": "cxx_client_asan", "dockerImage": "grpc_stress_cxx_asan", - "numInstances": 20, + "numInstances": 5, "serverPodSpec": "stress-server-asan" } } diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index ffd4a704c3..75505186f2 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -66,7 +66,7 @@ "stress-client-opt": { "clientTemplate": "cxx_client_opt", "dockerImage": "grpc_stress_cxx_opt", - "numInstances": 10, + "numInstances": 15, "serverPodSpec": "stress-server-opt" } } diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index f8d3f878e1..a7ec08313d 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -11,13 +11,13 @@ "baseTemplates": { "default": { "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", - "pollIntervalSecs": 60, + "pollIntervalSecs": 120, "clientArgs": { "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", "metrics_port": 8081, - "metrics_collection_interval_secs":60 + "metrics_collection_interval_secs":120 }, "metricsPort": 8081, "metricsArgs": { @@ -66,7 +66,7 @@ "stress-client-tsan": { "clientTemplate": "cxx_client_tsan", "dockerImage": "grpc_stress_cxx_tsan", - "numInstances": 20, + "numInstances": 5, "serverPodSpec": "stress-server-tsan" } } diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py index db3ba28346..916c890cbd 100755 --- a/tools/run_tests/stress_test/run_on_gke.py +++ b/tools/run_tests/stress_test/run_on_gke.py @@ -604,6 +604,17 @@ def run_tests(config): return is_success +def tear_down(config): + gke = Gke(config.global_settings.gcp_project_id, '', '', + config.global_settings.summary_table_id, + config.global_settings.qps_table_id, + config.global_settings.kubernetes_proxy_port) + for name, server_pod_spec in config.server_pod_specs_dict.iteritems(): + gke.delete_servers(server_pod_spec) + for name, client_pod_spec in config.client_pod_specs_dict.iteritems(): + gke.delete_clients(client_pod_spec) + + argp = argparse.ArgumentParser( description='Launch stress tests in GKE', formatter_class=argparse.ArgumentDefaultsHelpFormatter) @@ -614,6 +625,7 @@ argp.add_argument('--config_file', required=True, type=str, help='The test config file') +argp.add_argument('--tear_down', action='store_true', default=False) if __name__ == '__main__': args = argp.parse_args() @@ -636,5 +648,11 @@ if __name__ == '__main__': os.path.dirname(sys.argv[0]), '../../..')) os.chdir(grpc_root) + # Note that tear_down is only in cases where we want to manually tear down a + # test that for some reason run_tests() could not cleanup + if args.tear_down: + tear_down(config) + sys.exit(1) + if not run_tests(config): sys.exit(1) |