diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc index 6ed3c4715f..c7133d058e 100644 --- a/webrtc/video/end_to_end_tests.cc +++ b/webrtc/video/end_to_end_tests.cc @@ -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")); diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc index 57189f3175..5c2052a207 100644 --- a/webrtc/video/send_statistics_proxy.cc +++ b/webrtc/video/send_statistics_proxy.cc @@ -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)