rb: Increase the benchmark startup time and add more hooks
You can now control the number of clients per proc and calls per client with THRIFT_NUM_CALLS and THRIFT_NUM_CLIENTS.
You can also instruct the clients to log exceptions with THRIFT_LOG_EXCEPTIONS=yes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669033 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/benchmark/server.rb b/lib/rb/benchmark/server.rb
index 5162ac2..37e3358 100644
--- a/lib/rb/benchmark/server.rb
+++ b/lib/rb/benchmark/server.rb
@@ -50,15 +50,15 @@
const and const.split('::').inject(Object) { |k,c| k.const_get(c) }
end
+host, port, serverklass = ARGV
+
+Server.start_server(host, port.to_i, resolve_const(serverklass))
+
# let our host know that the interpreter has started
# ideally we'd wait until the server was serving, but we don't have a hook for that
Marshal.dump(:started, STDOUT)
STDOUT.flush
-host, port, serverklass = ARGV
-
-Server.start_server(host, port.to_i, resolve_const(serverklass))
-
Marshal.load(STDIN) # wait until we're instructed to shut down
Server.shutdown