In Files

Parent

Files

Bullshit::TimeCase

This is a Benchmarking Case that uses a time limit.

Public Class Methods

message() click to toggle source

(Not documented)

# File lib/bullshit.rb, line 1954
      def message
        "Running '#{self}' for a duration of #{duration} secs/method"\
          " (compare_time=#{compare_time}):"
      end

Public Instance Methods

evaluation(clock) click to toggle source

Returns the evaluation for bullshit_case with the results of the benchmarking as a String.

# File lib/bullshit.rb, line 1964
    def evaluation(clock)
      clock.repeat == 0 and
        raise BullshitException, "no measurements were gauged"
      result = ''
      result << statistics_table(clock)
      result << histogram(clock)
      result << detect_outliers(clock)
      result << detect_autocorrelation(clock) 
      result << "\n"
    end
run(*) click to toggle source

Check if duration has been set. If yes call Case#run, otherwise raise a BullshitException exception.

# File lib/bullshit.rb, line 1977
    def run(*)
      self.class.duration or
        raise BullshitException, 'duration has to be set'
      super
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.