Class: QaServer::PerformanceGraphingService
- Inherits:
-
Object
- Object
- QaServer::PerformanceGraphingService
- Extended by:
- MonitorStatus::GruffGraph, PerformanceHistoryDataKeys
- Defined in:
- app/services/qa_server/performance_graphing_service.rb
Constant Summary
Constants included from PerformanceHistoryDataKeys
QaServer::PerformanceHistoryDataKeys::ALL_ACTIONS, QaServer::PerformanceHistoryDataKeys::ALL_AUTH, QaServer::PerformanceHistoryDataKeys::AVG_ACTN, QaServer::PerformanceHistoryDataKeys::AVG_FULL, QaServer::PerformanceHistoryDataKeys::AVG_GRPH, QaServer::PerformanceHistoryDataKeys::AVG_LOAD, QaServer::PerformanceHistoryDataKeys::AVG_NORM, QaServer::PerformanceHistoryDataKeys::AVG_RETR, QaServer::PerformanceHistoryDataKeys::BY_DAY, QaServer::PerformanceHistoryDataKeys::BY_HOUR, QaServer::PerformanceHistoryDataKeys::BY_MONTH, QaServer::PerformanceHistoryDataKeys::FETCH, QaServer::PerformanceHistoryDataKeys::FOR_DATATABLE, QaServer::PerformanceHistoryDataKeys::FOR_DAY, QaServer::PerformanceHistoryDataKeys::FOR_MONTH, QaServer::PerformanceHistoryDataKeys::FOR_YEAR, QaServer::PerformanceHistoryDataKeys::HIGH_ACTN, QaServer::PerformanceHistoryDataKeys::HIGH_FULL, QaServer::PerformanceHistoryDataKeys::HIGH_GRPH, QaServer::PerformanceHistoryDataKeys::HIGH_LOAD, QaServer::PerformanceHistoryDataKeys::HIGH_NORM, QaServer::PerformanceHistoryDataKeys::HIGH_RETR, QaServer::PerformanceHistoryDataKeys::LOW_ACTN, QaServer::PerformanceHistoryDataKeys::LOW_FULL, QaServer::PerformanceHistoryDataKeys::LOW_GRPH, QaServer::PerformanceHistoryDataKeys::LOW_LOAD, QaServer::PerformanceHistoryDataKeys::LOW_NORM, QaServer::PerformanceHistoryDataKeys::LOW_RETR, QaServer::PerformanceHistoryDataKeys::SEARCH, QaServer::PerformanceHistoryDataKeys::STATS
Class Method Summary collapse
-
.generate_daily_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 30 day graph for the authority and action given the graph data.
-
.generate_hourly_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 24 hour graph for the authority and action given the graph data.
-
.generate_monthly_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 12 month graph for the authority and action given the graph data.
- .performance_graph_file(authority_name: ALL_AUTH, action:, time_period:) ⇒ Object
Class Method Details
.generate_daily_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 30 day graph for the authority and action given the graph data.
36 37 38 39 40 41 |
# File 'app/services/qa_server/performance_graphing_service.rb', line 36 def generate_daily_graph(authority_name: ALL_AUTH, action:, data:) gruff_data = rework_performance_data_for_gruff(data, BY_DAY) create_gruff_graph(gruff_data, performance_for_month_graph_full_path(, action), I18n.t('qa_server.monitor_status.performance.x_axis_day')) end |
.generate_hourly_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 24 hour graph for the authority and action given the graph data.
48 49 50 51 52 53 |
# File 'app/services/qa_server/performance_graphing_service.rb', line 48 def generate_hourly_graph(authority_name: ALL_AUTH, action:, data:) gruff_data = rework_performance_data_for_gruff(data, BY_HOUR) create_gruff_graph(gruff_data, performance_for_day_graph_full_path(, action), I18n.t('qa_server.monitor_status.performance.x_axis_hour')) end |
.generate_monthly_graph(authority_name: ALL_AUTH, action:, data:) ⇒ Object
Generate one 12 month graph for the authority and action given the graph data.
24 25 26 27 28 29 |
# File 'app/services/qa_server/performance_graphing_service.rb', line 24 def generate_monthly_graph(authority_name: ALL_AUTH, action:, data:) gruff_data = rework_performance_data_for_gruff(data, BY_MONTH) create_gruff_graph(gruff_data, performance_for_year_graph_full_path(, action), I18n.t('qa_server.monitor_status.performance.x_axis_month')) end |
.performance_graph_file(authority_name: ALL_AUTH, action:, time_period:) ⇒ Object
15 16 17 |
# File 'app/services/qa_server/performance_graphing_service.rb', line 15 def performance_graph_file(authority_name: ALL_AUTH, action:, time_period:) File.join(graph_relative_path, graph_filename(, action, time_period)) end |