diff options
author | kpayson64 <kpayson@google.com> | 2018-05-11 12:20:11 -0700 |
---|---|---|
committer | kpayson64 <kpayson@google.com> | 2018-05-11 12:20:11 -0700 |
commit | 4fad281ce8affe27fb7428f264d2c3b9dfc45f2f (patch) | |
tree | ca96c9efd69afec56aa2e5fe072a9f758247d0a3 /src/ruby/end2end/client_memory_usage_driver.rb | |
parent | ec445cc2bb270ed4acb1c710c3533fca14a50019 (diff) | |
parent | 61fdb46ac456027c79841949272ec540f66d2317 (diff) |
Merge remote-tracking branch 'upstream/master' into fork_exec_ctx_check
Diffstat (limited to 'src/ruby/end2end/client_memory_usage_driver.rb')
-rwxr-xr-x | src/ruby/end2end/client_memory_usage_driver.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ruby/end2end/client_memory_usage_driver.rb b/src/ruby/end2end/client_memory_usage_driver.rb new file mode 100755 index 0000000000..9e46d7e529 --- /dev/null +++ b/src/ruby/end2end/client_memory_usage_driver.rb @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby + +# Copyright 2018 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require_relative './end2end_common' + +def main + STDERR.puts 'start server' + server_runner = ServerRunner.new(EchoServerImpl) + server_port = server_runner.run + STDERR.puts 'start client' + _, client_pid = start_client('client_memory_usage_client.rb', server_port) + + Process.wait(client_pid) + + client_exit_code = $CHILD_STATUS + if client_exit_code != 0 + raise "Getting memory usage was failed, exit code #{client_exit_code}" + end +ensure + server_runner.stop +end + +main |