Module: Puppet::Util

Defined in:
lib/puppet/provider/package/hax.rb

Overview

I fucking hate that “Finished catalog…” notice that gets printed on a run that does nothing else. ‘time` exists if we need to time something, and I don’t want any output if nothing happened. This filters out the appropriate benchmark call.

Instance Method Summary collapse

Instance Method Details

#benchmark(*args, &block) ⇒ Object



9
10
11
12
13
14
# File 'lib/puppet/provider/package/hax.rb', line 9

def benchmark(*args, &block)
  _, msg = args

  return yield if /finished catalog/i =~ msg
  benchmark_without_filtering(*args, &block)
end

#benchmark_without_filteringObject



7
# File 'lib/puppet/provider/package/hax.rb', line 7

alias_method :benchmark_without_filtering, :benchmark