class Benchmark::IPS::Job::Entry

def initialize(label, action)

Raises:
  • (ArgumentError) - Raises when action is not String or not responding to +call+.

Parameters:
  • action (String, Proc) -- Code to be benchmarked.
  • label (#to_s) -- Label of Benchmarked code.
def initialize(label, action)
  @label = label
  if action.kind_of? String
    compile action
    @action = self
    @as_action = true
  else
    unless action.respond_to? :call
      raise ArgumentError, "invalid action, must respond to #call"
    end
    @action = action
    if action.respond_to? :arity and action.arity > 0
      @call_loop = true
    else
      @call_loop = false
    end
    @as_action = false
  end
end