Update aggregating interval in getStats for receive side.

Now some metrics would be aggregated over 1s window instead of 10s.

Bug: webrtc:8402
Change-Id: If0b5a70257c767a1741b451585f3da501b903374
Reviewed-on: https://webrtc-review.googlesource.com/11400
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20316}
This commit is contained in:
Ilya Nikolaevskiy 2017-10-16 17:59:12 +02:00 committed by Commit Bot
parent 7ee54a3cfd
commit b06b358207
2 changed files with 6 additions and 4 deletions

View File

@ -45,7 +45,9 @@ const int kLowVarianceThreshold = 1;
const int kHighVarianceThreshold = 2;
// Some metrics are reported as a maximum over this period.
const int kMovingMaxWindowMs = 10000;
// This should be synchronized with a typical getStats polling interval in
// the clients.
const int kMovingMaxWindowMs = 1000;
// How large window we use to calculate the framerate/bitrate.
const int kRateStatisticsWindowSizeMs = 1000;

View File

@ -144,9 +144,9 @@ TEST_F(ReceiveStatisticsProxyTest, ReportsMaxInterframeDelay) {
}
TEST_F(ReceiveStatisticsProxyTest, ReportInterframeDelayInWindow) {
const int64_t kInterframeDelayMs1 = 9000;
const int64_t kInterframeDelayMs2 = 7500;
const int64_t kInterframeDelayMs3 = 7000;
const int64_t kInterframeDelayMs1 = 900;
const int64_t kInterframeDelayMs2 = 750;
const int64_t kInterframeDelayMs3 = 700;
EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms);
statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u),
VideoContentType::UNSPECIFIED);