Module: Rgot

Defined in:
lib/rgot.rb,
lib/rgot/b.rb,
lib/rgot/m.rb,
lib/rgot/t.rb,
lib/rgot/pb.rb,
lib/rgot/cli.rb,
lib/rgot/common.rb,
lib/rgot/version.rb,
lib/rgot/example_parser.rb,
lib/rgot/benchmark_result.rb

Defined Under Namespace

Classes: B, BenchmarkResult, Cli, Common, ExampleOutput, ExampleParser, InternalBenchmark, InternalExample, InternalTest, M, PB, T

Constant Summary collapse

OptionError =
Class.new(StandardError)
VERSION =
"1.1.0"

Class Method Summary collapse

Class Method Details

.benchmark(opts_hash = {}, &block) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/rgot.rb', line 22

def benchmark(opts_hash = {}, &block)
  opts = B::Options.new
  opts_hash.each do |k, v|
    opts[k] = v
  end
  B.new(nil, nil, opts).run(&block)
end

.nowObject



18
19
20
# File 'lib/rgot.rb', line 18

def now
  Process.clock_gettime(Process::CLOCK_MONOTONIC)
end

.verbose?Boolean



30
31
32
# File 'lib/rgot.rb', line 30

def verbose?
  @chatty
end