lib/fozzie/classes.rb in fozzie-0.0.9 vs lib/fozzie/classes.rb in fozzie-0.0.10

- old
+ new

@@ -24,24 +24,26 @@ def build; built; end def built event :build end - def deploy; deployed; end - def deployed - event :deploy + def deploy(app = nil); deployed(app); end + def deployed(app = nil) + event :deploy, app end def increment_on(stat, perf, sample_rate=1) key = "#{stat}.%s" % (perf ? "success" : "fail") increment(key, sample_rate) perf end private - def event(type) - timing "event.#{type.to_s}", Time.now.usec + def event(type, app = nil) + stat = "event.#{type.to_s}" + stat << ".#{app}" unless app.nil? + timing stat, Time.now.usec end def send_to_socket(message) begin super(message) \ No newline at end of file