Method: NewRelic::Agent::Stats#record_apdex

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

#record_apdex(bucket, apdex_t) ⇒ Object


142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/new_relic/agent/stats.rb', line 142

def record_apdex(bucket, apdex_t)
  @lock.synchronize do
    case bucket
    when :apdex_s then @call_count += 1
    when :apdex_t then @total_call_time += 1
    when :apdex_f then @total_exclusive_time += 1
    end
    if apdex_t
      @min_call_time = apdex_t
      @max_call_time = apdex_t
    else
      ::NewRelic::Agent.logger.warn("Attempted to set apdex_t to #{apdex_t.inspect}, backtrace = #{caller.join("\n")}")
    end
  end
end