Class: DRbQS::Test::Server
- Defined in:
- lib/drbqs/server/test/server.rb
Constant Summary collapse
- PROF_FILE =
'drbqs_prof.txt'
Constants inherited from Server
Server::WAIT_TIME_NEW_RESULT, Server::WAIT_TIME_NODE_EXIT, Server::WAIT_TIME_NODE_FINALIZE
Constants included from Misc
Instance Attribute Summary
Attributes inherited from Server
Instance Method Summary collapse
Methods inherited from Server
#add_hook, #add_task_generator, #delete_hook, #initialize, #set_data, #set_file_transfer, #set_finalization_task, #set_initialization_task, #set_signal_trap, #start, #task_generator, #transfer_directory, #wait
Methods included from Misc
create_logger, create_uri, output_error, process_running_normally?, random_key, time_to_history_string, time_to_history_string2, uri_drbunix
Constructor Details
This class inherits a constructor from DRbQS::Server
Instance Method Details
#exit ⇒ Object
6 7 8 |
# File 'lib/drbqs/server/test/server.rb', line 6 def exit throw(:exit_loop) end |
#test_exec(opts = {}) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/drbqs/server/test/server.rb', line 46 def test_exec(opts = {}) require 'drbqs/server/test/node' first_task_generator_init set_file_transfer(nil) test_node = DRbQS::Test::Node.new(@logger.level, @ts[:transfer], @ts[:queue]) n = 0 data = loop_for_test(opts[:limit], opts[:profile], opts[:printer]) do exec_hook if ary = test_node.calc @queue.exec_task_hook(self, *ary) n += 1 end end test_node.finalize(@finalization_task) data[:task] = n data end |
#test_task_generator(opts = {}) ⇒ Object
64 65 66 67 68 69 70 71 |
# File 'lib/drbqs/server/test/server.rb', line 64 def test_task_generator(opts = {}) @task_generator.each_with_index do |t, i| puts "Test task generator [#{i}]" t.init set_num, task_num = t.debug_all_tasks(opts) puts "Create: task sets #{set_num}, all tasks #{task_num}" end end |