Class: Rodimus::Benchmark

Inherits:
Object
  • Object
show all
Includes:
Observing
Defined in:
lib/rodimus/benchmark.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statsObject (readonly)

Returns the value of attribute stats.



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

def stats
  @stats
end

Instance Method Details

#on_notify(subject, event_type) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rodimus/benchmark.rb', line 8

def on_notify(subject, event_type)
  case event_type
  when :before_run
    initialize_stats
  when :after_run
    finalize_stats(subject)
  when :before_row
    before_row
  when :after_row
    after_row
  end
end