Class: GoodJob::PerformanceController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- GoodJob::PerformanceController
- Defined in:
- app/controllers/good_job/performance_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/good_job/performance_controller.rb', line 5 def index @performances = GoodJob::Execution.group(:job_class).select(" job_class, COUNT(*) AS executions_count, AVG(duration) AS avg_duration, MIN(duration) AS min_duration, MAX(duration) AS max_duration ").order(:job_class) @queue_performances = GoodJob::Execution.group(:queue_name).select(" queue_name, COUNT(*) AS executions_count, AVG(duration) AS avg_duration, MIN(duration) AS min_duration, MAX(duration) AS max_duration ").order(:queue_name) end |
#show ⇒ Object
23 24 25 26 |
# File 'app/controllers/good_job/performance_controller.rb', line 23 def show representative_job = GoodJob::Job.find_by!(job_class: params[:id]) @job_class = representative_job.job_class end |