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

Attributes

count[R]
time[R]

Public Class Methods

new() click to toggle source
Calls superclass method
   # File lib/puppet/util/profiler/aggregate.rb
52 def initialize
53   super
54   @count = 0
55   @time = 0
56 end

Public Instance Methods

[](key) click to toggle source
Calls superclass method
   # File lib/puppet/util/profiler/aggregate.rb
59 def [](key)
60   if !has_key?(key)
61     self[key] = Metric.new
62   end
63   super(key)
64 end
add_time(time) click to toggle source
   # File lib/puppet/util/profiler/aggregate.rb
70 def add_time(time)
71   @time += time
72 end
increment() click to toggle source
   # File lib/puppet/util/profiler/aggregate.rb
66 def increment
67   @count += 1
68 end