Module NewRelic::Agent::BusyCalculator
In: lib/new_relic/agent/busy_calculator.rb

This module supports calculation of actual time spent processing requests over the course of one harvest period. It‘s similar to what you would get if you just added up all the execution times of controller calls, however that will be inaccurate when requests span the minute boundaries. This module manages accounting of requests not yet completed.

Calls are re-entrant. All start calls must be paired with finish calls, or a reset call.

Methods

Attributes

accumulator  [R]  For testability, add accessors:
harvest_start  [R]  For testability, add accessors:

Public Instance methods

this returns the size of the entry point stack, which determines how many transactions are running

called when a transaction finishes, to add time to the instance variable accumulator. this is harvested when we send data to the server

sets up busy calculations based on the start and end of transactions - used for a rough estimate of what percentage of wall clock time is spent processing requests

Called before uploading to to the server to collect current busy stats.

Reset the state of the information accumulated by all threads, but only reset the recursion counter for this thread.

[Validate]