module SingleRunner

Public Instance Methods

error_count() click to toggle source
# File lib/load/single_run/single_runner.rb, line 16
def error_count
  return @error_count
end
log() click to toggle source
# File lib/load/single_run/single_runner.rb, line 11
def log
  logger = Logger.new(STDERR)
  return logger
end
report_block_result(test_code, wasp_id, time_ellapsed, benchmark_time, result, target_code) click to toggle source
# File lib/load/single_run/single_runner.rb, line 3
def report_block_result(test_code, wasp_id, time_ellapsed, benchmark_time, result, target_code)
  puts "BLOCK RESULT (#{test_code}): #{result}    Time: #{benchmark_time/1000} seconds  "
end
run_and_benchmark(test, target, params, iterations) click to toggle source
# File lib/load/single_run/single_runner.rb, line 20
  def run_and_benchmark(test, target, params, iterations)
    load_node = LoadNode.instance
    if (LoadNode.instance == nil)
      load_node = LoadNode.new(0, nil, nil)
    end
#    load_node.target_server = servers[target]

    @error_count = 0
    timings = []
    logger = Logger.new(STDERR)
    test.logger = logger
    test.owner = self
    test.params =  params
    test.set_up

    (1..iterations).each do |loop_index|
      puts "==============================================================="
      time = Benchmark.realtime {
        test.run
      }
      timings << time
      puts "=================> Iteration: #{test.class} #{loop_index}  Time: #{time} seconds"
    end
    test.tear_down
    return timings
  end
time_ellapsed_millis() click to toggle source
# File lib/load/single_run/single_runner.rb, line 7
def time_ellapsed_millis
  return 0
end