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

Side by Side Diff: media/base/demuxer_perftest.cc

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 years, 11 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 | « media/base/audio_converter_perftest.cc ('k') | media/base/sinc_resampler_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/media.h" 10 #include "media/base/media.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 FFmpegDemuxer demuxer(message_loop.message_loop_proxy(), &data_source, 180 FFmpegDemuxer demuxer(message_loop.message_loop_proxy(), &data_source,
181 encrypted_media_init_data_cb, new MediaLog()); 181 encrypted_media_init_data_cb, new MediaLog());
182 182
183 demuxer.Initialize(&demuxer_host, 183 demuxer.Initialize(&demuxer_host,
184 base::Bind(&QuitLoopWithStatus, &message_loop), 184 base::Bind(&QuitLoopWithStatus, &message_loop),
185 false); 185 false);
186 message_loop.Run(); 186 message_loop.Run();
187 StreamReader stream_reader(&demuxer, false); 187 StreamReader stream_reader(&demuxer, false);
188 188
189 // Benchmark. 189 // Benchmark.
190 base::TimeTicks start = base::TimeTicks::HighResNow(); 190 base::TimeTicks start = base::TimeTicks::Now();
191 while (!stream_reader.IsDone()) { 191 while (!stream_reader.IsDone()) {
192 stream_reader.Read(); 192 stream_reader.Read();
193 } 193 }
194 base::TimeTicks end = base::TimeTicks::HighResNow(); 194 base::TimeTicks end = base::TimeTicks::Now();
195 total_time += (end - start).InSecondsF(); 195 total_time += (end - start).InSecondsF();
196 demuxer.Stop(); 196 demuxer.Stop();
197 QuitLoopWithStatus(&message_loop, PIPELINE_OK); 197 QuitLoopWithStatus(&message_loop, PIPELINE_OK);
198 message_loop.Run(); 198 message_loop.Run();
199 } 199 }
200 200
201 perf_test::PrintResult("demuxer_bench", 201 perf_test::PrintResult("demuxer_bench",
202 "", 202 "",
203 filename, 203 filename,
204 kBenchmarkIterations / total_time, 204 kBenchmarkIterations / total_time,
(...skipping 17 matching lines...) Expand all
222 #endif 222 #endif
223 #if defined(OS_CHROMEOS) 223 #if defined(OS_CHROMEOS)
224 RunDemuxerBenchmark("bear.flac"); 224 RunDemuxerBenchmark("bear.flac");
225 #endif 225 #endif
226 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) 226 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS)
227 RunDemuxerBenchmark("bear.avi"); 227 RunDemuxerBenchmark("bear.avi");
228 #endif 228 #endif
229 } 229 }
230 230
231 } // namespace media 231 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_converter_perftest.cc ('k') | media/base/sinc_resampler_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698