Sha256: 86bacf4f5923f215dbd9f79c52fb5327fbfb0c77f3a1d8e23ec753313ba55d73
Contents?: true
Size: 611 Bytes
Versions: 28
Compression:
Stored size: 611 Bytes
Contents
module Rake module Funnel module Support module Timing class Statistics include Enumerable attr_reader :started_at def initialize @stats = [] @started_at = Time.now end def each(&block) @stats.each(&block) end def benchmark(task) t0 = Time.now begin yield if block_given? ensure t1 = Time.now @stats << { task: task, time: t1 - t0 } end end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems