class Logger::Benchmarker
Attributes
msg[RW]
severity[RW]
Public Class Methods
new(msg, severity = :warn)
click to toggle source
# File lib/core-extensions/benchmark-logger.rb, line 8 def initialize(msg, severity = :warn) @msg, @start = msg, Time.now @severity = severity end
Public Instance Methods
runtime()
click to toggle source
# File lib/core-extensions/benchmark-logger.rb, line 13 def runtime Time.now - @start end
to_s()
click to toggle source
# File lib/core-extensions/benchmark-logger.rb, line 17 def to_s "#{msg}: #{(runtime * 1000).to_i} msecs" end