In Files

Parent

Files

Bullshit::RangeCase

A range case is a benchmark case, where each iteration depends on a different argument, which might cause a non-constant running time. The evaluation of the case doesn’t check for constancy and steady-state properties.

Attributes

args[RW]

(Not documented)

Public Class Methods

message() click to toggle source

(Not documented)

# File lib/bullshit.rb, line 2047
      def message
        "Running '#{self}' for range #{range.inspect}"\
          " (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 2064
    def evaluation(clock)
      clock.repeat == 0 and
        raise BullshitException, "no measurements were gauged"
      result = ''
      result << statistics_table(clock)
      result << "\n"
    end
run(*) click to toggle source

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

# File lib/bullshit.rb, line 2074
    def run(*)
      self.class.range or
        raise BullshitException,
          'range has to be set to an enumerable of arguments'
      super
    end

Private Instance Methods

args() click to toggle source

(Not documented)

# File lib/bullshit.rb, line 2057
    def args
      self.class.args
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.