Class: Opera::Operation::Instructions::Executors::Benchmark

Inherits:
Executor
  • Object
show all
Defined in:
lib/opera/operation/instructions/executors/benchmark.rb

Instance Attribute Summary

Attributes inherited from Executor

#operation

Instance Method Summary collapse

Methods inherited from Executor

#add_instruction_output, #break_condition, #config, #context, #evaluate_instruction, #evaluate_instructions, #initialize, #production_mode?, #reporter, #result

Constructor Details

This class inherits a constructor from Opera::Operation::Executor

Instance Method Details

#call(instruction) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/opera/operation/instructions/executors/benchmark.rb', line 8

def call(instruction)
  benchmark = ::Benchmark.measure do
    super
  end

  result.add_information(real: benchmark.real, total: benchmark.total)
end