Module: Benchmark

Defined in:
lib/benchmark-interface/frontends/bips.rb,
lib/benchmark-interface/frontends/benchmark.rb

Constant Summary collapse

CAPTION =
"      user     system      total        real\n"
FORMAT =
"%10.6u %10.6y %10.6t %10.6r\n"

Class Method Summary collapse

Class Method Details

.benchmark(caption = '', label_width = nil, format = nil, *labels) {|BenchmarkInterface::BenchmarkContext.new| ... } ⇒ Object



34
35
36
# File 'lib/benchmark-interface/frontends/benchmark.rb', line 34

def self.benchmark(caption='', label_width=nil, format=nil, *labels)
  yield BenchmarkInterface::BenchmarkContext.new
end

.bm(label_width = 0, *labels) {|BenchmarkInterface::BenchmarkContext.new| ... } ⇒ Object



42
43
44
# File 'lib/benchmark-interface/frontends/benchmark.rb', line 42

def self.bm(label_width=0, *labels)
  yield BenchmarkInterface::BenchmarkContext.new
end

.bmbm(label_width = 0) {|BenchmarkInterface::BenchmarkContext.new| ... } ⇒ Object



46
47
48
# File 'lib/benchmark-interface/frontends/benchmark.rb', line 46

def self.bmbm(label_width=0)
  yield BenchmarkInterface::BenchmarkContext.new
end

.ips {|BenchmarkInterface::BipsContext.new| ... } ⇒ Object



36
37
38
# File 'lib/benchmark-interface/frontends/bips.rb', line 36

def self.ips
  yield BenchmarkInterface::BipsContext.new
end

.measure(name = nil, &block) ⇒ Object



26
27
28
# File 'lib/benchmark-interface/frontends/benchmark.rb', line 26

def self.measure(name=nil, &block)
  BenchmarkInterface.benchmark name, &block
end

.realtime(name = nil, &block) ⇒ Object



30
31
32
# File 'lib/benchmark-interface/frontends/benchmark.rb', line 30

def self.realtime(name=nil, &block)
  BenchmarkInterface.benchmark name, &block
end