Sha256: 529b83862d2ce45ca599b54fe00b466a7c3b149f705a8c91a2d2af43dab2706b

Contents?: true

Size: 480 Bytes

Versions: 13

Compression:

Stored size: 480 Bytes

Contents

require 'rubyperf'

module Perf
  class Measure
    attr_accessor :path
    attr_accessor :count
    attr_accessor :time
    attr_accessor :measuring

    def initialize(measure_path)
      @path      = measure_path
      @count     = 0
      @time      = Benchmark::Tms.new
      @measuring = 0
    end

    def measuring?
      @measuring>0
    end

    def merge(m)
      @count      +=  m.count
      @time       +=  m.time
      @measuring  +=  m.measuring
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rubyperf-1.5.0 lib/perf/measure.rb
rubyperf-1.4.0 lib/perf/measure.rb
rubyperf-1.3.7 lib/perf/measure.rb
rubyperf-1.3.6 lib/perf/measure.rb
rubyperf-1.3.5 lib/perf/measure.rb
rubyperf-1.3.4 lib/perf/measure.rb
rubyperf-1.3.2 lib/perf/measure.rb
rubyperf-1.3.1 lib/perf/measure.rb
rubyperf-1.3.0 lib/perf/measure.rb
rubyperf-1.2.0 lib/perf/measure.rb
rubyperf-1.1.0 lib/perf/measure.rb
rubyperf-1.0.1 lib/perf/measure.rb
rubyperf-1.0.0 lib/perf/measure.rb