File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ lazy_static! {
43
43
. unwrap_or( 1e9 )
44
44
} ;
45
45
46
- static ref WAIT_STAT_CHECK_INTERVAL : Duration = Duration :: from_secs( 1 ) ;
47
-
48
46
// Load management can be disabled by setting the threshold to 0. This
49
47
// makes sure in particular that we never take any of the locks
50
48
// associated with it
@@ -396,15 +394,12 @@ impl LoadManager {
396
394
// to disrupt traffic for as little as possible.
397
395
const KILL_RATE_STEP_UP : f64 = 0.1 ;
398
396
const KILL_RATE_STEP_DOWN : f64 = 2.0 * KILL_RATE_STEP_UP ;
399
-
400
- lazy_static ! {
401
- static ref KILL_RATE_UPDATE_INTERVAL : Duration = Duration :: from_millis( 1000 ) ;
402
- }
397
+ const KILL_RATE_UPDATE_INTERVAL : Duration = Duration :: from_millis ( 1000 ) ;
403
398
404
399
assert ! ( overloaded || kill_rate > 0.0 ) ;
405
400
406
401
let now = Instant :: now ( ) ;
407
- if now. saturating_duration_since ( last_update) > * KILL_RATE_UPDATE_INTERVAL {
402
+ if now. saturating_duration_since ( last_update) > KILL_RATE_UPDATE_INTERVAL {
408
403
// Update the kill_rate
409
404
if overloaded {
410
405
kill_rate = ( kill_rate + KILL_RATE_STEP_UP * ( 1.0 - kill_rate) ) . min ( 1.0 ) ;
You can’t perform that action at this time.
0 commit comments