Method: Beaker::Perf#initialize

Defined in:
lib/beaker/perf.rb

#initialize(hosts, options) ⇒ void

Create the Perf instance and runs setup_perf_on_host on all hosts if –collect-perf-data was used as an option on the Baker command line invocation. Instances of this class do not hold state and its methods are helpers for remotely executing tasks for performance data gathering with sysstat/sar

Parameters:

  • hosts (Array<Host>)

    All from the configuration

  • options (Hash)

    Options to alter execution



18
19
20
21
22
23
24
# File 'lib/beaker/perf.rb', line 18

def initialize( hosts, options )
  @hosts = hosts
  @options = options
  @logger = options[:logger]
  @perf_timestamp = Time.now
  @hosts.map { |h| setup_perf_on_host(h) }
end