Add limit for minimum number of required samples before recording input and sent framerate stats.
BUG= Review URL: https://codereview.webrtc.org/1446443002 Cr-Commit-Position: refs/heads/master@{#10644}
This commit is contained in:
@ -2003,6 +2003,10 @@ void EndToEndTest::VerifyHistogramStats(bool use_rtx, bool use_red) {
|
||||
"WebRTC.Video.DecodedFramesPerSecond"));
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.RenderFramesPerSecond"));
|
||||
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.OnewayDelayInMs"));
|
||||
EXPECT_EQ(
|
||||
1, test::NumHistogramSamples("WebRTC.Video.RenderSqrtPixelsPerSecond"));
|
||||
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.EncodeTimeInMs"));
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.DecodeTimeInMs"));
|
||||
|
||||
@ -2023,6 +2027,9 @@ void EndToEndTest::VerifyHistogramStats(bool use_rtx, bool use_red) {
|
||||
EXPECT_EQ(1, test::NumHistogramSamples(
|
||||
"WebRTC.Video.RetransmittedBitrateReceivedInKbps"));
|
||||
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.SendSideDelayInMs"));
|
||||
EXPECT_EQ(1, test::NumHistogramSamples("WebRTC.Video.SendSideDelayMaxInMs"));
|
||||
|
||||
int num_rtx_samples = use_rtx ? 1 : 0;
|
||||
EXPECT_EQ(num_rtx_samples, test::NumHistogramSamples(
|
||||
"WebRTC.Video.RtxBitrateSentInKbps"));
|
||||
|
@ -70,27 +70,22 @@ SendStatisticsProxy::~SendStatisticsProxy() {
|
||||
}
|
||||
|
||||
void SendStatisticsProxy::UpdateHistograms() {
|
||||
int input_fps =
|
||||
round(input_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (input_fps > 0)
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.InputFramesPerSecond", input_fps);
|
||||
int sent_fps =
|
||||
round(sent_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (sent_fps > 0)
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.SentFramesPerSecond", sent_fps);
|
||||
|
||||
const int kMinRequiredSamples = 200;
|
||||
int in_width = input_width_counter_.Avg(kMinRequiredSamples);
|
||||
int in_height = input_height_counter_.Avg(kMinRequiredSamples);
|
||||
int in_fps = round(input_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (in_width != -1) {
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.InputWidthInPixels", in_width);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.InputHeightInPixels", in_height);
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.InputFramesPerSecond", in_fps);
|
||||
}
|
||||
int sent_width = sent_width_counter_.Avg(kMinRequiredSamples);
|
||||
int sent_height = sent_height_counter_.Avg(kMinRequiredSamples);
|
||||
int sent_fps = round(sent_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (sent_width != -1) {
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.SentWidthInPixels", sent_width);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.SentHeightInPixels", sent_height);
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.SentFramesPerSecond", sent_fps);
|
||||
}
|
||||
int encode_ms = encode_time_counter_.Avg(kMinRequiredSamples);
|
||||
if (encode_ms != -1)
|
||||
|
Reference in New Issue
Block a user