Class: NewRelic::StatsBase
- Inherits:
-
Object
- Object
- NewRelic::StatsBase
- Includes:
- Stats
- Defined in:
- lib/new_relic/stats.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#call_count ⇒ Object
Returns the value of attribute call_count.
-
#max_call_time ⇒ Object
Returns the value of attribute max_call_time.
-
#min_call_time ⇒ Object
Returns the value of attribute min_call_time.
-
#sum_of_squares ⇒ Object
Returns the value of attribute sum_of_squares.
-
#total_call_time ⇒ Object
Returns the value of attribute total_call_time.
-
#total_exclusive_time ⇒ Object
Returns the value of attribute total_exclusive_time.
Instance Method Summary collapse
- #begin_time ⇒ Object
-
#begin_time=(t) ⇒ Object
In this class, we explicitly don’t track begin and end time here, to save space during cross process serialization via xml.
- #end_time ⇒ Object
- #end_time=(t) ⇒ Object
- #freeze ⇒ Object
-
#initialize ⇒ StatsBase
constructor
A new instance of StatsBase.
- #to_json(*a) ⇒ Object
Methods included from Stats
#absent?, #apdex_score, #as_percentage, #as_percentage_of, #average_call_time, #average_exclusive_time, #calls_per_minute, #duration, #exclusive_time_percentage, #fraction_of, #get_apdex, #is_reset?, #merge, #merge!, #multiply_by, #reset, #round!, #split, #standard_deviation, #sum_merge!, #summary, #time_percentage, #time_str, #to_s, #total_call_time_per_minute
Constructor Details
#initialize ⇒ StatsBase
Returns a new instance of StatsBase.
264 265 266 |
# File 'lib/new_relic/stats.rb', line 264 def initialize reset end |
Instance Attribute Details
#call_count ⇒ Object
Returns the value of attribute call_count.
257 258 259 |
# File 'lib/new_relic/stats.rb', line 257 def call_count @call_count end |
#max_call_time ⇒ Object
Returns the value of attribute max_call_time.
259 260 261 |
# File 'lib/new_relic/stats.rb', line 259 def max_call_time @max_call_time end |
#min_call_time ⇒ Object
Returns the value of attribute min_call_time.
258 259 260 |
# File 'lib/new_relic/stats.rb', line 258 def min_call_time @min_call_time end |
#sum_of_squares ⇒ Object
Returns the value of attribute sum_of_squares.
262 263 264 |
# File 'lib/new_relic/stats.rb', line 262 def sum_of_squares @sum_of_squares end |
#total_call_time ⇒ Object
Returns the value of attribute total_call_time.
260 261 262 |
# File 'lib/new_relic/stats.rb', line 260 def total_call_time @total_call_time end |
#total_exclusive_time ⇒ Object
Returns the value of attribute total_exclusive_time.
261 262 263 |
# File 'lib/new_relic/stats.rb', line 261 def total_exclusive_time @total_exclusive_time end |
Instance Method Details
#begin_time ⇒ Object
291 292 293 |
# File 'lib/new_relic/stats.rb', line 291 def begin_time 0.0 end |
#begin_time=(t) ⇒ Object
In this class, we explicitly don’t track begin and end time here, to save space during cross process serialization via xml. Still the accessor methods must be provided for merge to work.
285 286 |
# File 'lib/new_relic/stats.rb', line 285 def begin_time=(t) end |
#end_time ⇒ Object
295 296 297 |
# File 'lib/new_relic/stats.rb', line 295 def end_time 0.0 end |
#end_time=(t) ⇒ Object
288 289 |
# File 'lib/new_relic/stats.rb', line 288 def end_time=(t) end |
#freeze ⇒ Object
268 269 270 271 |
# File 'lib/new_relic/stats.rb', line 268 def freeze @end_time = Time.now super end |
#to_json(*a) ⇒ Object
273 274 275 276 277 278 279 280 |
# File 'lib/new_relic/stats.rb', line 273 def to_json(*a) {'call_count' => call_count, 'min_call_time' => min_call_time, 'max_call_time' => max_call_time, 'total_call_time' => total_call_time, 'total_exclusive_time' => total_exclusive_time, 'sum_of_squares' => sum_of_squares}.to_json(*a) end |