Method: OneApm::Metrics::Stats#record_data_point

Defined in:
lib/one_apm/metrics/stats.rb

#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 OneApm server



90
91
92
93
94
95
96
97
98
99
# File 'lib/one_apm/metrics/stats.rb', line 90

def record_data_point(value, exclusive_time = value)
  @call_count += 1
  @min_call_time = value if value < @min_call_time || @call_count == 1
  @max_call_time = value if value > @max_call_time
  @total_call_time += value
  @total_exclusive_time += exclusive_time

  @sum_of_squares += (value * value)
  self
end