OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/webrtc_browsertest_perf.h" | 5 #include "chrome/browser/media/webrtc_browsertest_perf.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "testing/perf/perf_test.h" | 10 #include "testing/perf/perf_test.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 "video_misc", modifier, "goog_nacks_recv", value, "", false); | 103 "video_misc", modifier, "goog_nacks_recv", value, "", false); |
104 | 104 |
105 EXPECT_TRUE(pc_dict.GetString(Statistic("googFrameWidthSent", ssrc), &value)); | 105 EXPECT_TRUE(pc_dict.GetString(Statistic("googFrameWidthSent", ssrc), &value)); |
106 perf_test::PrintResult("video_resolution", modifier, "goog_frame_width_sent", | 106 perf_test::PrintResult("video_resolution", modifier, "goog_frame_width_sent", |
107 value, "pixels", false); | 107 value, "pixels", false); |
108 EXPECT_TRUE( | 108 EXPECT_TRUE( |
109 pc_dict.GetString(Statistic("googFrameHeightSent", ssrc), &value)); | 109 pc_dict.GetString(Statistic("googFrameHeightSent", ssrc), &value)); |
110 perf_test::PrintResult("video_resolution", modifier, "goog_frame_height_sent", | 110 perf_test::PrintResult("video_resolution", modifier, "goog_frame_height_sent", |
111 value, "pixels", false); | 111 value, "pixels", false); |
112 | 112 |
113 EXPECT_TRUE(pc_dict.GetString( | |
114 Statistic("googCaptureJitterMs", ssrc), &value)); | |
115 perf_test::PrintResult( | |
116 "video_tx", modifier, "goog_capture_jitter_ms", value, "ms", false); | |
117 EXPECT_TRUE(pc_dict.GetString( | |
118 Statistic("googCaptureQueueDelayMsPerS", ssrc), &value)); | |
119 perf_test::PrintResult( | |
120 "video_tx", modifier, "goog_capture_queue_delay_ms_per_s", | |
121 value, "ms/s", false); | |
122 EXPECT_TRUE(pc_dict.GetString(Statistic("googAvgEncodeMs", ssrc), &value)); | 113 EXPECT_TRUE(pc_dict.GetString(Statistic("googAvgEncodeMs", ssrc), &value)); |
123 perf_test::PrintResult( | 114 perf_test::PrintResult( |
124 "video_tx", modifier, "goog_avg_encode_ms", value, "ms", false); | 115 "video_tx", modifier, "goog_avg_encode_ms", value, "ms", false); |
125 EXPECT_TRUE(pc_dict.GetString(Statistic("googRtt", ssrc), &value)); | 116 EXPECT_TRUE(pc_dict.GetString(Statistic("googRtt", ssrc), &value)); |
126 perf_test::PrintResult("video_tx", modifier, "goog_rtt", value, "ms", false); | 117 perf_test::PrintResult("video_tx", modifier, "goog_rtt", value, "ms", false); |
127 | 118 |
128 EXPECT_TRUE(pc_dict.GetString( | 119 EXPECT_TRUE(pc_dict.GetString( |
129 Statistic("googEncodeUsagePercent", ssrc), &value)); | 120 Statistic("googEncodeUsagePercent", ssrc), &value)); |
130 perf_test::PrintResult("video_cpu_usage", modifier, | 121 perf_test::PrintResult("video_cpu_usage", modifier, |
131 "goog_encode_usage_percent", value, "%", false); | 122 "goog_encode_usage_percent", value, "%", false); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 MaybePrintResultsForAudioSend(ssrc, pc_dict, modifier) || | 246 MaybePrintResultsForAudioSend(ssrc, pc_dict, modifier) || |
256 MaybePrintResultsForVideoReceive(ssrc, pc_dict, modifier) || | 247 MaybePrintResultsForVideoReceive(ssrc, pc_dict, modifier) || |
257 MaybePrintResultsForVideoSend(ssrc, pc_dict, modifier); | 248 MaybePrintResultsForVideoSend(ssrc, pc_dict, modifier); |
258 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which " | 249 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which " |
259 "kind of stream SSRC " << ssrc | 250 "kind of stream SSRC " << ssrc |
260 << " is. "; | 251 << " is. "; |
261 } | 252 } |
262 } | 253 } |
263 | 254 |
264 } // namespace test | 255 } // namespace test |
OLD | NEW |