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
9 10 11 |
# File 'lib/execution_time.rb', line 9 def self.reset @@counter = 0 end |
.with_color(text) ⇒ Object
def colorize(text, color_code) “#color_code#texte[0m” end
23 24 25 |
# File 'lib/execution_time.rb', line 23 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
13 14 15 |
# File 'lib/execution_time.rb', line 13 def call(event_name, started, finished, event_id, payload) @@counter += 1 end |