class ExecutionTime::AppMetrics

Public Class Methods

reset() click to toggle source
# File lib/execution_time.rb, line 20
def self.reset
  @@counter = 0
end
with_color(text) click to toggle source

def red; colorize(self, “e[1me[31m”); end def green; colorize(self, “e[1me[32m”); end def dark_green; colorize(self, “e[32m”); end def yellow; colorize(self, “e[1me[33m”); end def blue; colorize(self, “e[1me[34m”); end def dark_blue; colorize(self, “e[34m”); end def colorize(text, color_code) “#{color_code}#{text}e[0m” end

# File lib/execution_time.rb, line 34
def AppMetrics.with_color(text)
  "\e[1m\e[32m[METRICS]\e[0m  \e[32m#{text}\e[0m"
end

Public Instance Methods

call(event_name, started, finished, event_id, payload) click to toggle source
# File lib/execution_time.rb, line 24
def call(event_name, started, finished, event_id, payload)
  @@counter += 1
end