lib/beaker/perf.rb in beaker-1.21.0 vs lib/beaker/perf.rb in beaker-2.0.0
- old
+ new
@@ -2,12 +2,12 @@
# The Beaker Perf class. A single instance is created per Beaker run.
class Perf
PERF_PACKAGES = ['sysstat']
# SLES does not treat sysstat as a service that can be started
- PERF_SUPPORTED_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|sles/
- PERF_START_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el/
+ PERF_SUPPORTED_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus|sles/
+ PERF_START_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus/
# 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
@@ -37,11 +37,11 @@
end
else
@logger.perf_output("Perf (sysstat) not supported on host: " + host)
end
- if host['platform'] =~ /debian|ubuntu/
+ if host['platform'] =~ /debian|ubuntu|cumulus/
@logger.perf_output("Modify /etc/default/sysstat on Debian and Ubuntu platforms")
host.exec(Command.new('sed -i s/ENABLED=\"false\"/ENABLED=\"true\"/ /etc/default/sysstat'))
elsif host['platform'] =~ /sles/
@logger.perf_output("Creating symlink from /etc/sysstat/sysstat.cron to /etc/cron.d")
host.exec(Command.new('ln -s /etc/sysstat/sysstat.cron /etc/cron.d'),:acceptable_exit_codes => [0,1])
@@ -50,10 +50,9 @@
host.exec(Command.new('service sysstat start'))
end
end
# Iterate over all hosts, calling get_perf_data
- # @param [void]
# @return [void]
def print_perf_info()
@perf_end_timestamp = Time.now
@hosts.map { |h| get_perf_data(h, @perf_timestamp, @perf_end_timestamp) }
end