aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-06 08:59:22 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-06 08:59:22 -0700
commit527253f27de6e313e2b27893152c80a15a728f6a (patch)
tree19eb13c4dad997caf04d201c80e91b65f5be2b35 /src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
parent40928b6173453c301199e1c217836412604ef03a (diff)
parentabecd39477e901ad060300a5df67e87469ddbb54 (diff)
Merge branch 'flowctl+millis' into qps_failya
Diffstat (limited to 'src/ruby/end2end/load_grpc_with_gc_stress_driver.rb')
-rwxr-xr-xsrc/ruby/end2end/load_grpc_with_gc_stress_driver.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb b/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
new file mode 100755
index 0000000000..3668b95a05
--- /dev/null
+++ b/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
@@ -0,0 +1,32 @@
+#!/usr/bin/env ruby
+#
+# Copyright 2016 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.
+
+this_dir = File.expand_path(File.dirname(__FILE__))
+protos_lib_dir = File.join(this_dir, 'lib')
+grpc_lib_dir = File.join(File.dirname(this_dir), 'lib')
+$LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir)
+$LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir)
+$LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
+
+GC.stress = 0x04
+
+require 'grpc'
+
+GRPC::Core::Channel.new('dummy_host', nil, :this_channel_is_insecure)
+GRPC::Core::Server.new({})
+GRPC::Core::ChannelCredentials.new
+GRPC::Core::CallCredentials.new(proc { |noop| noop })
+GRPC::Core::CompressionOptions.new