Class: TimeBandits::TimeConsumers::Sequel::Subscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/time_bandits/time_consumers/sequel.rb

Instance Method Summary collapse

Instance Method Details

#duration(event) ⇒ Object



16
17
18
19
20
# File 'lib/time_bandits/time_consumers/sequel.rb', line 16

def duration(event)
  i = Sequel.instance
  i.time  += (event.payload[:durationInSeconds] * 1000)
  i.calls += 1
end