Class: TingYun::Agent::Collector::BaseQuantileHash

Inherits:
Object
  • Object
show all
Defined in:
lib/ting_yun/agent/collector/stats_engine/base_quantile_hash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBaseQuantileHash

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

#hashObject (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