Class: RailsPerformanceController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- RailsPerformanceController
- Defined in:
- app/controllers/rails_performance_controller.rb
Instance Method Summary collapse
Instance Method Details
#breakdown ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/controllers/rails_performance_controller.rb', line 29 def breakdown @datasource = RP::DataSource.new(prepare_query) db = @datasource.db @breakdown_report = RP::Reports::BreakdownReport.new(db, title: "Breakdown Report") @breakdown_report_data = @breakdown_report.data end |
#crashes ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/rails_performance_controller.rb', line 14 def crashes @datasource = RP::DataSource.new(prepare_query({status_eq: 500})) db = @datasource.db @crash_report = RP::Reports::CrashReport.new(db) @crash_report_data = @crash_report.data end |
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/rails_performance_controller.rb', line 3 def index @datasource = RP::DataSource.new(prepare_query) db = @datasource.db @throughput_report = RP::Reports::ThroughputReport.new(db) @throughput_report_data = @throughput_report.data @response_time_report = RP::Reports::ResponseTimeReport.new(db) @response_time_report_data = @response_time_report.data end |
#recent ⇒ Object
37 38 39 40 41 42 43 |
# File 'app/controllers/rails_performance_controller.rb', line 37 def recent @datasource = RP::DataSource.new(prepare_query) db = @datasource.db @report = RP::Reports::RecentRequestsReport.new(db) @data = @report.data end |
#requests ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/rails_performance_controller.rb', line 21 def requests @datasource = RP::DataSource.new(prepare_query) db = @datasource.db @global_report = RP::Reports::RequestsReport.new(db, group: :controller_action_format, sort: :db_runtime_slowest) @global_report_data = @global_report.data end |