lib/beaker/perf.rb in beaker-5.4.0 vs lib/beaker/perf.rb in beaker-5.5.0
- old
+ new
@@ -1,12 +1,12 @@
module Beaker
# 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|eos|cumulus|opensuse|sles/
- PERF_START_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus/
+ PERF_SUPPORTED_PLATFORMS = /amazon|debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus|opensuse|sles/
+ PERF_START_PLATFORMS = /amazon|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
@@ -45,10 +45,10 @@
end
if @options[:collect_perf_data]&.include?('aggressive')
@logger.perf_output("Enabling aggressive sysstat polling")
if /debian|ubuntu/.match?(host['platform'])
host.exec(Command.new('sed -i s/5-55\\\/10/*/ /etc/cron.d/sysstat'))
- elsif /centos|el|fedora|oracle|redhat|scientific/.match?(host['platform'])
+ elsif /amazon|centos|el|fedora|oracle|redhat|scientific/.match?(host['platform'])
host.exec(Command.new('sed -i s/*\\\/10/*/ /etc/cron.d/sysstat'))
end
end
return unless PERF_START_PLATFORMS.match?(host['platform']) # SLES doesn't need this step