Sha256: 1f70459197342fe615fd4ba2211710a1f8f64311d6efc6b905a239e4449c6313
Contents?: true
Size: 491 Bytes
Versions: 4
Compression:
Stored size: 491 Bytes
Contents
module SimpleProfiler module Reporters class Logger def initialize(logger, options={}) @options = options @logger = logger end def notify(event) logger.debug event.to_s if login?(event) end private attr_reader :logger attr_reader :options def login?(event) event.total_time >= options.fetch(:min_time, 0) || event.used_memory >= options.fetch(:min_memory, 0) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems