Class: TingYun::Agent::Collector::BaseQuantileHash
- Inherits:
-
Object
- Object
- TingYun::Agent::Collector::BaseQuantileHash
- Defined in:
- lib/ting_yun/agent/collector/stats_engine/base_quantile_hash.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
-
#initialize ⇒ BaseQuantileHash
constructor
A new instance of BaseQuantileHash.
- #merge!(hash) ⇒ Object
Constructor Details
#initialize ⇒ BaseQuantileHash
Returns a new instance of BaseQuantileHash.
7 8 9 |
# File 'lib/ting_yun/agent/collector/stats_engine/base_quantile_hash.rb', line 7 def initialize @hash = {} end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
5 6 7 |
# File 'lib/ting_yun/agent/collector/stats_engine/base_quantile_hash.rb', line 5 def hash @hash end |
Instance Method Details
#merge!(hash) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ting_yun/agent/collector/stats_engine/base_quantile_hash.rb', line 11 def merge!(hash) hash.each do |name, time| @hash[name] ||= [] @hash[name] << time end end |