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

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

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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/webrtc_browsertest_perf.h" 5 #include "chrome/browser/media/webrtc/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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 "video_rx", modifier, "goog_jitter_buffer_ms", value, "ms", false); 178 "video_rx", modifier, "goog_jitter_buffer_ms", value, "ms", false);
179 EXPECT_TRUE(pc_dict.GetString(Statistic("googRenderDelayMs", ssrc), &value)); 179 EXPECT_TRUE(pc_dict.GetString(Statistic("googRenderDelayMs", ssrc), &value));
180 perf_test::PrintResult( 180 perf_test::PrintResult(
181 "video_rx", modifier, "goog_render_delay_ms", value, "ms", false); 181 "video_rx", modifier, "goog_render_delay_ms", value, "ms", false);
182 } 182 }
183 183
184 static std::string ExtractSsrcIdentifier(const std::string& key) { 184 static std::string ExtractSsrcIdentifier(const std::string& key) {
185 // Example key: ssrc_1234-someStatName. Grab the part before the dash. 185 // Example key: ssrc_1234-someStatName. Grab the part before the dash.
186 size_t key_start_pos = 0; 186 size_t key_start_pos = 0;
187 size_t key_end_pos = key.find("-"); 187 size_t key_end_pos = key.find("-");
188 CHECK(key_end_pos != std::string::npos) << "Could not parse key " << key; 188 // Could not parse key |key|
189 CHECK(key_end_pos != std::string::npos);
189 return key.substr(key_start_pos, key_end_pos - key_start_pos); 190 return key.substr(key_start_pos, key_end_pos - key_start_pos);
190 } 191 }
191 192
192 // Returns the set of unique ssrc identifiers in the call (e.g. ssrc_1234, 193 // Returns the set of unique ssrc identifiers in the call (e.g. ssrc_1234,
193 // ssrc_12356, etc). |stats_dict| is the .stats dict from one peer connection. 194 // ssrc_12356, etc). |stats_dict| is the .stats dict from one peer connection.
194 static std::set<std::string> FindAllSsrcIdentifiers( 195 static std::set<std::string> FindAllSsrcIdentifiers(
195 const base::DictionaryValue& stats_dict) { 196 const base::DictionaryValue& stats_dict) {
196 std::set<std::string> result; 197 std::set<std::string> result;
197 base::DictionaryValue::Iterator stats_iterator(stats_dict); 198 base::DictionaryValue::Iterator stats_iterator(stats_dict);
198 199
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 std::set<std::string>::const_iterator ssrc_iterator = 273 std::set<std::string>::const_iterator ssrc_iterator =
273 ssrc_identifiers.begin(); 274 ssrc_identifiers.begin();
274 for (; ssrc_iterator != ssrc_identifiers.end(); ++ssrc_iterator) { 275 for (; ssrc_iterator != ssrc_identifiers.end(); ++ssrc_iterator) {
275 const std::string& ssrc = *ssrc_iterator; 276 const std::string& ssrc = *ssrc_iterator;
276 MaybePrintResultsForAudioReceive(ssrc, pc_dict, modifier); 277 MaybePrintResultsForAudioReceive(ssrc, pc_dict, modifier);
277 MaybePrintResultsForVideoReceive(ssrc, pc_dict, video_modifier); 278 MaybePrintResultsForVideoReceive(ssrc, pc_dict, video_modifier);
278 } 279 }
279 } 280 }
280 281
281 } // namespace test 282 } // namespace test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698