Merge pull request #8123 from ctiller/outstanding_sweeps

Add sweeps over outstanding request count
pull/7991/head^2
Nicolas Noble 9 years ago committed by GitHub
commit d72df881d6
  1. 34
      tools/run_tests/performance/scenario_config.py
  2. 4
      tools/run_tests/run_performance_tests.py
  3. 2990
      tools/run_tests/tests.json

@ -38,6 +38,7 @@ BENCHMARK_SECONDS=30
SMOKETEST='smoketest' SMOKETEST='smoketest'
SCALABLE='scalable' SCALABLE='scalable'
SWEEP='sweep' SWEEP='sweep'
DEFAULT_CATEGORIES=[SCALABLE, SMOKETEST]
SECURE_SECARGS = {'use_test_ca': True, SECURE_SECARGS = {'use_test_ca': True,
'server_host_override': 'foo.test.google.fr'} 'server_host_override': 'foo.test.google.fr'}
@ -94,6 +95,13 @@ def remove_nonproto_fields(scenario):
return scenario return scenario
def geometric_progression(start, stop, step):
n = start
while n < stop:
yield int(round(n))
n *= step
def _ping_pong_scenario(name, rpc_type, def _ping_pong_scenario(name, rpc_type,
client_type, server_type, client_type, server_type,
secure=True, secure=True,
@ -104,8 +112,9 @@ def _ping_pong_scenario(name, rpc_type,
server_core_limit=0, server_core_limit=0,
async_server_threads=0, async_server_threads=0,
warmup_seconds=WARMUP_SECONDS, warmup_seconds=WARMUP_SECONDS,
categories=[], categories=DEFAULT_CATEGORIES,
channels=None): channels=None,
outstanding=None):
"""Creates a basic ping pong scenario.""" """Creates a basic ping pong scenario."""
scenario = { scenario = {
'name': name, 'name': name,
@ -142,8 +151,9 @@ def _ping_pong_scenario(name, rpc_type,
scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD
if unconstrained_client: if unconstrained_client:
outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client]
wide = channels if channels is not None else WIDE wide = channels if channels is not None else WIDE
deep = int(math.ceil(1.0 * OUTSTANDING_REQUESTS[unconstrained_client] / wide)) deep = int(math.ceil(1.0 * outstanding_calls / wide))
scenario['num_clients'] = 0 # use as many client as available. scenario['num_clients'] = 0 # use as many client as available.
scenario['client_config']['outstanding_rpcs_per_channel'] = deep scenario['client_config']['outstanding_rpcs_per_channel'] = deep
@ -245,13 +255,17 @@ class CXXLanguage:
secure=secure, secure=secure,
categories=[SCALABLE]) categories=[SCALABLE])
for channels in [1, 3, 10, 31, 100, 316, 1000]: for channels in geometric_progression(1, 500, math.sqrt(10)):
yield _ping_pong_scenario( for outstanding in geometric_progression(1, 20000, math.sqrt(10)):
'cpp_protobuf_%s_unary_qps_unconstrained_%s_%d_channels' % (synchronicity, secstr, channels), if synchronicity == 'sync' and outstanding > 1200: continue
rpc_type='UNARY', if outstanding < channels: continue
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', yield _ping_pong_scenario(
unconstrained_client=synchronicity, secure=secure, 'cpp_protobuf_%s_unary_qps_unconstrained_%s_%d_channels_%d_outstanding' % (synchronicity, secstr, channels, outstanding),
categories=[SWEEP], channels=channels) rpc_type='UNARY',
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
unconstrained_client=synchronicity, secure=secure,
categories=[SWEEP], channels=channels, outstanding=outstanding)
def __str__(self): def __str__(self):
return 'c++' return 'c++'

@ -312,8 +312,8 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
for language in languages: for language in languages:
for scenario_json in language.scenarios(): for scenario_json in language.scenarios():
if re.search(args.regex, scenario_json['name']): if re.search(args.regex, scenario_json['name']):
categories = scenario_json.get('CATEGORIES', []) categories = scenario_json.get('CATEGORIES', ['scalable', 'smoketest'])
if category in categories or (category == 'all' and categories != ['sweep']): if category in categories or category == 'all':
workers = workers_by_lang[str(language)][:] workers = workers_by_lang[str(language)][:]
# 'SERVER_LANGUAGE' is an indicator for this script to pick # 'SERVER_LANGUAGE' is an indicator for this script to pick
# a server in different language. # a server in different language.

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save