Module: Resque::Plugins::JobStats::Timeseries::Performed

Includes:
MeasuredHook, Common
Included in:
Resque::Plugins::JobStats
Defined in:
lib/resque/plugins/job_stats/timeseries.rb

Instance Method Summary collapse

Methods included from Common

#timestamp

Methods included from MeasuredHook

included, #inherited

Instance Method Details

#after_perform_job_stats_timeseries(*args) ⇒ Object

Increments the performed count for the timestamp when job is complete



84
85
86
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 84

def after_perform_job_stats_timeseries(*args)
  incr_timeseries(:performed)
end

#performed_per_hourObject

Hash of timeseries data over the last 24 hours for completed jobs



94
95
96
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 94

def performed_per_hour
  timeseries_data(:performed, 24, :hours)
end

#performed_per_minuteObject

Hash of timeseries data over the last 60 minutes for completed jobs



89
90
91
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 89

def performed_per_minute
  timeseries_data(:performed, 60, :minutes)
end