From: Kevin Clark Date: Wed, 18 Jun 2008 01:20:06 +0000 (+0000) Subject: rb: Add control for the number of client processes in the benchmark X-Git-Tag: 0.2.0~513 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=4b429ad86e62744652a47700e96e39e93e8f9ae2;p=common%2Fthrift.git rb: Add control for the number of client processes in the benchmark You control this with THRIFT_NUM_PROCESSES, the default is 40 git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669038 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/benchmark/benchmark.rb b/lib/rb/benchmark/benchmark.rb index da0c4143..71254172 100644 --- a/lib/rb/benchmark/benchmark.rb +++ b/lib/rb/benchmark/benchmark.rb @@ -239,7 +239,8 @@ args[:class] = resolve_const(ENV['THRIFT_SERVER']) || Thrift::NonblockingServer server = Server.new(args) server.start -args = { :num_processes => 40, :host => HOST, :port => PORT } +args = { :host => HOST, :port => PORT } +args[:num_processes] = (ENV['THRIFT_NUM_PROCESSES'] || 40).to_i args[:clients_per_process] = (ENV['THRIFT_NUM_CLIENTS'] || 5).to_i args[:calls_per_client] = (ENV['THRIFT_NUM_CALLS'] || 50).to_i args[:interpreter] = ENV['THRIFT_CLIENT_INTERPRETER'] || ENV['THRIFT_INTERPRETER'] || "ruby"