class Hitimes::TimedMetric

A TimedMetric holds the metrics on how long it takes to do something. For example, measuring how long a method takes to operate.

tm = TimedMetric.new( 'my-method' )

200.times do
  my_method_result = tm.measure do
    my_method( ... )
  end
end

puts "#{ tm.name } operated at a rate of #{ tm.rate } calls per second"

Since TimedMetric is a child class of Metric make sure to look at the Metric API also.

A TimedMetric measures the execution time of an option with the Interval class.

A TimedMetric contains a Stats object, therefore TimedMetric has count, max, mean, min, rate, stddev, sum, sumsq methods that delegate to that Stats object for convenience.