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_AUTH, QaServer::PerformanceHistoryDataKeys::AVG_FULL, QaServer::PerformanceHistoryDataKeys::AVG_LOAD, QaServer::PerformanceHistoryDataKeys::AVG_NORM, QaServer::PerformanceHistoryDataKeys::BY_DAY, QaServer::PerformanceHistoryDataKeys::BY_HOUR, QaServer::PerformanceHistoryDataKeys::BY_MONTH, QaServer::PerformanceHistoryDataKeys::FOR_DATATABLE, QaServer::PerformanceHistoryDataKeys::FOR_DAY, QaServer::PerformanceHistoryDataKeys::FOR_MONTH, QaServer::PerformanceHistoryDataKeys::FOR_YEAR, QaServer::PerformanceHistoryDataKeys::HIGH_FULL, QaServer::PerformanceHistoryDataKeys::HIGH_LOAD, QaServer::PerformanceHistoryDataKeys::HIGH_NORM, QaServer::PerformanceHistoryDataKeys::LOW_FULL, QaServer::PerformanceHistoryDataKeys::LOW_LOAD, QaServer::PerformanceHistoryDataKeys::LOW_NORM, QaServer::PerformanceHistoryDataKeys::STATS
Class Method Summary collapse
-
.performance_data(datatype: :datatable) ⇒ Object
Performance data for a day, a month, a year, and all time for each authority.
-
.save_result(dt_stamp:, authority:, action:, size_bytes:, load_time_ms:, normalization_time_ms:) ⇒ Object
Save a scenario result.
Class Method Details
.performance_data(datatype: :datatable) ⇒ Object
Performance data for a day, a month, a year, and all time for each authority.
64 65 66 67 68 69 |
# File 'app/models/qa_server/performance_history.rb', line 64 def performance_data(datatype: :datatable) return if datatype == :none data = calculate_data(datatype) graphing_service_class.create_performance_graphs(performance_data: data) if calculate_graphdata? datatype data end |
.save_result(dt_stamp:, authority:, action:, size_bytes:, load_time_ms:, normalization_time_ms:) ⇒ Object
Save a scenario result
21 22 23 24 25 26 27 28 |
# File 'app/models/qa_server/performance_history.rb', line 21 def save_result(dt_stamp:, authority:, action:, size_bytes:, load_time_ms:, normalization_time_ms:) # rubocop:disable Metrics/ParameterLists create(dt_stamp: dt_stamp, authority: , action: action, size_bytes: size_bytes, load_time_ms: load_time_ms, normalization_time_ms: normalization_time_ms) end |