Class: LogfileInterval::Aggregator::Pxx
- Inherits:
-
Base
- Object
- Base
- LogfileInterval::Aggregator::Pxx
- Defined in:
- lib/vpsb_client/datafiles/pxx_aggregator.rb
Direct Known Subclasses
Instance Method Summary collapse
- #add(value, group_by = nil) ⇒ Object
-
#initialize(options) ⇒ Pxx
constructor
A new instance of Pxx.
- #single_value? ⇒ Boolean
- #value(group) ⇒ Object
Constructor Details
#initialize(options) ⇒ Pxx
Returns a new instance of Pxx.
4 5 6 7 |
# File 'lib/vpsb_client/datafiles/pxx_aggregator.rb', line 4 def initialize() super @val = PxxBuckets.new() end |
Instance Method Details
#add(value, group_by = nil) ⇒ Object
9 10 11 12 |
# File 'lib/vpsb_client/datafiles/pxx_aggregator.rb', line 9 def add(value, group_by = nil) raise NotImplementedError if group_by @val.increment(value) end |
#single_value? ⇒ Boolean
18 19 20 |
# File 'lib/vpsb_client/datafiles/pxx_aggregator.rb', line 18 def single_value? false end |
#value(group) ⇒ Object
14 15 16 |
# File 'lib/vpsb_client/datafiles/pxx_aggregator.rb', line 14 def value(group) @val.value(group.to_f / 100.0) end |