aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-12 16:43:02 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-12 16:43:02 -0700
commitf03a8f8e40587cff4af3d23be6b87e366fbc3659 (patch)
treee74ba393adeb45c85bae404fa82f7227b37649d0 /tools
parent1c3dd002b9c1af714dc45050f49e9fd59e384abc (diff)
parentfba6475805eb85e781da0b1428869c72fe751b4e (diff)
Merge branch 'chttp2_timer' into timer
Diffstat (limited to 'tools')
-rwxr-xr-xtools/internal_ci/linux/grpc_interop_matrix.sh2
-rwxr-xr-xtools/interop_matrix/run_interop_matrix_tests.py22
-rw-r--r--tools/run_tests/generated/sources_and_headers.json4
-rw-r--r--tools/run_tests/generated/tests.json92
-rw-r--r--tools/run_tests/performance/massage_qps_stats.py7
-rw-r--r--tools/run_tests/performance/scenario_result_schema.json70
-rwxr-xr-xtools/run_tests/run_interop_tests.py2
-rwxr-xr-xtools/run_tests/run_tests.py2
8 files changed, 101 insertions, 100 deletions
diff --git a/tools/internal_ci/linux/grpc_interop_matrix.sh b/tools/internal_ci/linux/grpc_interop_matrix.sh
index e199d48931..6a9c38705a 100755
--- a/tools/internal_ci/linux/grpc_interop_matrix.sh
+++ b/tools/internal_ci/linux/grpc_interop_matrix.sh
@@ -22,4 +22,4 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_rc
-tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --report_file=sponge_log.xml $@
+tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --report_file=sponge_log.xml --bq_result_table interop_results $@
diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py
index 48c918d25d..d037e13921 100755
--- a/tools/interop_matrix/run_interop_matrix_tests.py
+++ b/tools/interop_matrix/run_interop_matrix_tests.py
@@ -36,6 +36,7 @@ sys.path.append(python_util_dir)
import dockerjob
import jobset
import report_utils
+import upload_test_results
_LANGUAGES = client_matrix.LANG_RUNTIME_MATRIX.keys()
# All gRPC release tags, flattened, deduped and sorted.
@@ -74,6 +75,11 @@ argp.add_argument('--allow_flakes',
const=True,
help=('Allow flaky tests to show as passing (re-runs failed '
'tests up to five times)'))
+argp.add_argument('--bq_result_table',
+ default='',
+ type=str,
+ nargs='?',
+ help='Upload test results to a specified BQ table.')
args = argp.parse_args()
@@ -117,7 +123,7 @@ def find_all_images_for_lang(lang):
# caches test cases (list of JobSpec) loaded from file. Keyed by lang and runtime.
_loaded_testcases = {}
-def find_test_cases(lang, release):
+def find_test_cases(lang, release, suite_name):
"""Returns the list of test cases from testcase files per lang/release."""
file_tmpl = os.path.join(os.path.dirname(__file__), 'testcases/%s__%s')
if not os.path.exists(file_tmpl % (lang, release)):
@@ -134,8 +140,12 @@ def find_test_cases(lang, release):
if line.startswith('docker run'):
m = re.search('--test_case=(.*)"', line)
shortname = m.group(1) if m else 'unknown_test'
+ m = re.search('--server_host_override=(.*).sandbox.googleapis.com',
+ line)
+ server = m.group(1) if m else 'unknown_server'
spec = jobset.JobSpec(cmdline=line,
- shortname=shortname,
+ shortname='%s:%s:%s:%s' % (suite_name, lang,
+ server, shortname),
timeout_seconds=_TEST_TIMEOUT,
shell=True,
flake_retries=5 if args.allow_flakes else 0)
@@ -163,11 +173,15 @@ def run_tests_for_lang(lang, runtime, images):
# Download the docker image before running each test case.
subprocess.check_call(['gcloud', 'docker', '--', 'pull', image])
_docker_images_cleanup.append(image)
- job_spec_list = find_test_cases(lang,release)
+ suite_name = '%s__%s_%s' % (lang, runtime, release)
+ job_spec_list = find_test_cases(lang, release, suite_name)
num_failures, resultset = jobset.run(job_spec_list,
newline_on_success=True,
add_env={'docker_image':image},
maxjobs=args.jobs)
+ if args.bq_result_table and resultset:
+ upload_test_results.upload_interop_results_to_bq(
+ resultset, args.bq_result_table, args)
if num_failures:
jobset.message('FAILED', 'Some tests failed', do_newline=True)
total_num_failures += num_failures
@@ -178,7 +192,7 @@ def run_tests_for_lang(lang, runtime, images):
_xml_report_tree,
resultset,
'grpc_interop_matrix',
- '%s__%s %s'%(lang,runtime,release),
+ suite_name,
str(uuid.uuid4()))
return total_num_failures
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 88356acd82..2e18ed2e8a 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -7485,7 +7485,9 @@
"third_party/cares/cares/config-win32.h",
"third_party/cares/cares/setup_once.h",
"third_party/cares/config_darwin/ares_config.h",
- "third_party/cares/config_linux/ares_config.h"
+ "third_party/cares/config_freebsd/ares_config.h",
+ "third_party/cares/config_linux/ares_config.h",
+ "third_party/cares/config_openbsd/ares_config.h"
],
"is_filegroup": false,
"language": "c",
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 00df43f83f..452afc7d96 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -29978,52 +29978,6 @@
},
{
"args": [
- "write_buffering"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "inproc_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "write_buffering_at_end"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "inproc_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
"authority_not_supported"
],
"ci_platforms": [
@@ -48361,52 +48315,6 @@
},
{
"args": [
- "write_buffering"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "inproc_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
- "write_buffering_at_end"
- ],
- "ci_platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "language": "c",
- "name": "inproc_nosec_test",
- "platforms": [
- "windows",
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_1channel_100rpcs_1MB\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
diff --git a/tools/run_tests/performance/massage_qps_stats.py b/tools/run_tests/performance/massage_qps_stats.py
index ebbfe6c26c..48c57581a5 100644
--- a/tools/run_tests/performance/massage_qps_stats.py
+++ b/tools/run_tests/performance/massage_qps_stats.py
@@ -101,6 +101,10 @@ def massage_qps_stats(scenario_result):
stats["core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_items")
stats["core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_final_items")
stats["core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_offloaded")
+ stats["core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_initiated")
+ stats["core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_scheduled_items")
+ stats["core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_set_notify_on_cancel")
+ stats["core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_cancelled")
stats["core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_short_items")
stats["core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_long_items")
stats["core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_to_self")
@@ -109,6 +113,9 @@ def massage_qps_stats(scenario_result):
stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter(core_stats, "executor_push_retries")
stats["core_server_requested_calls"] = massage_qps_stats_helpers.counter(core_stats, "server_requested_calls")
stats["core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(core_stats, "server_slowpath_requests_queued")
+ stats["core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_failures")
+ stats["core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_successes")
+ stats["core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_transient_pop_failures")
h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size")
stats["core_call_initial_size"] = ",".join("%f" % x for x in h.buckets)
stats["core_call_initial_size_bkts"] = ",".join("%f" % x for x in h.boundaries)
diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json
index 169221d18c..b00c2eed16 100644
--- a/tools/run_tests/performance/scenario_result_schema.json
+++ b/tools/run_tests/performance/scenario_result_schema.json
@@ -517,6 +517,26 @@
},
{
"mode": "NULLABLE",
+ "name": "core_call_combiner_locks_initiated",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_locks_scheduled_items",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_set_notify_on_cancel",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_cancelled",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_executor_scheduled_short_items",
"type": "INTEGER"
},
@@ -557,6 +577,21 @@
},
{
"mode": "NULLABLE",
+ "name": "core_cq_ev_queue_trylock_failures",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_cq_ev_queue_trylock_successes",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_cq_ev_queue_transient_pop_failures",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_call_initial_size",
"type": "STRING"
},
@@ -1314,6 +1349,26 @@
},
{
"mode": "NULLABLE",
+ "name": "core_call_combiner_locks_initiated",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_locks_scheduled_items",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_set_notify_on_cancel",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_call_combiner_cancelled",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_executor_scheduled_short_items",
"type": "INTEGER"
},
@@ -1354,6 +1409,21 @@
},
{
"mode": "NULLABLE",
+ "name": "core_cq_ev_queue_trylock_failures",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_cq_ev_queue_trylock_successes",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
+ "name": "core_cq_ev_queue_transient_pop_failures",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_call_initial_size",
"type": "STRING"
},
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index 192f8e76eb..4dd982756d 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -677,7 +677,7 @@ def cloud_to_prod_jobspec(language, test_case, server_host_name,
cmdline=cmdline,
cwd=cwd,
environ=environ,
- shortname='%s:%s:%s:%s' % (suite_name, server_host_name, language,
+ shortname='%s:%s:%s:%s' % (suite_name, language, server_host_name,
test_case),
timeout_seconds=_TEST_TIMEOUT,
flake_retries=5 if args.allow_flakes else 0,
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 7c65067857..ea21c81875 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -286,7 +286,7 @@ class CLanguage(object):
continue
polling_strategies = (_POLLING_STRATEGIES.get(self.platform, ['all'])
if target.get('uses_polling', True)
- else ['all'])
+ else ['none'])
if self.args.iomgr_platform == 'uv':
polling_strategies = ['all']
for polling_strategy in polling_strategies: