Class: QaServer::PerformanceHistory
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- QaServer::PerformanceHistory
- Extended by:
- PerformanceHistoryDataKeys
- Defined in:
- app/models/qa_server/performance_history.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
-
.create_record(authority:, action:, dt_stamp: QaServer.current_time) ⇒ Object
Save a scenario result.
-
.performance_data(datatype: :datatable) ⇒ Object
Performance data for a day, a month, a year, and all time for each authority.
Class Method Details
.create_record(authority:, action:, dt_stamp: QaServer.current_time) ⇒ Object
Save a scenario result
23 24 25 26 27 |
# File 'app/models/qa_server/performance_history.rb', line 23 def create_record(authority:, action:, dt_stamp: QaServer.current_time) create(dt_stamp: dt_stamp, authority: , action: action) end |
.performance_data(datatype: :datatable) ⇒ Object
Performance data for a day, a month, a year, and all time for each authority.
67 68 69 70 71 72 73 |
# File 'app/models/qa_server/performance_history.rb', line 67 def performance_data(datatype: :datatable) return if datatype == :none QaServer.config.performance_cache.write_all data = calculate_data(datatype) graphing_service_class.create_performance_graphs(performance_data: data) if calculate_graphdata? datatype data end |