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

Unified Diff: webrtc/video/rampup_tests.cc

Issue 1383223002: In rampup tests, set start time when starting poller thread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed nit Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rampup_tests.cc
diff --git a/webrtc/video/rampup_tests.cc b/webrtc/video/rampup_tests.cc
index 526f4a4f768954fb9952945426033a73ac850bf2..6459c3b30ecf5868f9b9567b92d0e968c9cbcf2d 100644
--- a/webrtc/video/rampup_tests.cc
+++ b/webrtc/video/rampup_tests.cc
@@ -55,7 +55,7 @@ RampUpTester::RampUpTester(size_t num_streams,
start_bitrate_bps_(start_bitrate_bps),
start_bitrate_verified_(false),
expected_bitrate_bps_(0),
- test_start_ms_(clock_->TimeInMilliseconds()),
+ test_start_ms_(-1),
ramp_up_finished_ms_(-1),
extension_type_(extension_type),
ssrcs_(GenerateSsrcs(num_streams, 100)),
@@ -226,6 +226,8 @@ void RampUpTester::AccumulateStats(const VideoSendStream::StreamStats& stream,
}
void RampUpTester::TriggerTestDone() {
+ RTC_DCHECK_GE(test_start_ms_, 0);
+
VideoSendStream::Stats send_stats = send_stream_->GetStats();
size_t total_packets_sent = 0;
@@ -262,6 +264,7 @@ void RampUpTester::TriggerTestDone() {
}
void RampUpTester::PerformTest() {
+ test_start_ms_ = clock_->TimeInMilliseconds();
poller_thread_->Start();
if (Wait() != kEventSignaled) {
printf("Timed out while waiting for ramp-up to complete.");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698