lib/fozzie/interface.rb in fozzie-0.0.24 vs lib/fozzie/interface.rb in fozzie-0.0.25

- old
+ new

@@ -110,10 +110,16 @@ # Register an event of any type # # `Stats.event 'wat', 'app'` def event(type, app = nil) - timing ["event", type.to_s, app], Time.now.usec + gauge ["event", type.to_s, app], Time.now.usec end + # Register an arbitrary value + # + # `Stats.gauge 'wat', 'app'` + def gauge(stat, value, sample_rate = 1) + send(stat, value, "g", sample_rate) + end end end \ No newline at end of file