Class: QaServer::PerformanceGraphingService

Inherits:
Object
  • Object
show all
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

Class Method Details

.create_performance_graphs(performance_data:) ⇒ Object

Parameters:

  • performance_data (Hash)

    hash of all performance data for all authorities

See Also:

  • QaServer:PerformanceHistory


14
15
16
17
18
19
20
# File 'app/services/qa_server/performance_graphing_service.rb', line 14

def create_performance_graphs(performance_data:)
  performance_data.each_key do |auth_name|
    create_graphs_for_authority(performance_data, auth_name.to_sym, :search)
    create_graphs_for_authority(performance_data, auth_name.to_sym, :fetch)
    create_graphs_for_authority(performance_data, auth_name.to_sym, :all_actions)
  end
end

.performance_graph_file(authority_name: ALL_AUTH, action:, time_period:) ⇒ Object

Parameters:

  • authority_name (String) (defaults to: ALL_AUTH)

    name of the authority

  • action (Symbol)

    action performed by the request (e.g. :search, :fetch, :all_actions)

  • time_period (Symbol)

    time period for the graph (i.e. :day, :month, :year)



25
26
27
# File 'app/services/qa_server/performance_graphing_service.rb', line 25

def performance_graph_file(authority_name: ALL_AUTH, action:, time_period:)
  File.join(graph_relative_path, graph_filename(authority_name, action, time_period))
end