bin/rhoconnect-benchmark in rhoconnect-3.1.2 vs bin/rhoconnect-benchmark in rhoconnect-3.2.0.beta1
- old
+ new
@@ -71,17 +71,23 @@
opts.on('-t', '--title TITLE', "Name this benchmark's test results with the title TITLE") do |title|
options[:title] = title
end
+ options[:simtime] = 0
+ opts.on('-S', '--simtime NUMBER', "Force the source adapter to simulate NUMBER seconds communication roundtrip with the backend") do |simtime|
+ options[:simtime] = simtime
+ end
+
opts.on( '-A', '--advanced', 'This convinience option combines -m 10 and -x 500') do
options[:max_payload] = 500
options[:payload] = 500
options[:max_clients] = 10
options[:num_clients] = 10
options[:title] ||= "QUERY"
options[:save_results] = '.'
+ options[:simtime] = 0
end
options[:distributed] = nil
opts.on('-D', '--distributed FNAME', 'Run benchmark test from distributed AWS Cloud Formation using FNAME for options') do |fname|
options[:max_payload] = 500
@@ -89,10 +95,11 @@
options[:max_clients] = 10
options[:num_clients] = 10
options[:title] ||= "QUERY"
options[:save_results] = '.'
options[:distributed] = fname
+ options[:simtime] = 0
end
# This displays the help screen, all programs are
# assumed to have this option.
opts.on( '-h', '--help', 'Display rhoconnect-benchmark help information' ) do
@@ -234,14 +241,16 @@
bench_args[6] = concurrency
# number of iterations
bench_args[7] = options[:num_iterations]
# datasize
bench_args[8] = payload
+ # simulate backend delay
+ bench_args[9] = options[:simtime]
# now execute Bench
if(options[:distributed])
sync_key = "#{options[:title]}_#{payload}"
- options[:distr_runner].run(Bench.base_url, sync_key, payload, concurrency, options[:num_iterations], result_fname)
+ options[:distr_runner].run(Bench.base_url, sync_key, payload, concurrency, options[:num_iterations], result_fname, options[:simtime])
else
Bench::Cli.start bench_args
end
end
end