Class: Cwb::Benchmark

Inherits:
Object
  • Object
show all
Defined in:
lib/cwb/benchmark.rb

Instance Method Summary collapse

Constructor Details

#initialize(working_dir = Dir.pwd) ⇒ Benchmark

Returns a new instance of Benchmark.



5
6
7
8
# File 'lib/cwb/benchmark.rb', line 5

def initialize(working_dir = Dir.pwd)
  @cwb = Cwb::Client.instance
  @working_dir = working_dir
end

Instance Method Details

#executeObject

Intended to override



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

def execute
  # Empty benchmarks do nothing
end

#execute_in_working_dirObject



10
11
12
13
14
# File 'lib/cwb/benchmark.rb', line 10

def execute_in_working_dir
  Dir.chdir @working_dir do
    execute
  end
end