class ScoutApm::SlowPolicy::SpeedPolicy
Constants
- POINT_MULTIPLIER_SPEED
-
Adjust speed points. See the function
Public Instance Methods
Source
# File lib/scout_apm/slow_policy/speed_policy.rb, line 11 def call(request) total_time = request.root_layer.total_call_time Math.log(1 + total_time) * POINT_MULTIPLIER_SPEED end
Time in seconds Logarithm keeps huge times from swamping the other metrics. 1+ is necessary to keep the log function in positive territory.