class ScoutApm::SlowPolicy::PercentPolicy
Constants
- POINT_MULTIPLIER_PERCENT_TIME
-
Points for an endpoint’s who’s throughput * response time is a large % of overall time spent processing requests
Public Instance Methods
Source
# File lib/scout_apm/slow_policy/percent_policy.rb, line 16 def call(request) # Scale 0.0 - 1.0 percent = context.transaction_time_consumed.percent_of_total(request.unique_name) percent * POINT_MULTIPLIER_PERCENT_TIME end
Of the total time spent handling endpoints in this app, if this endpoint is a higher percent, it should get more points.
A: 20 calls @ 100ms each => 2 seconds of total time B: 10 calls @ 100ms each => 1 second of total time
Then A is 66% of the total call time