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

Side by Side Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: use namespace instead of struct Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecoderImplementationName) { 197 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecoderImplementationName) {
198 const char* kName = "decoderName"; 198 const char* kName = "decoderName";
199 statistics_proxy_->OnDecoderImplementationName(kName); 199 statistics_proxy_->OnDecoderImplementationName(kName);
200 EXPECT_STREQ( 200 EXPECT_STREQ(
201 kName, statistics_proxy_->GetStats().decoder_implementation_name.c_str()); 201 kName, statistics_proxy_->GetStats().decoder_implementation_name.c_str());
202 } 202 }
203 203
204 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsOnCompleteFrame) { 204 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsOnCompleteFrame) {
205 const int kFrameSizeBytes = 1000; 205 const int kFrameSizeBytes = 1000;
206 statistics_proxy_->OnCompleteFrame(true, kFrameSizeBytes); 206 statistics_proxy_->OnCompleteFrame(true, kFrameSizeBytes,
207 VideoContentType::UNSPECIFIED);
207 VideoReceiveStream::Stats stats = statistics_proxy_->GetStats(); 208 VideoReceiveStream::Stats stats = statistics_proxy_->GetStats();
208 EXPECT_EQ(1, stats.network_frame_rate); 209 EXPECT_EQ(1, stats.network_frame_rate);
209 EXPECT_EQ(1, stats.frame_counts.key_frames); 210 EXPECT_EQ(1, stats.frame_counts.key_frames);
210 EXPECT_EQ(0, stats.frame_counts.delta_frames); 211 EXPECT_EQ(0, stats.frame_counts.delta_frames);
211 } 212 }
212 213
213 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecodeTimingStats) { 214 TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecodeTimingStats) {
214 const int kDecodeMs = 1; 215 const int kDecodeMs = 1;
215 const int kMaxDecodeMs = 2; 216 const int kMaxDecodeMs = 2;
216 const int kCurrentDelayMs = 3; 217 const int kCurrentDelayMs = 3;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 result = statistics_proxy_->GetAndResetTimingFrameInfo(); 346 result = statistics_proxy_->GetAndResetTimingFrameInfo();
346 EXPECT_TRUE(result); 347 EXPECT_TRUE(result);
347 EXPECT_EQ(kExpectedRtpTimestamp, result->rtp_timestamp); 348 EXPECT_EQ(kExpectedRtpTimestamp, result->rtp_timestamp);
348 result = statistics_proxy_->GetAndResetTimingFrameInfo(); 349 result = statistics_proxy_->GetAndResetTimingFrameInfo();
349 EXPECT_FALSE(result); 350 EXPECT_FALSE(result);
350 } 351 }
351 352
352 TEST_F(ReceiveStatisticsProxyTest, LifetimeHistogramIsUpdated) { 353 TEST_F(ReceiveStatisticsProxyTest, LifetimeHistogramIsUpdated) {
353 const int64_t kTimeSec = 3; 354 const int64_t kTimeSec = 3;
354 fake_clock_.AdvanceTimeMilliseconds(kTimeSec * 1000); 355 fake_clock_.AdvanceTimeMilliseconds(kTimeSec * 1000);
356 // Need at least one frame to report stream lifetime.
357 statistics_proxy_->OnCompleteFrame(true, 1000, VideoContentType::UNSPECIFIED);
355 // Histograms are updated when the statistics_proxy_ is deleted. 358 // Histograms are updated when the statistics_proxy_ is deleted.
356 statistics_proxy_.reset(); 359 statistics_proxy_.reset();
357 EXPECT_EQ(1, 360 EXPECT_EQ(1,
358 metrics::NumSamples("WebRTC.Video.ReceiveStreamLifetimeInSeconds")); 361 metrics::NumSamples("WebRTC.Video.ReceiveStreamLifetimeInSeconds"));
359 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.ReceiveStreamLifetimeInSeconds", 362 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.ReceiveStreamLifetimeInSeconds",
360 kTimeSec)); 363 kTimeSec));
361 } 364 }
362 365
366 TEST_F(ReceiveStatisticsProxyTest,
367 LifetimeHistogramNotReportedForEmptyStreams) {
368 const int64_t kTimeSec = 3;
369 fake_clock_.AdvanceTimeMilliseconds(kTimeSec * 1000);
370 // No frames received.
371 // Histograms are updated when the statistics_proxy_ is deleted.
372 statistics_proxy_.reset();
373 EXPECT_EQ(0,
374 metrics::NumSamples("WebRTC.Video.ReceiveStreamLifetimeInSeconds"));
375 }
376
363 TEST_F(ReceiveStatisticsProxyTest, BadCallHistogramsAreUpdated) { 377 TEST_F(ReceiveStatisticsProxyTest, BadCallHistogramsAreUpdated) {
364 // Based on the tuning parameters this will produce 7 uncertain states, 378 // Based on the tuning parameters this will produce 7 uncertain states,
365 // then 10 certainly bad states. There has to be 10 certain states before 379 // then 10 certainly bad states. There has to be 10 certain states before
366 // any histograms are recorded. 380 // any histograms are recorded.
367 const int kNumBadSamples = 17; 381 const int kNumBadSamples = 17;
368 382
369 StreamDataCounters counters; 383 StreamDataCounters counters;
370 counters.first_packet_time_ms = fake_clock_.TimeInMilliseconds(); 384 counters.first_packet_time_ms = fake_clock_.TimeInMilliseconds();
371 statistics_proxy_->DataCountersUpdated(counters, config_.rtp.remote_ssrc); 385 statistics_proxy_->DataCountersUpdated(counters, config_.rtp.remote_ssrc);
372 386
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 statistics_proxy_.reset(); 540 statistics_proxy_.reset();
527 EXPECT_EQ(0, metrics::NumSamples("WebRTC.Video.Decoded.Vp8.Qp")); 541 EXPECT_EQ(0, metrics::NumSamples("WebRTC.Video.Decoded.Vp8.Qp"));
528 } 542 }
529 543
530 TEST_F(ReceiveStatisticsProxyTest, 544 TEST_F(ReceiveStatisticsProxyTest,
531 KeyFrameHistogramNotUpdatedForTooFewSamples) { 545 KeyFrameHistogramNotUpdatedForTooFewSamples) {
532 const bool kIsKeyFrame = false; 546 const bool kIsKeyFrame = false;
533 const int kFrameSizeBytes = 1000; 547 const int kFrameSizeBytes = 1000;
534 548
535 for (int i = 0; i < kMinRequiredSamples - 1; ++i) 549 for (int i = 0; i < kMinRequiredSamples - 1; ++i)
536 statistics_proxy_->OnCompleteFrame(kIsKeyFrame, kFrameSizeBytes); 550 statistics_proxy_->OnCompleteFrame(kIsKeyFrame, kFrameSizeBytes,
551 VideoContentType::UNSPECIFIED);
537 552
538 EXPECT_EQ(0, statistics_proxy_->GetStats().frame_counts.key_frames); 553 EXPECT_EQ(0, statistics_proxy_->GetStats().frame_counts.key_frames);
539 EXPECT_EQ(kMinRequiredSamples - 1, 554 EXPECT_EQ(kMinRequiredSamples - 1,
540 statistics_proxy_->GetStats().frame_counts.delta_frames); 555 statistics_proxy_->GetStats().frame_counts.delta_frames);
541 556
542 statistics_proxy_.reset(); 557 statistics_proxy_.reset();
543 EXPECT_EQ(0, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille")); 558 EXPECT_EQ(0, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille"));
544 } 559 }
545 560
546 TEST_F(ReceiveStatisticsProxyTest, 561 TEST_F(ReceiveStatisticsProxyTest,
547 KeyFrameHistogramUpdatedForMinRequiredSamples) { 562 KeyFrameHistogramUpdatedForMinRequiredSamples) {
548 const bool kIsKeyFrame = false; 563 const bool kIsKeyFrame = false;
549 const int kFrameSizeBytes = 1000; 564 const int kFrameSizeBytes = 1000;
550 565
551 for (int i = 0; i < kMinRequiredSamples; ++i) 566 for (int i = 0; i < kMinRequiredSamples; ++i)
552 statistics_proxy_->OnCompleteFrame(kIsKeyFrame, kFrameSizeBytes); 567 statistics_proxy_->OnCompleteFrame(kIsKeyFrame, kFrameSizeBytes,
568 VideoContentType::UNSPECIFIED);
553 569
554 EXPECT_EQ(0, statistics_proxy_->GetStats().frame_counts.key_frames); 570 EXPECT_EQ(0, statistics_proxy_->GetStats().frame_counts.key_frames);
555 EXPECT_EQ(kMinRequiredSamples, 571 EXPECT_EQ(kMinRequiredSamples,
556 statistics_proxy_->GetStats().frame_counts.delta_frames); 572 statistics_proxy_->GetStats().frame_counts.delta_frames);
557 573
558 statistics_proxy_.reset(); 574 statistics_proxy_.reset();
559 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille")); 575 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille"));
560 EXPECT_EQ(1, 576 EXPECT_EQ(1,
561 metrics::NumEvents("WebRTC.Video.KeyFramesReceivedInPermille", 0)); 577 metrics::NumEvents("WebRTC.Video.KeyFramesReceivedInPermille", 0));
562 } 578 }
563 579
564 TEST_F(ReceiveStatisticsProxyTest, KeyFrameHistogramIsUpdated) { 580 TEST_F(ReceiveStatisticsProxyTest, KeyFrameHistogramIsUpdated) {
565 const int kFrameSizeBytes = 1000; 581 const int kFrameSizeBytes = 1000;
566 582
567 for (int i = 0; i < kMinRequiredSamples; ++i) 583 for (int i = 0; i < kMinRequiredSamples; ++i)
568 statistics_proxy_->OnCompleteFrame(true, kFrameSizeBytes); 584 statistics_proxy_->OnCompleteFrame(true, kFrameSizeBytes,
585 VideoContentType::UNSPECIFIED);
569 586
570 for (int i = 0; i < kMinRequiredSamples; ++i) 587 for (int i = 0; i < kMinRequiredSamples; ++i)
571 statistics_proxy_->OnCompleteFrame(false, kFrameSizeBytes); 588 statistics_proxy_->OnCompleteFrame(false, kFrameSizeBytes,
589 VideoContentType::UNSPECIFIED);
572 590
573 EXPECT_EQ(kMinRequiredSamples, 591 EXPECT_EQ(kMinRequiredSamples,
574 statistics_proxy_->GetStats().frame_counts.key_frames); 592 statistics_proxy_->GetStats().frame_counts.key_frames);
575 EXPECT_EQ(kMinRequiredSamples, 593 EXPECT_EQ(kMinRequiredSamples,
576 statistics_proxy_->GetStats().frame_counts.delta_frames); 594 statistics_proxy_->GetStats().frame_counts.delta_frames);
577 595
578 statistics_proxy_.reset(); 596 statistics_proxy_.reset();
579 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille")); 597 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille"));
580 EXPECT_EQ( 598 EXPECT_EQ(
581 1, metrics::NumEvents("WebRTC.Video.KeyFramesReceivedInPermille", 500)); 599 1, metrics::NumEvents("WebRTC.Video.KeyFramesReceivedInPermille", 500));
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 } 788 }
771 // One extra with with double the interval. 789 // One extra with with double the interval.
772 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs); 790 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs);
773 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type); 791 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
774 792
775 statistics_proxy_.reset(); 793 statistics_proxy_.reset();
776 const int kExpectedInterFrame = 794 const int kExpectedInterFrame =
777 (kInterFrameDelayMs * (kMinRequiredSamples - 1) + 795 (kInterFrameDelayMs * (kMinRequiredSamples - 1) +
778 kInterFrameDelayMs * 2) / 796 kInterFrameDelayMs * 2) /
779 kMinRequiredSamples; 797 kMinRequiredSamples;
780 switch (content_type) { 798 if (videocontenttypehelpers::IsScreenshare(content_type)) {
781 case VideoContentType::UNSPECIFIED: 799 EXPECT_EQ(
782 EXPECT_EQ(kExpectedInterFrame, 800 kExpectedInterFrame,
783 metrics::MinSample("WebRTC.Video.InterframeDelayInMs")); 801 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs"));
784 EXPECT_EQ(kInterFrameDelayMs * 2, 802 EXPECT_EQ(
785 metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs")); 803 kInterFrameDelayMs * 2,
786 break; 804 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
787 case VideoContentType::SCREENSHARE: 805 } else {
788 EXPECT_EQ( 806 EXPECT_EQ(kExpectedInterFrame,
789 kExpectedInterFrame, 807 metrics::MinSample("WebRTC.Video.InterframeDelayInMs"));
790 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs")); 808 EXPECT_EQ(kInterFrameDelayMs * 2,
791 EXPECT_EQ(kInterFrameDelayMs * 2, 809 metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs"));
792 metrics::MinSample(
793 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
794 break;
795 default:
796 RTC_NOTREACHED();
797 } 810 }
798 } 811 }
799 812
800 TEST_P(ReceiveStatisticsProxyTest, MaxInterFrameDelayOnlyWithValidAverage) { 813 TEST_P(ReceiveStatisticsProxyTest, MaxInterFrameDelayOnlyWithValidAverage) {
801 const VideoContentType content_type = GetParam(); 814 const VideoContentType content_type = GetParam();
802 const int kInterFrameDelayMs = 33; 815 const int kInterFrameDelayMs = 33;
803 for (int i = 0; i < kMinRequiredSamples; ++i) { 816 for (int i = 0; i < kMinRequiredSamples; ++i) {
804 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type); 817 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
805 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs); 818 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs);
806 } 819 }
(...skipping 22 matching lines...) Expand all
829 statistics_proxy_->OnStreamInactive(); 842 statistics_proxy_->OnStreamInactive();
830 fake_clock_.AdvanceTimeMilliseconds(5000); 843 fake_clock_.AdvanceTimeMilliseconds(5000);
831 844
832 // Insert two more frames. The interval during the pause should be disregarded 845 // Insert two more frames. The interval during the pause should be disregarded
833 // in the stats. 846 // in the stats.
834 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type); 847 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
835 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs); 848 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs);
836 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type); 849 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
837 850
838 statistics_proxy_.reset(); 851 statistics_proxy_.reset();
839 if (content_type == VideoContentType::SCREENSHARE) { 852 if (videocontenttypehelpers::IsScreenshare(content_type)) {
840 EXPECT_EQ( 853 EXPECT_EQ(
841 1, metrics::NumSamples("WebRTC.Video.Screenshare.InterframeDelayInMs")); 854 1, metrics::NumSamples("WebRTC.Video.Screenshare.InterframeDelayInMs"));
842 EXPECT_EQ(1, metrics::NumSamples( 855 EXPECT_EQ(1, metrics::NumSamples(
843 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs")); 856 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
844 EXPECT_EQ( 857 EXPECT_EQ(
845 kInterFrameDelayMs, 858 kInterFrameDelayMs,
846 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs")); 859 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs"));
847 EXPECT_EQ( 860 EXPECT_EQ(
848 kInterFrameDelayMs, 861 kInterFrameDelayMs,
849 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayMaxInMs")); 862 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
850 } else { 863 } else {
851 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs")); 864 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs"));
852 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs")); 865 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs"));
853 EXPECT_EQ(kInterFrameDelayMs, 866 EXPECT_EQ(kInterFrameDelayMs,
854 metrics::MinSample("WebRTC.Video.InterframeDelayInMs")); 867 metrics::MinSample("WebRTC.Video.InterframeDelayInMs"));
855 EXPECT_EQ(kInterFrameDelayMs, 868 EXPECT_EQ(kInterFrameDelayMs,
856 metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs")); 869 metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs"));
857 } 870 }
858 } 871 }
859 872
873 TEST_P(ReceiveStatisticsProxyTest, StatsAreSlicedOnSimulcastAndExperiment) {
874 VideoContentType content_type = GetParam();
875 const uint8_t experiment_id = 1;
876 videocontenttypehelpers::SetExperimentId(&content_type, experiment_id);
877 const int kInterFrameDelayMs1 = 30;
878 const int kInterFrameDelayMs2 = 50;
879
880 videocontenttypehelpers::SetSimulcastId(&content_type, 1);
881 for (int i = 0; i <= kMinRequiredSamples; ++i) {
882 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs1);
883 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
884 }
885
886 videocontenttypehelpers::SetSimulcastId(&content_type, 2);
887 for (int i = 0; i <= kMinRequiredSamples; ++i) {
888 fake_clock_.AdvanceTimeMilliseconds(kInterFrameDelayMs2);
889 statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(), content_type);
890 }
891 statistics_proxy_.reset();
892
893 if (videocontenttypehelpers::IsScreenshare(content_type)) {
894 EXPECT_EQ(
895 1, metrics::NumSamples("WebRTC.Video.Screenshare.InterframeDelayInMs"));
896 EXPECT_EQ(1, metrics::NumSamples(
897 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
898 EXPECT_EQ(1, metrics::NumSamples(
899 "WebRTC.Video.Screenshare.InterframeDelayInMs.S0"));
900 EXPECT_EQ(1, metrics::NumSamples(
901 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs.S0"));
902 EXPECT_EQ(1, metrics::NumSamples(
903 "WebRTC.Video.Screenshare.InterframeDelayInMs.S1"));
904 EXPECT_EQ(1, metrics::NumSamples(
905 "WebRTC.Video.Screenshare.InterframeDelayMaxInMs.S1"));
906 EXPECT_EQ(1,
907 metrics::NumSamples("WebRTC.Video.Screenshare.InterframeDelayInMs"
908 ".ExperimentGroup0"));
909 EXPECT_EQ(
910 1, metrics::NumSamples("WebRTC.Video.Screenshare.InterframeDelayMaxInMs"
911 ".ExperimentGroup0"));
912 EXPECT_EQ(
913 kInterFrameDelayMs1,
914 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs.S0"));
915 EXPECT_EQ(
916 kInterFrameDelayMs2,
917 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs.S1"));
918 EXPECT_EQ(
919 (kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2,
920 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayInMs"));
921 EXPECT_EQ(
922 kInterFrameDelayMs2,
923 metrics::MinSample("WebRTC.Video.Screenshare.InterframeDelayMaxInMs"));
924 EXPECT_EQ(
925 (kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2,
926 metrics::MinSample(
927 "WebRTC.Video.Screenshare.InterframeDelayInMs.ExperimentGroup0"));
928 } else {
929 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs"));
930 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs"));
931 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs.S0"));
932 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs.S0"));
933 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs.S1"));
934 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs.S1"));
935 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayInMs"
936 ".ExperimentGroup0"));
937 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InterframeDelayMaxInMs"
938 ".ExperimentGroup0"));
939 EXPECT_EQ(kInterFrameDelayMs1,
940 metrics::MinSample("WebRTC.Video.InterframeDelayInMs.S0"));
941 EXPECT_EQ(kInterFrameDelayMs2,
942 metrics::MinSample("WebRTC.Video.InterframeDelayInMs.S1"));
943 EXPECT_EQ((kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2,
944 metrics::MinSample("WebRTC.Video.InterframeDelayInMs"));
945 EXPECT_EQ(kInterFrameDelayMs2,
946 metrics::MinSample("WebRTC.Video.InterframeDelayMaxInMs"));
947 EXPECT_EQ((kInterFrameDelayMs1 + kInterFrameDelayMs2) / 2,
948 metrics::MinSample(
949 "WebRTC.Video.InterframeDelayInMs.ExperimentGroup0"));
950 }
951 }
952
860 } // namespace webrtc 953 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698