Skip to content
Snippets Groups Projects
Commit 3b59b0f4 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

integrate Go qps worker

parent 594ff205
No related branches found
No related tags found
No related merge requests found
...@@ -33,8 +33,6 @@ set -ex ...@@ -33,8 +33,6 @@ set -ex
cd $(dirname $0)/../../.. cd $(dirname $0)/../../..
#TODO(jtattermusch): add support for more languages
CONFIG=${CONFIG:-opt} CONFIG=${CONFIG:-opt}
# build C++ qps worker & driver always - we need at least the driver to # build C++ qps worker & driver always - we need at least the driver to
...@@ -53,6 +51,9 @@ do ...@@ -53,6 +51,9 @@ do
(cd ../grpc-java/ && (cd ../grpc-java/ &&
./gradlew -PskipCodegen=true :grpc-benchmarks:installDist) ./gradlew -PskipCodegen=true :grpc-benchmarks:installDist)
;; ;;
"go")
tools/run_tests/performance/build_performance_go.sh
;;
*) *)
tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8
;; ;;
......
#!/bin/bash
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -ex
cd $(dirname $0)/../../..
export GOPATH=$(pwd)/../gopath
# Get grpc-go and the dependencies but get rid of the upstream/master version
go get google.golang.org/grpc
rm -rf "${GOPATH}/src/google.golang.org/grpc"
# Get the revision of grpc-go we want to test
git clone --recursive ../grpc-go ${GOPATH}/src/google.golang.org/grpc
(cd ${GOPATH}/src/google.golang.org/grpc/benchmark/worker && go install)
...@@ -52,3 +52,6 @@ ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill ...@@ -52,3 +52,6 @@ ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill
# Java # Java
jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 jps | grep LoadWorker | awk '{print $1}' | xargs kill -9
# Go
killall -9 worker || true
...@@ -39,7 +39,7 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ ...@@ -39,7 +39,7 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_
# mess with the results, be rough and reboot the slave here # mess with the results, be rough and reboot the slave here
# and wait for it to come back online. # and wait for it to come back online.
# could also kill jenkins. # could also kill jenkins.
ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby worker || true"
# push the current sources to the slave and unpack it. # push the current sources to the slave and unpack it.
scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace" scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace"
......
#!/bin/bash
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -ex
cd $(dirname $0)/../../..
../gopath/bin/worker $@
...@@ -521,6 +521,81 @@ class JavaLanguage: ...@@ -521,6 +521,81 @@ class JavaLanguage:
return 'java' return 'java'
class GoLanguage:
def __init__(self):
pass
self.safename = str(self)
def worker_cmdline(self):
return ['tools/run_tests/performance/run_worker_go.sh']
def worker_port_offset(self):
return 600
def scenarios(self):
for secure in [True, False]:
secstr = 'secure' if secure else 'insecure'
smoketest_categories = [SMOKETEST] if secure else None
yield _ping_pong_scenario(
'go_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, async_server_threads=1,
secure=secure,
categories=smoketest_categories)
yield _ping_pong_scenario(
'go_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
async_server_threads=1,
secure=secure)
yield _ping_pong_scenario(
'go_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
async_server_threads=1,
secure=secure,
categories=smoketest_categories)
yield _ping_pong_scenario(
'go_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
async_server_threads=1,
secure=secure)
yield _ping_pong_scenario(
'go_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
use_unconstrained_client=True,
secure=secure,
categories=smoketest_categories)
yield _ping_pong_scenario(
'go_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
use_unconstrained_client=True,
secure=secure,)
yield _ping_pong_scenario(
'go_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
use_unconstrained_client=True, use_generic_payload=True,
secure=secure)
yield _ping_pong_scenario(
'go_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
use_unconstrained_client=True, use_generic_payload=True,
async_server_threads=1,
secure=secure)
# TODO(jtattermusch): add scenarios go vs C++
def __str__(self):
return 'go'
LANGUAGES = { LANGUAGES = {
'c++' : CXXLanguage(), 'c++' : CXXLanguage(),
'csharp' : CSharpLanguage(), 'csharp' : CSharpLanguage(),
...@@ -528,4 +603,5 @@ LANGUAGES = { ...@@ -528,4 +603,5 @@ LANGUAGES = {
'ruby' : RubyLanguage(), 'ruby' : RubyLanguage(),
'java' : JavaLanguage(), 'java' : JavaLanguage(),
'python' : PythonLanguage(), 'python' : PythonLanguage(),
'go' : GoLanguage(),
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment