Class: ExecutionTime::AppMetrics
- Inherits:
-
Object
- Object
- ExecutionTime::AppMetrics
- Defined in:
- lib/execution_time.rb
Constant Summary collapse
- @@counter =
0
Class Method Summary collapse
- .reset ⇒ Object
-
.with_color(text) ⇒ Object
def colorize(text, color_code) “#color_code#texte[0m” end.
Instance Method Summary collapse
Class Method Details
.reset ⇒ Object
20 21 22 |
# File 'lib/execution_time.rb', line 20 def self.reset @@counter = 0 end |
.with_color(text) ⇒ Object
def colorize(text, color_code) “#color_code#texte[0m” end
34 35 36 |
# 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 |
Instance Method Details
#call(event_name, started, finished, event_id, payload) ⇒ Object
24 25 26 |
# File 'lib/execution_time.rb', line 24 def call(event_name, started, finished, event_id, payload) @@counter += 1 end |