Class: QaServer::MonitorStatus::PerformancePresenter

Inherits:
Object
  • Object
show all
Includes:
GruffGraph, PerformanceDatatableBehavior, PerformanceGraphBehavior, PerformanceHistoryDataKeys
Defined in:
app/presenters/qa_server/monitor_status/performance_presenter.rb

Constant Summary

Constants included from PerformanceHistoryDataKeys

PerformanceHistoryDataKeys::ALL_ACTIONS, PerformanceHistoryDataKeys::ALL_AUTH, PerformanceHistoryDataKeys::AVG_ACTN, PerformanceHistoryDataKeys::AVG_FULL, PerformanceHistoryDataKeys::AVG_GRPH, PerformanceHistoryDataKeys::AVG_LOAD, PerformanceHistoryDataKeys::AVG_NORM, PerformanceHistoryDataKeys::AVG_RETR, PerformanceHistoryDataKeys::BY_DAY, PerformanceHistoryDataKeys::BY_HOUR, PerformanceHistoryDataKeys::BY_MONTH, PerformanceHistoryDataKeys::FETCH, PerformanceHistoryDataKeys::FOR_DATATABLE, PerformanceHistoryDataKeys::FOR_DAY, PerformanceHistoryDataKeys::FOR_MONTH, PerformanceHistoryDataKeys::FOR_YEAR, PerformanceHistoryDataKeys::HIGH_ACTN, PerformanceHistoryDataKeys::HIGH_FULL, PerformanceHistoryDataKeys::HIGH_GRPH, PerformanceHistoryDataKeys::HIGH_LOAD, PerformanceHistoryDataKeys::HIGH_NORM, PerformanceHistoryDataKeys::HIGH_RETR, PerformanceHistoryDataKeys::LOW_ACTN, PerformanceHistoryDataKeys::LOW_FULL, PerformanceHistoryDataKeys::LOW_GRPH, PerformanceHistoryDataKeys::LOW_LOAD, PerformanceHistoryDataKeys::LOW_NORM, PerformanceHistoryDataKeys::LOW_RETR, PerformanceHistoryDataKeys::SEARCH, PerformanceHistoryDataKeys::STATS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PerformanceGraphBehavior

#performance_all_actions_graph?, #performance_data_section_class, #performance_day_graph?, #performance_default_graph_id, #performance_fetch_graph?, #performance_graph, #performance_graph_action, #performance_graph_authority, #performance_graph_data_section_base_id, #performance_graph_data_section_id, #performance_graph_id, #performance_graph_label, #performance_graph_time_period, #performance_graphs, #performance_month_graph?, #performance_search_graph?, #performance_year_graph?

Methods included from PerformanceDatatableBehavior

#avg_full_request, #avg_full_request_style, #avg_graph_load, #avg_normalization, #avg_retrieve, #datatable_all_actions_stats, #datatable_data_style, #datatable_fetch_stats, #datatable_search_stats, #high_full_request, #high_full_request_style, #high_graph_load, #high_normalization, #high_retrieve, #low_full_request, #low_full_request_style, #low_graph_load, #low_normalization, #low_retrieve, #performance_table_description

Constructor Details

#initialize(performance_data:) ⇒ PerformancePresenter

Returns a new instance of PerformancePresenter.

Parameters:

  • performance_data (Hash<Hash>)

    performance data



11
12
13
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 11

def initialize(performance_data:)
  @performance_data = performance_data
end

Instance Attribute Details

#performance_dataObject (readonly)

Returns the value of attribute performance_data.



15
16
17
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 15

def performance_data
  @performance_data
end

Instance Method Details

#display_performance?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 21

def display_performance?
  display_performance_graph? || display_performance_datatable?
end

#display_performance_datatable?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 29

def display_performance_datatable?
  QaServer.config.display_performance_datatable?
end

#display_performance_graph?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 25

def display_performance_graph?
  QaServer.config.display_performance_graph?
end

#performance_data?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 17

def performance_data?
  performance_data.present?
end

#performance_data_authority_name(entry) ⇒ Object



33
34
35
# File 'app/presenters/qa_server/monitor_status/performance_presenter.rb', line 33

def performance_data_authority_name(entry)
  entry.keys.first
end