Skip to content

Commit

Permalink
reorder init again
Browse files Browse the repository at this point in the history
Signed-off-by: glorv <[email protected]>
  • Loading branch information
glorv committed Sep 19, 2023
1 parent dd1091d commit 40447e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions utilities/rate_limiters/write_amp_based_rate_limiter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ WriteAmpBasedRateLimiter::WriteAmpBasedRateLimiter(
duration_bytes_through_(0),
critical_pace_up_(false),
normal_pace_up_(false),
percent_delta_(0),
secs_per_tune_(secs_per_tune == 0 ? 1 : secs_per_tune),
bytes_sampler_(smooth_window_size, recent_window_size),
highpri_bytes_sampler_(smooth_window_size, recent_window_size),
limit_bytes_sampler_(recent_window_size, recent_window_size) {
limit_bytes_sampler_(recent_window_size, recent_window_size),
percent_delta_(0) {
total_requests_[0] = 0;
total_requests_[1] = 0;
total_bytes_through_[0] = 0;
Expand Down Expand Up @@ -419,8 +419,7 @@ RateLimiter* NewWriteAmpBasedRateLimiter(
assert(refill_period_us > 0);
assert(fairness > 0);
assert(tune_per_sec >= 0);
assert(smooth_window_size >= 0 && recent_window_size >= 0 &&
smooth_window_size >= recent_window_size);
assert(smooth_window_size >= recent_window_size);
if (smooth_window_size == 0) {
smooth_window_size = 300;
}
Expand Down

0 comments on commit 40447e3

Please sign in to comment.