diff options
author | Yuchen Wu <[email protected]> | 2024-03-29 15:42:20 -0700 |
---|---|---|
committer | Andrew Hauck <[email protected]> | 2024-04-05 11:46:20 -0700 |
commit | dfcd3d1d9f493b830e97757ba8d43c07ee81c030 (patch) | |
tree | 0cfa357cd4257b0ea2b7c2d116c937426190b1cd /pingora-limits | |
parent | 3c5d99c3f49a8d40a0fc16895b148dea9ea18e8d (diff) | |
download | pingora-dfcd3d1d9f493b830e97757ba8d43c07ee81c030.tar.gz pingora-dfcd3d1d9f493b830e97757ba8d43c07ee81c030.zip |
Fix typos and grammar issues in docs
And other things.
Co-authored-by: DimanNe <[email protected]>
Co-authored-by: Xiaobo Liu <[email protected]>
Co-authored-by: houseme <[email protected]>
Co-authored-by: lilo <[email protected]>
Co-authored-by: Yang He <[email protected]>
Diffstat (limited to 'pingora-limits')
-rw-r--r-- | pingora-limits/src/rate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pingora-limits/src/rate.rs b/pingora-limits/src/rate.rs index 40f7605..f72cf20 100644 --- a/pingora-limits/src/rate.rs +++ b/pingora-limits/src/rate.rs @@ -29,7 +29,7 @@ pub struct Rate { // 2 slots so that we use one to collect the current events and the other to report rate red_slot: Estimator, blue_slot: Estimator, - red_or_blue: AtomicBool, // true: current slot is red, otherwise blue + red_or_blue: AtomicBool, // true: the current slot is red, otherwise blue start: Instant, // Use u64 below instead of Instant because we want atomic operation reset_interval_ms: u64, // the time interval to reset `current` and move it to `previous` @@ -160,6 +160,6 @@ mod tests { // second: 3 sleep(Duration::from_secs(1)); - assert_eq!(r.rate(&key), 0f64); // no event observed in the past 2 second + assert_eq!(r.rate(&key), 0f64); // no event observed in the past 2 seconds } } |