Class: PigCI::Report::Memory
- Inherits:
-
PigCI::Report
- Object
- PigCI::Report
- PigCI::Report::Memory
- Defined in:
- lib/pig_ci/report/memory.rb
Instance Attribute Summary
Attributes inherited from PigCI::Report
#historical_log_file, #i18n_key
Class Method Summary collapse
Methods inherited from PigCI::Report
#column_keys, #headings, #historical_data, #i18n_name, #i18n_scope, #initialize, #max_for, #over_threshold_for?, #sorted_and_formatted_data_for, #threshold, #timestamps, #to_payload_for
Constructor Details
This class inherits a constructor from PigCI::Report
Class Method Details
.bytes_in_a_megabyte ⇒ Object
12 13 14 |
# File 'lib/pig_ci/report/memory.rb', line 12 def self.bytes_in_a_megabyte @bytes_in_a_megabyte ||= BigDecimal("1_048_576") end |
.format_row(_unformatted_row) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/pig_ci/report/memory.rb', line 2 def self.format_row(_unformatted_row) row = super row[:max] = (row[:max] / bytes_in_a_megabyte).round(PigCI.report_memory_precision) row[:min] = (row[:min] / bytes_in_a_megabyte).round(PigCI.report_memory_precision) row[:mean] = (row[:mean] / bytes_in_a_megabyte).round(PigCI.report_memory_precision) row[:total] = (row[:total] / bytes_in_a_megabyte).round(PigCI.report_memory_precision) row end |