From fbf3bd460b12313802b2d4a752f544dbcf241c18 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 26 Apr 2018 14:23:49 -0700 Subject: Fix some issues with Node benchmark scripts --- tools/run_tests/performance/build_performance.sh | 5 +++-- tools/run_tests/performance/build_performance_node.sh | 2 ++ tools/run_tests/performance/run_worker_node.sh | 4 +++- tools/run_tests/performance/scenario_config.py | 15 ++++++++------- 4 files changed, 16 insertions(+), 10 deletions(-) mode change 100644 => 100755 tools/run_tests/performance/build_performance_node.sh mode change 100644 => 100755 tools/run_tests/performance/run_worker_node.sh (limited to 'tools/run_tests/performance') diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh index 55762c6a23..35d9e90598 100755 --- a/tools/run_tests/performance/build_performance.sh +++ b/tools/run_tests/performance/build_performance.sh @@ -55,10 +55,11 @@ do "csharp") python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 --compiler coreclr ;; + "node"|"node_purejs") + tools/run_tests/performance/build_performance_node.sh + ;; *) python tools/run_tests/run_tests.py -l "$language" -c "$CONFIG" --build_only -j 8 ;; - "node") - tools/run_tests/performance/build_performance_node.sh esac done diff --git a/tools/run_tests/performance/build_performance_node.sh b/tools/run_tests/performance/build_performance_node.sh old mode 100644 new mode 100755 index 1e3f5df230..74adde91f3 --- a/tools/run_tests/performance/build_performance_node.sh +++ b/tools/run_tests/performance/build_performance_node.sh @@ -15,6 +15,8 @@ set +ex +. "$HOME/.nvm/nvm.sh" + nvm install 9 set -ex diff --git a/tools/run_tests/performance/run_worker_node.sh b/tools/run_tests/performance/run_worker_node.sh old mode 100644 new mode 100755 index 2511522c71..a9bbdccbc1 --- a/tools/run_tests/performance/run_worker_node.sh +++ b/tools/run_tests/performance/run_worker_node.sh @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +. "$HOME/.nvm/nvm.sh" + nvm use 9 set -ex @@ -27,4 +29,4 @@ cd "$(dirname "$0")/../../.." # Enter the grpc-node repo root (expected to be next to grpc repo root) cd ../grpc-node -node -r "test/fixtures/$fixture.js" tools/run_tests/performance/worker.js "$@" +node -r "./test/fixtures/$fixture" test/performance/worker.js "$@" diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index dde299ae36..bd65b82945 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -1160,7 +1160,8 @@ class NodeLanguage: def worker_cmdline(self): fixture = 'native_js' if self.node_purejs else 'native_native' - return ['tools/run_tests/performance/run_worker_node.sh', fixture] + return ['tools/run_tests/performance/run_worker_node.sh', fixture, + '--benchmark_impl=grpc'] def worker_port_offset(self): if self.node_purejs: @@ -1175,7 +1176,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_generic_async_streaming_ping_pong_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', @@ -1187,7 +1188,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_protobuf_async_streaming_ping_pong_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', @@ -1197,7 +1198,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_protobuf_async_unary_ping_pong_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', @@ -1208,7 +1209,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_protobuf_async_unary_qps_unconstrained_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', @@ -1219,7 +1220,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_protobuf_async_streaming_qps_unconstrained_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', @@ -1230,7 +1231,7 @@ class NodeLanguage: yield _ping_pong_scenario( '%s_to_node_generic_async_streaming_qps_unconstrained_%s' % - (secstr, node_implementation), + (node_implementation, secstr), rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', -- cgit v1.2.3