lib/ohai/application.rb in ohai-13.4.0 vs lib/ohai/application.rb in ohai-13.5.0

- old
+ new

@@ -18,10 +18,11 @@ require "chef-config/path_helper" require "chef-config/workstation_config_loader" require "ohai" require "ohai/log" require "mixlib/cli" +require "benchmark" class Ohai::Application include Mixlib::CLI option :config_file, @@ -72,11 +73,14 @@ # from failing due to permissions when launched as a less privileged user. Dir.chdir("/") end def run - configure_ohai - run_application + elapsed = Benchmark.measure do + configure_ohai + run_application + end + Ohai::Log.debug("Ohai took #{elapsed.total} total seconds to run.") end def configure_ohai @attributes = parse_options @attributes = nil if @attributes.empty?