]>
git.saurik.com Git - redis.git/blob - client-libraries/ruby/benchmarking/suite.rb
3 def run_in_background(command
)
4 fork
{ system command
}
7 def with_all_segments(&block
)
8 0.upto(9) do |segment_number
|
10 start_index
= segment_number
* block_size
11 end_index
= start_index + block_size
- 1
12 block
.call(start_index
, end_index
)
16 #with_all_segments do |start_index, end_index|
17 # puts "Initializing keys from #{start_index} to #{end_index}"
18 # system "ruby worker.rb initialize #{start_index} #{end_index} 0"
21 with_all_segments
do |start_index
, end_index
|
22 run_in_background
"ruby worker.rb write #{start_index} #{end_index} 10"
23 run_in_background
"ruby worker.rb read #{start_index} #{end_index} 1"