class Puppet::Util::Profiler::Aggregate::Metric

Attributes

count[R]
time[R]

Public Instance Methods

[](key) click to toggle source
# File lib/puppet/util/profiler/aggregate.rb, line 59
def [](key)
  if !has_key?(key)
    self[key] = Metric.new
  end
  super(key)
end
add_time(time) click to toggle source
# File lib/puppet/util/profiler/aggregate.rb, line 70
def add_time(time)
  @time += time
end
increment() click to toggle source
# File lib/puppet/util/profiler/aggregate.rb, line 66
def increment
  @count += 1
end

Public Class Methods

new() click to toggle source
# File lib/puppet/util/profiler/aggregate.rb, line 52
def initialize
  super
  @count = 0
  @time = 0
end