diff --git a/tools/jenkins/run_full_performance.sh b/tools/jenkins/run_full_performance.sh index aae76b0fde8..9598fd77349 100755 --- a/tools/jenkins/run_full_performance.sh +++ b/tools/jenkins/run_full_performance.sh @@ -21,7 +21,7 @@ cd $(dirname $0)/../.. # run 8core client vs 8core server tools/run_tests/run_performance_tests.py \ - -l c++ csharp node ruby java python go node_express php php_ext \ + -l c++ csharp node ruby java python go node_express php_protobuf_php php_protobuf_c \ --netperf \ --category scalable \ --bq_result_table performance_test.performance_experiment \ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 31017f1d85a..5019358ab3e 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -802,52 +802,32 @@ class RubyLanguage: class PhpLanguage: - def __init__(self): + def __init__(self, use_protobuf_c_extension=False): pass + self.use_protobuf_c_extension=use_protobuf_c_extension self.safename = str(self) def worker_cmdline(self): + if self.use_protobuf_c_extension: + return ['tools/run_tests/performance/run_worker_php.sh -c'] return ['tools/run_tests/performance/run_worker_php.sh'] def worker_port_offset(self): return 800 def scenarios(self): + php_extension_mode='php_protobuf_php_extension' + if self.use_protobuf_c_extension: + php_extension_mode='php_protobuf_c_extension' + yield _ping_pong_scenario( - 'php_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - server_language='c++', async_server_threads=1) - - yield _ping_pong_scenario( - 'php_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - server_language='c++', async_server_threads=1) - - def __str__(self): - return 'php' - - -class PhpLanguage_ext: - - def __init__(self): - pass - self.safename = str(self) - - def worker_cmdline(self): - return ['tools/run_tests/performance/run_worker_php.sh -c'] - - def worker_port_offset(self): - return 800 - - def scenarios(self): - yield _ping_pong_scenario( - 'php_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + '%s_to_cpp_protobuf_sync_unary_ping_pong' % php_extension_mode, + rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', server_language='c++', async_server_threads=1) yield _ping_pong_scenario( - 'php_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + '%s_to_cpp_protobuf_sync_streaming_ping_pong' % php_extension_mode, + rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', server_language='c++', async_server_threads=1) def __str__(self): @@ -1051,8 +1031,8 @@ LANGUAGES = { 'node' : NodeLanguage(), 'node_express': NodeExpressLanguage(), 'ruby' : RubyLanguage(), - 'php' : PhpLanguage(), - 'php_ext' : PhpLanguage_ext(), + 'php_protobuf_php' : PhpLanguage(), + 'php_protobuf_c' : PhpLanguage(use_protobuf_c_extension=True), 'java' : JavaLanguage(), 'python' : PythonLanguage(), 'go' : GoLanguage(),