| Class | NewRelic::Agent::Transaction::TransactionSampleBuffer |
| In: |
lib/new_relic/agent/transaction/transaction_sample_buffer.rb
|
| Parent: | Object |
| SINGLE_BUFFER_MAX | = | 20 |
| NO_SAMPLES | = | [].freeze |
| samples | [R] |
Capacity is the desired number of samples a buffer will hold. This can be user dictated via config if a feature wants.
This value will be forcibly capped by the max_capacity
Apply hard upper limit to the capacity to prevent users from consuming too much memory buffering TT‘s.
A typical buffer should NOT override this method (although we do for odd things like dev-mode)
Our default truncation strategy is to keep max_capacity worth of the longest samples. Override this method for alternate behavior.
This doesn‘t use the more convenient last and sort_by to avoid additional array allocations (and abundant alliteration)