Method: NewRelic::Agent::Stats#merge!

Defined in:
lib/new_relic/agent/stats.rb

#merge!(other) ⇒ Object

[View source]

40
41
42
43
44
45
46
47
48
49
50
# File 'lib/new_relic/agent/stats.rb', line 40

def merge!(other)
  @lock.synchronize do
    @min_call_time = other.min_call_time if min_time_less?(other)
    @max_call_time = other.max_call_time if other.max_call_time > max_call_time
    @total_call_time += other.total_call_time
    @total_exclusive_time += other.total_exclusive_time
    @sum_of_squares += other.sum_of_squares
    @call_count += other.call_count
  end
  self
end