diff --git a/build.yaml b/build.yaml index 8c27c8e3da2..a2bbcaf41db 100644 --- a/build.yaml +++ b/build.yaml @@ -3638,6 +3638,7 @@ targets: - name: generic_end2end_test build: test language: c++ + cpu_cost: 0.1 src: - test/cpp/end2end/generic_end2end_test.cc deps: @@ -3743,6 +3744,7 @@ targets: - name: grpc_tool_test build: test language: c++ + cpu_cost: 0.2 src: - src/proto/grpc/testing/echo.proto - src/proto/grpc/testing/echo_messages.proto @@ -3771,9 +3773,9 @@ targets: - grpc++ - grpc - name: grpclb_test + cpu_cost: 0.1 build: test language: c++ - cpu_cost: 0.1 src: - src/proto/grpc/lb/v1/load_balancer.proto - test/cpp/grpclb/grpclb_test.cc @@ -4263,7 +4265,7 @@ targets: - gpr_test_util - gpr - name: writes_per_rpc_test - cpu_cost: 0.5 + cpu_cost: 0.8 build: test language: c++ src: diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py index 805b0faeece..2edcb86a684 100755 --- a/test/cpp/qps/gen_build_yaml.py +++ b/test/cpp/qps/gen_build_yaml.py @@ -65,6 +65,8 @@ def _scenario_json_string(scenario_json, is_tsan): def threads_required(scenario_json, where, is_tsan): scenario_json = mutate_scenario(scenario_json, is_tsan) + if scenario_json['client_config']['outstanding_rpcs_per_channel'] == 1 and scenario_json['client_config']['client_channels'] == 1: + return 0.4 if scenario_json['%s_config' % where]['%s_type' % where] == 'ASYNC_%s' % where.upper(): if scenario_json['client_config']['client_channels'] == 1: return 1 return scenario_json['%s_config' % where].get('async_%s_threads' % where, 0) diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index a5bc8fa0ea5..daa9f5b0e66 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -2613,7 +2613,7 @@ "posix", "windows" ], - "cpu_cost": 0.6, + "cpu_cost": 0.8, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -2964,7 +2964,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.5, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -3225,7 +3225,7 @@ "posix", "windows" ], - "cpu_cost": 0.5, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -3381,7 +3381,7 @@ "posix", "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -3832,7 +3832,7 @@ "mac", "posix" ], - "cpu_cost": 0.5, + "cpu_cost": 0.8, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, @@ -41274,7 +41274,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41476,7 +41476,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41528,7 +41528,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41553,7 +41553,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41603,7 +41603,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41653,7 +41653,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41753,7 +41753,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -41853,7 +41853,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42055,7 +42055,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42107,7 +42107,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42132,7 +42132,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42182,7 +42182,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42232,7 +42232,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42332,7 +42332,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "tsan", @@ -42432,7 +42432,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -42730,7 +42730,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -42806,7 +42806,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -42843,7 +42843,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -42917,7 +42917,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -42991,7 +42991,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43139,7 +43139,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43287,7 +43287,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43585,7 +43585,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43661,7 +43661,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43698,7 +43698,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43772,7 +43772,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43846,7 +43846,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", @@ -43994,7 +43994,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 2, + "cpu_cost": 0.8, "defaults": "boringssl", "exclude_configs": [ "asan-noleaks", diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index cfa7071e002..32da7fb02a2 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1466,7 +1466,7 @@ def _build_and_run( # When running on travis, we want out test runs to be as similar as possible # for reproducibility purposes. if args.travis: - massaged_one_run = sorted(one_run, key=lambda x: x.shortname) + massaged_one_run = sorted(one_run, key=lambda x: (x.cpu_cost, x.shortname)) else: # whereas otherwise, we want to shuffle things up to give all tests a # chance to run.