Class: BenchmarkInterface::BipsContext

Inherits:
Object
  • Object
show all
Defined in:
lib/benchmark-interface/frontends/bips.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#compareObject

Returns the value of attribute compare.



13
14
15
# File 'lib/benchmark-interface/frontends/bips.rb', line 13

def compare
  @compare
end

#holdObject

Returns the value of attribute hold.



13
14
15
# File 'lib/benchmark-interface/frontends/bips.rb', line 13

def hold
  @hold
end

#iterationsObject

Returns the value of attribute iterations.



13
14
15
# File 'lib/benchmark-interface/frontends/bips.rb', line 13

def iterations
  @iterations
end

#timeObject

Returns the value of attribute time.



13
14
15
# File 'lib/benchmark-interface/frontends/bips.rb', line 13

def time
  @time
end

#warmupObject

Returns the value of attribute warmup.



13
14
15
# File 'lib/benchmark-interface/frontends/bips.rb', line 13

def warmup
  @warmup
end

Instance Method Details

#compare!Object



19
20
21
# File 'lib/benchmark-interface/frontends/bips.rb', line 19

def compare!
  # Ignore
end

#config(options) ⇒ Object



15
16
17
# File 'lib/benchmark-interface/frontends/bips.rb', line 15

def config(options)
  # Ignore
end

#item(name = nil, code = nil, &block) ⇒ Object Also known as: report



23
24
25
26
27
# File 'lib/benchmark-interface/frontends/bips.rb', line 23

def item(name=nil, code=nil, &block)
  raise 'cannot have both a string and a block' if code && block
  block = eval("Proc.new { #{code} }") if code
  BenchmarkInterface.benchmark name, &block
end