Lines Matching refs:ms
62 const StatsRecords::Record recordNoError = {NS_R_NO_ERROR, 10ms}; in TEST_F()
63 const StatsRecords::Record recordTimeout = {NS_R_TIMEOUT, 250ms}; in TEST_F()
66 EXPECT_EQ(sr.getStatsData(), makeStatsData(server, 0, 0ms, {})); in TEST_F()
69 EXPECT_EQ(sr.getStatsData(), makeStatsData(server, 1, 10ms, {{NS_R_NO_ERROR, 1}})); in TEST_F()
72 EXPECT_EQ(sr.getStatsData(), makeStatsData(server, 2, 20ms, {{NS_R_NO_ERROR, 2}})); in TEST_F()
76 makeStatsData(server, 3, 270ms, {{NS_R_NO_ERROR, 2}, {NS_R_TIMEOUT, 1}})); in TEST_F()
80 makeStatsData(server, 3, 510ms, {{NS_R_NO_ERROR, 1}, {NS_R_TIMEOUT, 2}})); in TEST_F()
84 makeStatsData(server, 3, 750ms, {{NS_R_NO_ERROR, 0}, {NS_R_TIMEOUT, 3}})); in TEST_F()
192 expectedStats.push_back(makeStatsData(IPSockAddr::toIPSockAddr(exp, 53), 0, 0ms, {})); in TEST_F()
226 makeStatsData(servers[2], 0, 0ms, {}), makeStatsData(servers[3], 0, 0ms, {}), in TEST_F()
227 makeStatsData(servers[4], 0, 0ms, {}), makeStatsData(servers[5], 0, 0ms, {}), in TEST_F()
228 makeStatsData(servers[6], 0, 0ms, {}), makeStatsData(servers[7], 0, 0ms, {}), in TEST_F()
242 const DnsQueryEvent record = makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 10ms); in TEST_F()
256 makeStatsData(servers[0], 0, 0ms, {}), in TEST_F()
257 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
260 makeStatsData(servers[0], 2, 20ms, {{NS_R_NO_ERROR, 2}}), in TEST_F()
261 makeStatsData(servers[1], 1, 10ms, {{NS_R_NO_ERROR, 1}}), in TEST_F()
284 const DnsQueryEvent recordNoError = makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 10ms); in TEST_F()
285 const DnsQueryEvent recordTimeout = makeDnsQueryEvent(PROTO_UDP, NS_R_TIMEOUT, 250ms); in TEST_F()
299 makeStatsData(servers[0], 1, 10ms, {{NS_R_NO_ERROR, 1}}), in TEST_F()
300 makeStatsData(servers[1], 4, 520ms, {{NS_R_NO_ERROR, 2}, {NS_R_TIMEOUT, 2}}), in TEST_F()
313 makeStatsData(servers[0], 4, 520ms, {{NS_R_NO_ERROR, 2}, {NS_R_TIMEOUT, 2}}), in TEST_F()
314 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
315 makeStatsData(servers[2], 0, 0ms, {}), in TEST_F()
323 makeStatsData(servers[0], 5, 530ms, {{NS_R_NO_ERROR, 3}, {NS_R_TIMEOUT, 2}}), in TEST_F()
324 makeStatsData(servers[1], 0, 0ms, {}), in TEST_F()
325 makeStatsData(servers[2], 0, 0ms, {}), in TEST_F()
358 const auto eventTcp = makeDnsQueryEvent(PROTO_TCP, rcode, 10ms); in TEST_F()
359 const auto eventUdp = makeDnsQueryEvent(PROTO_UDP, rcode, 10ms); in TEST_F()
360 const auto eventDot = makeDnsQueryEvent(PROTO_DOT, rcode, 10ms); in TEST_F()
374 makeStatsData(servers[0], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
375 makeStatsData(servers[1], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
376 makeStatsData(servers[2], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
377 makeStatsData(servers[3], logSize, logSize * 10ms, expectedRcodeCounts), in TEST_F()
402 EXPECT_TRUE(mDnsStats.addStats(server1, makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 10ms))); in TEST_F()
407 EXPECT_TRUE(mDnsStats.addStats(server3, makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 5ms))); in TEST_F()
413 EXPECT_TRUE(mDnsStats.addStats(server2, makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 0ms))); in TEST_F()
418 EXPECT_TRUE(mDnsStats.addStats(server4, makeDnsQueryEvent(PROTO_DOT, NS_R_NO_ERROR, 10ms))); in TEST_F()
423 EXPECT_TRUE(mDnsStats.addStats(server4, makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 500000ms))); in TEST_F()
434 EXPECT_FALSE(mDnsStats.addStats(server1, makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 10ms))); in TEST_F()
455 makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 200ms))); in TEST_F()
460 makeDnsQueryEvent(PROTO_UDP, NS_R_NO_ERROR, 100ms))); in TEST_F()
465 makeDnsQueryEvent(PROTO_UDP, NS_R_TIMEOUT, 1000ms))); in TEST_F()
469 makeDnsQueryEvent(PROTO_UDP, NS_R_INTERNAL_ERROR, 1ms))); in TEST_F()