Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1176)

Unified Diff: webrtc/video/send_delay_stats_unittest.cc

Issue 2013403002: Start integrating StatsCounter class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/send_delay_stats.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_delay_stats_unittest.cc
diff --git a/webrtc/video/send_delay_stats_unittest.cc b/webrtc/video/send_delay_stats_unittest.cc
index 7c60446232c9880ce74f664234c094bb2e11dc20..24d056c03b18cba4a3da595629de4e69633fc984 100644
--- a/webrtc/video/send_delay_stats_unittest.cc
+++ b/webrtc/video/send_delay_stats_unittest.cc
@@ -22,7 +22,8 @@ const uint32_t kRtxSsrc1 = 18;
const uint32_t kRtxSsrc2 = 43;
const uint16_t kPacketId = 2345;
const int64_t kMaxPacketDelayMs = 11000;
-const int kMinRequiredSamples = 200;
+const int kMinRequiredPeriodicSamples = 5;
+const int kProcessIntervalMs = 2000;
} // namespace
class SendDelayStatsTest : public ::testing::Test {
@@ -104,9 +105,12 @@ TEST_F(SendDelayStatsTest, OldPacketsRemoved) {
TEST_F(SendDelayStatsTest, HistogramsAreUpdated) {
metrics::Reset();
const int64_t kDelayMs1 = 5;
- const int64_t kDelayMs2 = 10;
+ const int64_t kDelayMs2 = 15;
+ const int kNumSamples = kMinRequiredPeriodicSamples * kProcessIntervalMs /
+ (kDelayMs1 + kDelayMs2) + 1;
+
uint16_t id = 0;
- for (int i = 0; i < kMinRequiredSamples; ++i) {
+ for (int i = 0; i < kNumSamples; ++i) {
OnSendPacket(++id, kSsrc1);
clock_.AdvanceTimeMilliseconds(kDelayMs1);
EXPECT_TRUE(OnSentPacket(id));
« no previous file with comments | « webrtc/video/send_delay_stats.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698