@ -2824,7 +2824,7 @@ TEST_F(DBTest, RateLimitingTest) {
// Most intervals should've been drained (interval time is 100ms, elapsed is
// Most intervals should've been drained (interval time is 100ms, elapsed is
// micros)
// micros)
ASSERT_GT ( rate_limiter_drains , elapsed / 100000 / 2 ) ;
ASSERT_GT ( rate_limiter_drains , elapsed / 100000 / 2 ) ;
ASSERT_LE ( rate_limiter_drains , elapsed / 100000 ) ;
ASSERT_LE ( rate_limiter_drains , elapsed / 100000 + 1 ) ;
double ratio = env_ - > bytes_written_ * 1000000 / elapsed / raw_rate ;
double ratio = env_ - > bytes_written_ * 1000000 / elapsed / raw_rate ;
fprintf ( stderr , " write rate ratio = %.2lf, expected 0.7 \n " , ratio ) ;
fprintf ( stderr , " write rate ratio = %.2lf, expected 0.7 \n " , ratio ) ;
ASSERT_TRUE ( ratio < 0.8 ) ;
ASSERT_TRUE ( ratio < 0.8 ) ;
@ -2850,7 +2850,7 @@ TEST_F(DBTest, RateLimitingTest) {
// Most intervals should've been drained (interval time is 100ms, elapsed is
// Most intervals should've been drained (interval time is 100ms, elapsed is
// micros)
// micros)
ASSERT_GT ( rate_limiter_drains , elapsed / 100000 / 2 ) ;
ASSERT_GT ( rate_limiter_drains , elapsed / 100000 / 2 ) ;
ASSERT_LE ( rate_limiter_drains , elapsed / 100000 ) ;
ASSERT_LE ( rate_limiter_drains , elapsed / 100000 + 1 ) ;
ratio = env_ - > bytes_written_ * 1000000 / elapsed / raw_rate ;
ratio = env_ - > bytes_written_ * 1000000 / elapsed / raw_rate ;
fprintf ( stderr , " write rate ratio = %.2lf, expected 0.5 \n " , ratio ) ;
fprintf ( stderr , " write rate ratio = %.2lf, expected 0.5 \n " , ratio ) ;
ASSERT_LT ( ratio , 0.6 ) ;
ASSERT_LT ( ratio , 0.6 ) ;