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, #fraction_of, #get_apdex, #is_reset?, #merge, #merge!, #merge_attributes, #midpoint, #min_time_less?, #multiply_by, #reset, #should_replace_begin_time?, #should_replace_end_time?, #split, #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.



371
372
373
374
# File 'lib/new_relic/stats.rb', line 371

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

Instance Attribute Details

#unscoped_statsObject

Returns the value of attribute unscoped_stats.



370
371
372
# File 'lib/new_relic/stats.rb', line 370

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



382
383
384
385
# File 'lib/new_relic/stats.rb', line 382

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



375
376
377
378
# File 'lib/new_relic/stats.rb', line 375

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