reuse class; change language name; scenario naame;

pull/12718/head
ZhouyihaiDing 7 years ago
parent c8e145bd93
commit 5fef3e3fd5
  1. 2
      tools/jenkins/run_full_performance.sh
  2. 46
      tools/run_tests/performance/scenario_config.py

@ -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 \

@ -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):
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)
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_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(),

Loading…
Cancel
Save