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

Side by Side Diff: chrome/browser/media/webrtc_browsertest_perf.cc

Issue 2190533002: Adds a WebRTC browser_test with opus dtx enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last comments by Minyue. Created 4 years, 4 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 EXPECT_TRUE(pc_dict.GetString(Statistic("bytesSent", ssrc), &value)); 67 EXPECT_TRUE(pc_dict.GetString(Statistic("bytesSent", ssrc), &value));
68 perf_test::PrintResult( 68 perf_test::PrintResult(
69 "audio_bytes", modifier, "bytes_sent", value, "bytes", false); 69 "audio_bytes", modifier, "bytes_sent", value, "bytes", false);
70 EXPECT_TRUE(pc_dict.GetString(Statistic("googJitterReceived", ssrc), &value)); 70 EXPECT_TRUE(pc_dict.GetString(Statistic("googJitterReceived", ssrc), &value));
71 perf_test::PrintResult( 71 perf_test::PrintResult(
72 "audio_tx", modifier, "goog_jitter_recv", value, "ms", false); 72 "audio_tx", modifier, "goog_jitter_recv", value, "ms", false);
73 EXPECT_TRUE(pc_dict.GetString(Statistic("googRtt", ssrc), &value)); 73 EXPECT_TRUE(pc_dict.GetString(Statistic("googRtt", ssrc), &value));
74 perf_test::PrintResult( 74 perf_test::PrintResult(
75 "audio_tx", modifier, "goog_rtt", value, "ms", false); 75 "audio_tx", modifier, "goog_rtt", value, "ms", false);
76 EXPECT_TRUE(
77 pc_dict.GetString(Statistic("packetsSentPerSecond", ssrc), &value));
78 perf_test::PrintResult("audio_tx", modifier, "packets_sent_per_second", value,
79 "packets", false);
76 } 80 }
77 81
78 static void MaybePrintResultsForVideoSend( 82 static void MaybePrintResultsForVideoSend(
79 const std::string& ssrc, const base::DictionaryValue& pc_dict, 83 const std::string& ssrc, const base::DictionaryValue& pc_dict,
80 const std::string& modifier) { 84 const std::string& modifier) {
81 std::string value; 85 std::string value;
82 if (!pc_dict.GetString(Statistic("googFrameRateSent", ssrc), &value)) { 86 if (!pc_dict.GetString(Statistic("googFrameRateSent", ssrc), &value)) {
83 // Not a video send stream. 87 // Not a video send stream.
84 return; 88 return;
85 } 89 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 std::set<std::string>::const_iterator ssrc_iterator = 272 std::set<std::string>::const_iterator ssrc_iterator =
269 ssrc_identifiers.begin(); 273 ssrc_identifiers.begin();
270 for (; ssrc_iterator != ssrc_identifiers.end(); ++ssrc_iterator) { 274 for (; ssrc_iterator != ssrc_identifiers.end(); ++ssrc_iterator) {
271 const std::string& ssrc = *ssrc_iterator; 275 const std::string& ssrc = *ssrc_iterator;
272 MaybePrintResultsForAudioReceive(ssrc, pc_dict, modifier); 276 MaybePrintResultsForAudioReceive(ssrc, pc_dict, modifier);
273 MaybePrintResultsForVideoReceive(ssrc, pc_dict, video_modifier); 277 MaybePrintResultsForVideoReceive(ssrc, pc_dict, video_modifier);
274 } 278 }
275 } 279 }
276 280
277 } // namespace test 281 } // namespace test
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_base.cc ('k') | chrome/browser/media/webrtc_perf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698