def run_plugin(plugin)
      elapsed = Benchmark.measure do
        unless plugin.kind_of?(Ohai::DSL::Plugin)
          raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)"
        end

        begin
          if plugin.version == :version7
            run_v7_plugin(plugin)
          else
            raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
          end
        rescue Ohai::Exceptions::Error # rubocop: disable Lint/ShadowedException
          raise
        rescue SystemExit # abort or exit from plug-in should exit Ohai with failure code
          raise
        rescue Exception, Errno::ENOENT => e
          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.")
    end
def run_plugin(plugin)
      elapsed = Benchmark.measure do
        unless plugin.kind_of?(Ohai::DSL::Plugin)
          raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin #{plugin} (must be an Ohai::DSL::Plugin or subclass)"
        end

        begin
          if plugin.version == :version7
            run_v7_plugin(plugin)
          else
            raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
          end
        rescue Ohai::Exceptions::Error # rubocop: disable Lint/ShadowedException
          raise
        rescue SystemExit # abort or exit from plug-in should exit Ohai with failure code
          raise
        rescue Exception, Errno::ENOENT => e
          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.")
    end
safe_run: set to true if this runner will run plugins in
 safe-mode. default false.
 Runs plugins and any un-run dependencies.
 If force is set to true, then this plugin and its dependencies
 will be run even if they have been run before.