Lines Matching refs:now
25 Timestamp now = Timestamp::Millis(0); in TEST() local
26 const Timestamp start_time = now; in TEST()
27 EXPECT_EQ(prober.NextProbeTime(now), Timestamp::PlusInfinity()); in TEST()
35 prober.CreateProbeCluster(kTestBitrate1, now, 0); in TEST()
36 prober.CreateProbeCluster(kTestBitrate2, now, 1); in TEST()
41 EXPECT_EQ(0, prober.CurrentCluster(now)->probe_cluster_id); in TEST()
44 EXPECT_EQ(Timestamp::MinusInfinity(), prober.NextProbeTime(now)); in TEST()
47 now = std::max(now, prober.NextProbeTime(now)); in TEST()
48 EXPECT_EQ(now, std::max(now, prober.NextProbeTime(now))); in TEST()
49 EXPECT_EQ(0, prober.CurrentCluster(now)->probe_cluster_id); in TEST()
50 prober.ProbeSent(now, kProbeSize); in TEST()
53 EXPECT_GE(now - start_time, kMinProbeDuration); in TEST()
55 DataRate bitrate = kProbeSize * (kClusterSize - 1) / (now - start_time); in TEST()
59 now = std::max(now, prober.NextProbeTime(now)); in TEST()
60 Timestamp probe2_started = now; in TEST()
63 now = std::max(now, prober.NextProbeTime(now)); in TEST()
64 EXPECT_EQ(now, std::max(now, prober.NextProbeTime(now))); in TEST()
65 EXPECT_EQ(1, prober.CurrentCluster(now)->probe_cluster_id); in TEST()
66 prober.ProbeSent(now, kProbeSize); in TEST()
70 TimeDelta duration = now - probe2_started; in TEST()
76 EXPECT_EQ(prober.NextProbeTime(now), Timestamp::PlusInfinity()); in TEST()
85 Timestamp now = Timestamp::Zero(); in TEST() local
86 EXPECT_EQ(prober.NextProbeTime(now), Timestamp::PlusInfinity()); in TEST()
88 prober.CreateProbeCluster(DataRate::KilobitsPerSec(900), now, 0); in TEST()
93 EXPECT_EQ(now, std::max(now, prober.NextProbeTime(now))); in TEST()
94 prober.ProbeSent(now, kProbeSize); in TEST()
106 Timestamp now = Timestamp::Zero(); in TEST() local
107 prober.CreateProbeCluster(DataRate::KilobitsPerSec(900), now, 0); in TEST()
110 EXPECT_EQ(prober.CurrentCluster(now)->probe_cluster_id, 0); in TEST()
112 now = std::max(now, prober.NextProbeTime(now)); in TEST()
113 prober.ProbeSent(now, kProbeSize); in TEST()
116 Timestamp next_probe_time = prober.NextProbeTime(now); in TEST()
117 EXPECT_GT(next_probe_time, now); in TEST()
118 now += next_probe_time - now + kMaxProbeDelay + TimeDelta::Millis(1); in TEST()
120 EXPECT_EQ(prober.NextProbeTime(now), Timestamp::PlusInfinity()); in TEST()
124 EXPECT_EQ(prober.NextProbeTime(now), Timestamp::PlusInfinity()); in TEST()
136 Timestamp now = Timestamp::Zero(); in TEST() local
139 prober.CreateProbeCluster(DataRate::KilobitsPerSec(900), now, /*id=*/0); in TEST()
143 EXPECT_EQ(prober.CurrentCluster(now)->probe_cluster_id, 0); in TEST()
145 now = std::max(now, prober.NextProbeTime(now)); in TEST()
146 prober.ProbeSent(now, kProbeSize); in TEST()
149 Timestamp next_probe_time = prober.NextProbeTime(now); in TEST()
150 EXPECT_GT(next_probe_time, now); in TEST()
151 now += next_probe_time - now + kMaxProbeDelay + TimeDelta::Millis(1); in TEST()
154 EXPECT_EQ(prober.NextProbeTime(now), next_probe_time); in TEST()
156 EXPECT_FALSE(prober.CurrentCluster(now).has_value()); in TEST()
191 Timestamp now = Timestamp::Millis(0); in TEST() local
192 prober.CreateProbeCluster(kBitrate, now, 0); in TEST()
196 prober.ProbeSent(now, kPacketSize); in TEST()
209 Timestamp now = Timestamp::Millis(0); in TEST() local
210 prober.CreateProbeCluster(kBitrate, now, /*cluster_id=*/0); in TEST()
215 prober.ProbeSent(now, kPacketSize); in TEST()
229 Timestamp now = Timestamp::Millis(0); in TEST() local
230 prober.CreateProbeCluster(kBitrate, now, 0); in TEST()
235 prober.ProbeSent(now, kPacketSize); in TEST()
251 Timestamp now = Timestamp::Millis(0); in TEST() local
252 prober.CreateProbeCluster(kBitrate, now, /*cluster_id=*/0); in TEST()
255 now += kTimeout; in TEST()
256 prober.CreateProbeCluster(kBitrate / 10, now, /*cluster_id=*/1); in TEST()
259 now += TimeDelta::Millis(1); in TEST()
260 prober.CreateProbeCluster(kBitrate / 10, now, /*cluster_id=*/2); in TEST()
266 prober.ProbeSent(now, kSmallPacketSize); in TEST()