Add load test that measures QPS for dashboard display. (#26153)

This changes adds a test that measures QPS. The tests currently running measure latency, which is more variable.
pull/26161/head
Paulo Castello da Costa 4 years ago committed by GitHub
parent 4c53304dcf
commit 1c49176a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tools/internal_ci/linux/grpc_e2e_performance_v2.sh
  2. 16
      tools/run_tests/performance/loadtest_config.py

@ -31,12 +31,12 @@ gcloud container clusters get-credentials benchmarks-prod \
# This is subject to change. Runs a single test and does not wait for the # This is subject to change. Runs a single test and does not wait for the
# result. # result.
tools/run_tests/performance/loadtest_config.py -l go \ tools/run_tests/performance/loadtest_config.py -l c++ -l go \
-t ./tools/run_tests/performance/templates/loadtest_template_basic_all_languages.yaml \ -t ./tools/run_tests/performance/templates/loadtest_template_basic_all_languages.yaml \
-s client_pool=workers-8core -s server_pool=workers-8core \ -s client_pool=workers-8core -s server_pool=workers-8core \
-s big_query_table=e2e_benchmarks.experimental_results \ -s big_query_table=e2e_benchmarks.experimental_results \
-s timeout_seconds=900 --prefix="kokoro-test" -u "$(date +%Y%m%d%H%M%S)" \ -s timeout_seconds=900 --prefix="kokoro-test" -u "$(date +%Y%m%d%H%M%S)" \
-r '(go_generic_sync_streaming_ping_pong_secure|go_protobuf_sync_unary_ping_pong_secure)' \ -r '(go_generic_sync_streaming_ping_pong_secure|go_protobuf_sync_unary_ping_pong_secure|cpp_protobuf_async_streaming_qps_unconstrained_secure)$' \
-o ./loadtest.yaml -o ./loadtest.yaml
# Dump the contents of the loadtest.yaml (since loadtest_config.py doesn't # Dump the contents of the loadtest.yaml (since loadtest_config.py doesn't

@ -44,6 +44,19 @@ CONFIGURATION_FILE_HEADER_COMMENT = """
# https://github.com/grpc/grpc/blob/master/tools/run_tests/performance/README.md#grpc-oss-benchmarks # https://github.com/grpc/grpc/blob/master/tools/run_tests/performance/README.md#grpc-oss-benchmarks
""" """
# TODO(paulosjca): Merge label_language and image_language into one function.
# These functions are necessary because 'c++' is not allowed as a label value in
# kubernetes, and because languages share images in the existing templates. Once
# the templates are reorganized and most image mapping is removed, the two
# functions can be merged into one.
def label_language(language: str) -> str:
"""Convert scenario language to place in a resource label."""
return {
'c++': 'cxx',
}.get(language, language)
def image_language(language: str) -> str: def image_language(language: str) -> str:
"""Convert scenario languages to image languages.""" """Convert scenario languages to image languages."""
@ -159,7 +172,8 @@ def gen_loadtest_configs(
metadata['name'] = name metadata['name'] = name
if 'labels' not in metadata: if 'labels' not in metadata:
metadata['labels'] = dict() metadata['labels'] = dict()
metadata['labels']['language'] = language_config.language metadata['labels']['language'] = label_language(
language_config.language)
metadata['labels']['prefix'] = prefix metadata['labels']['prefix'] = prefix
if 'annotations' not in metadata: if 'annotations' not in metadata:
metadata['annotations'] = dict() metadata['annotations'] = dict()

Loading…
Cancel
Save