Class: QaServer::PerformancePerByteCalculatorService
- Inherits:
-
Object
- Object
- QaServer::PerformancePerByteCalculatorService
- Includes:
- PerformanceHistoryDataKeys
- Defined in:
- app/services/qa_server/performance_per_byte_calculator_service.rb
Constant Summary collapse
- TIME =
0
- BYTES =
1
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::BPMS_GRPH, QaServer::PerformanceHistoryDataKeys::BPMS_NORM, QaServer::PerformanceHistoryDataKeys::BPMS_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::MSPB_GRPH, QaServer::PerformanceHistoryDataKeys::MSPB_NORM, QaServer::PerformanceHistoryDataKeys::MSPB_RETR, QaServer::PerformanceHistoryDataKeys::SEARCH, QaServer::PerformanceHistoryDataKeys::SRC_BYTES, QaServer::PerformanceHistoryDataKeys::STATS
Instance Attribute Summary collapse
-
#n ⇒ Object
readonly
Returns the value of attribute n.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
-
#calculate ⇒ Hash
Calculate performance statistics with percentiles.
-
#initialize(records:, n:) ⇒ PerformancePerByteCalculatorService
constructor
A new instance of PerformancePerByteCalculatorService.
Constructor Details
#initialize(records:, n:) ⇒ PerformancePerByteCalculatorService
Returns a new instance of PerformancePerByteCalculatorService.
14 15 16 17 18 |
# File 'app/services/qa_server/performance_per_byte_calculator_service.rb', line 14 def initialize(records:, n:) @records = records @n = n @stats = {} end |
Instance Attribute Details
#n ⇒ Object (readonly)
Returns the value of attribute n.
11 12 13 |
# File 'app/services/qa_server/performance_per_byte_calculator_service.rb', line 11 def n @n end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
11 12 13 |
# File 'app/services/qa_server/performance_per_byte_calculator_service.rb', line 11 def records @records end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
11 12 13 |
# File 'app/services/qa_server/performance_per_byte_calculator_service.rb', line 11 def stats @stats end |
Instance Method Details
#calculate ⇒ Hash
Calculate performance statistics with percentiles. Min is at the 10th percentile. Max is at the 90th percentile.
31 32 33 34 35 36 37 |
# File 'app/services/qa_server/performance_per_byte_calculator_service.rb', line 31 def calculate extract_bytes calculate_retrieve_stats calculate_graph_load_stats calculate_normalization_stats stats end |