Module: Draco::Benchmark::SystemPlugin

Defined in:
lib/draco/benchmark.rb

Overview

Internal: The module containing the benchmark plugin for Draco::System.

Instance Method Summary collapse

Instance Method Details

#after_initializeObject



34
35
36
37
# File 'lib/draco/benchmark.rb', line 34

def after_initialize
  super
  @timer = 0
end

#after_tick(context) ⇒ Object



44
45
46
47
# File 'lib/draco/benchmark.rb', line 44

def after_tick(context)
  super
  @timer = Time.now - @start_time
end

#before_tick(context) ⇒ Object



39
40
41
42
# File 'lib/draco/benchmark.rb', line 39

def before_tick(context)
  super
  @start_time = Time.now
end

#timerObject



49
50
51
# File 'lib/draco/benchmark.rb', line 49

def timer
  @timer
end