Method: NewRelic::Agent::StatsHash#initialize

Defined in:
lib/new_relic/agent/stats_engine/stats_hash.rb

#initialize(started_at = Process.clock_gettime(Process::CLOCK_REALTIME)) ⇒ StatsHash

Returns a new instance of StatsHash.

[View source]

35
36
37
38
39
# File 'lib/new_relic/agent/stats_engine/stats_hash.rb', line 35

def initialize(started_at = Process.clock_gettime(Process::CLOCK_REALTIME))
  @started_at = started_at.to_f
  @scoped = Hash.new { |h, k| h[k] = NewRelic::Agent::Stats.new }
  @unscoped = Hash.new { |h, k| h[k] = NewRelic::Agent::Stats.new }
end