Home | History | Annotate | Download | only in download

Lines Matching refs:estimator

15   RateEstimator estimator(TimeDelta::FromSeconds(1), 10u, now);
16 EXPECT_EQ(0u, estimator.GetCountPerSecond(now));
18 estimator.Increment(50u, now);
19 EXPECT_EQ(50u, estimator.GetCountPerSecond(now));
22 estimator.Increment(50, now);
23 EXPECT_EQ(100u, estimator.GetCountPerSecond(now));
27 EXPECT_EQ(25u, estimator.GetCountPerSecond(now));
28 estimator.Increment(60, now);
29 EXPECT_EQ(40u, estimator.GetCountPerSecond(now));
33 EXPECT_EQ(20u, estimator.GetCountPerSecond(now));
37 EXPECT_EQ(16u, estimator.GetCountPerSecond(now));
38 estimator.Increment(100, now);
39 EXPECT_EQ(26u, estimator.GetCountPerSecond(now));
43 EXPECT_EQ(16u, estimator.GetCountPerSecond(now));
44 estimator.Increment(100, now);
45 EXPECT_EQ(26u, estimator.GetCountPerSecond(now));
49 EXPECT_EQ(0u, estimator.GetCountPerSecond(now));
50 estimator.Increment(100, now);
51 EXPECT_EQ(100u, estimator.GetCountPerSecond(now));
55 EXPECT_EQ(0u, estimator.GetCountPerSecond(now));