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

Side by Side Diff: webrtc/video/end_to_end_tests.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/system_wrappers/include/metrics.h ('k') | webrtc/video/receive_statistics_proxy.h » ('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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 10 #include <algorithm>
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 Call* receiver_call_; 2804 Call* receiver_call_;
2805 int64_t start_runtime_ms_; 2805 int64_t start_runtime_ms_;
2806 int num_frames_received_ GUARDED_BY(&crit_); 2806 int num_frames_received_ GUARDED_BY(&crit_);
2807 } test(use_rtx, use_red, screenshare); 2807 } test(use_rtx, use_red, screenshare);
2808 2808
2809 metrics::Reset(); 2809 metrics::Reset();
2810 RunBaseTest(&test); 2810 RunBaseTest(&test);
2811 2811
2812 std::string video_prefix = 2812 std::string video_prefix =
2813 screenshare ? "WebRTC.Video.Screenshare." : "WebRTC.Video."; 2813 screenshare ? "WebRTC.Video.Screenshare." : "WebRTC.Video.";
2814 2814 // The content type extension is disabled in non screenshare test,
2815 // therefore no slicing on simulcast id should be present.
2816 std::string video_suffix = screenshare ? ".S0" : "";
2815 // Verify that stats have been updated once. 2817 // Verify that stats have been updated once.
2816 EXPECT_EQ(2, metrics::NumSamples("WebRTC.Call.LifetimeInSeconds")); 2818 EXPECT_EQ(2, metrics::NumSamples("WebRTC.Call.LifetimeInSeconds"));
2817 EXPECT_EQ(1, metrics::NumSamples( 2819 EXPECT_EQ(1, metrics::NumSamples(
2818 "WebRTC.Call.TimeReceivingVideoRtpPacketsInSeconds")); 2820 "WebRTC.Call.TimeReceivingVideoRtpPacketsInSeconds"));
2819 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.VideoBitrateReceivedInKbps")); 2821 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.VideoBitrateReceivedInKbps"));
2820 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.RtcpBitrateReceivedInBps")); 2822 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.RtcpBitrateReceivedInBps"));
2821 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.BitrateReceivedInKbps")); 2823 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.BitrateReceivedInKbps"));
2822 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.EstimatedSendBitrateInKbps")); 2824 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.EstimatedSendBitrateInKbps"));
2823 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.PacerBitrateInKbps")); 2825 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Call.PacerBitrateInKbps"));
2824 2826
(...skipping 15 matching lines...) Expand all
2840 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille")); 2842 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.KeyFramesReceivedInPermille"));
2841 2843
2842 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentPacketsLostInPercent")); 2844 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentPacketsLostInPercent"));
2843 EXPECT_EQ(1, 2845 EXPECT_EQ(1,
2844 metrics::NumSamples("WebRTC.Video.ReceivedPacketsLostInPercent")); 2846 metrics::NumSamples("WebRTC.Video.ReceivedPacketsLostInPercent"));
2845 2847
2846 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputWidthInPixels")); 2848 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputWidthInPixels"));
2847 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputHeightInPixels")); 2849 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputHeightInPixels"));
2848 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentWidthInPixels")); 2850 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentWidthInPixels"));
2849 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentHeightInPixels")); 2851 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentHeightInPixels"));
2850 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.ReceivedWidthInPixels")); 2852 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "ReceivedWidthInPixels"));
2851 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.ReceivedHeightInPixels")); 2853 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "ReceivedHeightInPixels"));
2852 2854
2853 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "InputWidthInPixels", 2855 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "InputWidthInPixels",
2854 kDefaultWidth)); 2856 kDefaultWidth));
2855 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "InputHeightInPixels", 2857 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "InputHeightInPixels",
2856 kDefaultHeight)); 2858 kDefaultHeight));
2857 EXPECT_EQ( 2859 EXPECT_EQ(
2858 1, metrics::NumEvents(video_prefix + "SentWidthInPixels", kDefaultWidth)); 2860 1, metrics::NumEvents(video_prefix + "SentWidthInPixels", kDefaultWidth));
2859 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "SentHeightInPixels", 2861 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "SentHeightInPixels",
2860 kDefaultHeight)); 2862 kDefaultHeight));
2861 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.ReceivedWidthInPixels", 2863 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "ReceivedWidthInPixels",
2862 kDefaultWidth)); 2864 kDefaultWidth));
2863 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.ReceivedHeightInPixels", 2865 EXPECT_EQ(1, metrics::NumEvents(video_prefix + "ReceivedHeightInPixels",
2864 kDefaultHeight)); 2866 kDefaultHeight));
2865 2867
2866 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputFramesPerSecond")); 2868 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InputFramesPerSecond"));
2867 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentFramesPerSecond")); 2869 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "SentFramesPerSecond"));
2868 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.DecodedFramesPerSecond")); 2870 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.DecodedFramesPerSecond"));
2869 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.RenderFramesPerSecond")); 2871 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.RenderFramesPerSecond"));
2870 2872
2871 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.JitterBufferDelayInMs")); 2873 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.JitterBufferDelayInMs"));
2872 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.TargetDelayInMs")); 2874 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.TargetDelayInMs"));
2873 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.CurrentDelayInMs")); 2875 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.CurrentDelayInMs"));
2874 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.OnewayDelayInMs")); 2876 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.OnewayDelayInMs"));
2875 2877
2876 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EndToEndDelayInMs")); 2878 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EndToEndDelayInMs" +
2877 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EndToEndDelayMaxInMs")); 2879 video_suffix));
2878 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InterframeDelayInMs")); 2880 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EndToEndDelayMaxInMs" +
2879 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InterframeDelayMaxInMs")); 2881 video_suffix));
2882 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InterframeDelayInMs" +
2883 video_suffix));
2884 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "InterframeDelayMaxInMs" +
2885 video_suffix));
2880 2886
2881 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.RenderSqrtPixelsPerSecond")); 2887 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.RenderSqrtPixelsPerSecond"));
2882 2888
2883 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EncodeTimeInMs")); 2889 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "EncodeTimeInMs"));
2884 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.DecodeTimeInMs")); 2890 EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.DecodeTimeInMs"));
2885 2891
2886 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "NumberOfPauseEvents")); 2892 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "NumberOfPauseEvents"));
2887 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "PausedTimeInPercent")); 2893 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "PausedTimeInPercent"));
2888 2894
2889 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "BitrateSentInKbps")); 2895 EXPECT_EQ(1, metrics::NumSamples(video_prefix + "BitrateSentInKbps"));
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 std::unique_ptr<VideoEncoder> encoder_; 5022 std::unique_ptr<VideoEncoder> encoder_;
5017 std::unique_ptr<VideoDecoder> decoder_; 5023 std::unique_ptr<VideoDecoder> decoder_;
5018 rtc::CriticalSection crit_; 5024 rtc::CriticalSection crit_;
5019 int recorded_frames_ GUARDED_BY(crit_); 5025 int recorded_frames_ GUARDED_BY(crit_);
5020 } test(this); 5026 } test(this);
5021 5027
5022 RunBaseTest(&test); 5028 RunBaseTest(&test);
5023 } 5029 }
5024 5030
5025 } // namespace webrtc 5031 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/include/metrics.h ('k') | webrtc/video/receive_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698