Class: NewRelic::ScopedMethodTraceStats

Inherits:
MethodTraceStats show all
Defined in:
lib/new_relic/stats.rb

Instance Attribute Summary collapse

Attributes inherited from StatsBase

#call_count, #max_call_time, #min_call_time, #sum_of_squares, #total_call_time, #total_exclusive_time

Instance Method Summary collapse

Methods inherited from MethodTraceStats

#increment_count, #inspect, #record_data_point

Methods inherited from StatsBase

#begin_time, #begin_time=, #end_time, #end_time=, #freeze, #to_json

Methods included from Stats

#absent?, #apdex_score, #as_percentage, #as_percentage_of, #average_call_time, #average_exclusive_time, #calls_per_minute, #checked_calculation, #duration, #exclusive_time_percentage, #expand_min_max_to, #get_apdex, #is_reset?, #merge, #merge!, #merge_attributes, #midpoint, #min_time_less?, #multiply_by, #reset, #should_replace_begin_time?, #should_replace_end_time?, #stack_min_max_from, #standard_deviation, #sum_attributes, #sum_merge!, #summary, #time_percentage, #time_str, #to_s, #total_call_time_per_minute, #update_boundaries, #update_totals

Constructor Details

#initialize(unscoped_stats) ⇒ ScopedMethodTraceStats

Returns a new instance of ScopedMethodTraceStats.



318
319
320
321
# File 'lib/new_relic/stats.rb', line 318

def initialize(unscoped_stats)
  super()
  self.unscoped_stats = unscoped_stats
end

Instance Attribute Details

#unscoped_statsObject

Returns the value of attribute unscoped_stats.



317
318
319
# File 'lib/new_relic/stats.rb', line 317

def unscoped_stats
  @unscoped_stats
end

Instance Method Details

#record_multiple_data_points(total_value, count = 1) ⇒ Object

Records multiple data points as one method call - this handles all the aggregation that would be done with multiple trace_call calls



329
330
331
332
# File 'lib/new_relic/stats.rb', line 329

def record_multiple_data_points(total_value, count=1)
  unscoped_stats.record_multiple_data_points(total_value, count)
  super total_value, count
end

#trace_call(call_time, exclusive_time = call_time) ⇒ Object



322
323
324
325
# File 'lib/new_relic/stats.rb', line 322

def trace_call(call_time, exclusive_time = call_time)
  unscoped_stats.trace_call call_time, exclusive_time
  super call_time, exclusive_time
end