Skip to content

Commit

Permalink
Merge pull request #1392 from teknofire/get_wall_clock_time
Browse files Browse the repository at this point in the history
Display elapsed real time instead of total cpu time
  • Loading branch information
tas50 authored Aug 1, 2019
2 parents 70b7b54 + dbac893 commit db1782b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ohai/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(controller, safe_run = false)
# If force is set to true, then this plugin and its dependencies
# will be run even if they have been run before.
def run_plugin(plugin)
elapsed = Benchmark.measure do
elapsed = Benchmark.realtime do
unless plugin.is_a?(Ohai::DSL::Plugin)
raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)"
end
Expand All @@ -57,7 +57,7 @@ def run_plugin(plugin)
logger.trace("Plugin #{plugin.name} threw exception #{e.inspect} #{e.backtrace.join("\n")}")
end
end
logger.trace("Plugin #{plugin.name} took #{elapsed.total} seconds to run.")
logger.trace("Plugin #{plugin.name} took #{elapsed} seconds to run.")
end

def run_v7_plugin(plugin)
Expand Down

0 comments on commit db1782b

Please sign in to comment.