Skip to content

Commit

Permalink
Merge pull request grpc#7434 from ctiller/sweeps
Browse files Browse the repository at this point in the history
Add sync variants of important tests, add sweeps across different channel counts
  • Loading branch information
nicolasnoble authored Sep 7, 2016
2 parents f16c30b + 426dcde commit 483f90b
Show file tree
Hide file tree
Showing 3 changed files with 1,323 additions and 153 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1766,11 +1766,13 @@ target_include_directories(gen_percent_encoding_tables



install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
if (gRPC_INSTALL)
install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()


add_executable(grpc_create_jwt
Expand Down
108 changes: 65 additions & 43 deletions tools/run_tests/performance/scenario_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

SMOKETEST='smoketest'
SCALABLE='scalable'
SWEEP='sweep'

SECURE_SECARGS = {'use_test_ca': True,
'server_host_override': 'foo.test.google.fr'}
Expand Down Expand Up @@ -101,7 +102,8 @@ def _ping_pong_scenario(name, rpc_type,
server_core_limit=0,
async_server_threads=0,
warmup_seconds=WARMUP_SECONDS,
categories=[]):
categories=[],
channels=None):
"""Creates a basic ping pong scenario."""
scenario = {
'name': name,
Expand Down Expand Up @@ -156,6 +158,9 @@ def _ping_pong_scenario(name, rpc_type,
scenario['client_config']['client_channels'] = 1
scenario['client_config']['async_client_threads'] = 1

if channels is not None:
scenario['client_config']['client_channels'] = channels

if client_language:
# the CLIENT_LANGUAGE field is recognized by run_performance_tests.py
scenario['CLIENT_LANGUAGE'] = client_language
Expand Down Expand Up @@ -185,59 +190,76 @@ def scenarios(self):
smoketest_categories = [SMOKETEST] if secure else []

yield _ping_pong_scenario(
'cpp_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
'cpp_generic_async_streaming_ping_pong_%s' % secstr,
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, server_core_limit=1, async_server_threads=1,
secure=secure,
categories=smoketest_categories)

yield _ping_pong_scenario(
'cpp_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
server_core_limit=1, async_server_threads=1,
secure=secure)

yield _ping_pong_scenario(
'cpp_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
server_core_limit=1, async_server_threads=1,
secure=secure,
categories=smoketest_categories)

yield _ping_pong_scenario(
'cpp_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_core_limit=1, async_server_threads=1,
secure=secure)

yield _ping_pong_scenario(
'cpp_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
unconstrained_client='async',
secure=secure,
categories=smoketest_categories+[SCALABLE])

yield _ping_pong_scenario(
'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
unconstrained_client='async',
secure=secure,
categories=[SCALABLE])

yield _ping_pong_scenario(
'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr,
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', use_generic_payload=True,
secure=secure,
categories=smoketest_categories+[SCALABLE])

yield _ping_pong_scenario(
'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr,
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', use_generic_payload=True,
server_core_limit=1, async_server_threads=1,
secure=secure)

for synchronicity in ['sync', 'async']:
yield _ping_pong_scenario(
'cpp_protobuf_%s_streaming_ping_pong_%s' % (synchronicity, secstr),
rpc_type='STREAMING',
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
server_core_limit=1, async_server_threads=1,
secure=secure)

yield _ping_pong_scenario(
'cpp_protobuf_%s_unary_ping_pong_%s' % (synchronicity, secstr),
rpc_type='UNARY',
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
server_core_limit=1, async_server_threads=1,
secure=secure,
categories=smoketest_categories)

yield _ping_pong_scenario(
'cpp_protobuf_%s_unary_qps_unconstrained_%s' % (synchronicity, secstr),
rpc_type='UNARY',
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
unconstrained_client=synchronicity,
secure=secure,
categories=smoketest_categories+[SCALABLE])

yield _ping_pong_scenario(
'cpp_protobuf_%s_streaming_qps_unconstrained_%s' % (synchronicity, secstr),
rpc_type='STREAMING',
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
unconstrained_client=synchronicity,
secure=secure,
categories=[SCALABLE])

for channels in [1, 3, 10, 31, 100, 316, 1000]:
yield _ping_pong_scenario(
'cpp_protobuf_async_unary_qps_unconstrained_%s_%d_channels' % (secstr, channels),
rpc_type='UNARY',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
unconstrained_client=synchronicity, secure=secure,
categories=[SWEEP], channels=channels)

def __str__(self):
return 'c++'

Expand Down Expand Up @@ -548,7 +570,7 @@ def scenarios(self):
async_server_threads=1,
secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)

# TODO(jtattermusch): add scenarios java vs C++
# TODO(jtattermusch): add scenarios java vs C++

def __str__(self):
return 'java'
Expand All @@ -572,7 +594,7 @@ def scenarios(self):
smoketest_categories = [SMOKETEST] if secure else []

# ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server,
# but that's mostly because of lack of better name of the enum value.
# but that's mostly because of lack of better name of the enum value.
yield _ping_pong_scenario(
'go_generic_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
Expand Down Expand Up @@ -619,7 +641,7 @@ def scenarios(self):
secure=secure,
categories=[SCALABLE])

# TODO(jtattermusch): add scenarios go vs C++
# TODO(jtattermusch): add scenarios go vs C++

def __str__(self):
return 'go'
Expand Down
Loading

0 comments on commit 483f90b

Please sign in to comment.