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

Side by Side Diff: media/base/demuxer_perftest.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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // Use a stream if it hasn't been read from yet. 174 // Use a stream if it hasn't been read from yet.
175 if (last_read_timestamp_[i] == media::kNoTimestamp) 175 if (last_read_timestamp_[i] == media::kNoTimestamp)
176 return i; 176 return i;
177 177
178 if (index < 0 || 178 if (index < 0 ||
179 last_read_timestamp_[i] < last_read_timestamp_[index]) { 179 last_read_timestamp_[i] < last_read_timestamp_[index]) {
180 index = i; 180 index = i;
181 } 181 }
182 } 182 }
183 CHECK_GE(index, 0) << "Couldn't find a stream to read"; 183 // Couldn't find a stream to read
184 CHECK_GE(index, 0);
184 return index; 185 return index;
185 } 186 }
186 187
187 static void RunDemuxerBenchmark(const std::string& filename) { 188 static void RunDemuxerBenchmark(const std::string& filename) {
188 base::FilePath file_path(GetTestDataFilePath(filename)); 189 base::FilePath file_path(GetTestDataFilePath(filename));
189 double total_time = 0.0; 190 double total_time = 0.0;
190 for (int i = 0; i < kBenchmarkIterations; ++i) { 191 for (int i = 0; i < kBenchmarkIterations; ++i) {
191 // Setup. 192 // Setup.
192 base::MessageLoop message_loop; 193 base::MessageLoop message_loop;
193 DemuxerHostImpl demuxer_host; 194 DemuxerHostImpl demuxer_host;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 #if defined(USE_PROPRIETARY_CODECS) 243 #if defined(USE_PROPRIETARY_CODECS)
243 RunDemuxerBenchmark("bear-1280x720.mp4"); 244 RunDemuxerBenchmark("bear-1280x720.mp4");
244 RunDemuxerBenchmark("sfx.mp3"); 245 RunDemuxerBenchmark("sfx.mp3");
245 #endif 246 #endif
246 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) 247 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS)
247 RunDemuxerBenchmark("bear.avi"); 248 RunDemuxerBenchmark("bear.avi");
248 #endif 249 #endif
249 } 250 }
250 251
251 } // namespace media 252 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698