Method: NewRelic::Agent::Stats#record_data_point
- Defined in:
- lib/new_relic/agent/stats.rb
permalink #record_data_point(value, exclusive_time = value) ⇒ Object Also known as: trace_call
record a single data point into the statistical gatherer. The gatherer will aggregate all data points collected over a specified period and upload its data to the NewRelic server
96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/new_relic/agent/stats.rb', line 96 def record_data_point(value, exclusive_time = value) @lock.synchronize do @call_count += 1 @total_call_time += value @min_call_time = value if value < @min_call_time || @call_count == 1 @max_call_time = value if value > @max_call_time @total_exclusive_time += exclusive_time @sum_of_squares += (value * value) end self end |