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

Side by Side Diff: base/run_all_perftests.cc

Issue 18003: Call logging::InitLogging. The lack of this was causing some hangs (and poss... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « base/process_util_unittest.cc ('k') | base/run_all_unittests.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/command_line.h" 5 #include "base/perf_test_suite.h"
6 #include "base/debug_util.h"
7 #include "base/perftimer.h"
8 #include "base/process_util.h"
9 #include "base/string_util.h"
10 #include "base/test_suite.h"
11
12 class PerfTestSuite : public TestSuite {
13 public:
14 PerfTestSuite(int argc, char** argv) : TestSuite(argc, argv) {
15 }
16
17 virtual void Initialize() {
18 // Initialize the perf timer log
19 std::string log_file =
20 WideToUTF8(CommandLine().GetSwitchValue(L"log-file"));
21 if (log_file.empty())
22 log_file = "perf_test.log";
23 ASSERT_TRUE(InitPerfLog(log_file.c_str()));
24
25 // Raise to high priority to have more precise measurements. Since we don't
26 // aim at 1% precision, it is not necessary to run at realtime level.
27 if (!DebugUtil::BeingDebugged())
28 base::RaiseProcessToHighPriority();
29
30 TestSuite::Initialize();
31 }
32
33 virtual void Shutdown() {
34 TestSuite::Shutdown();
35
36 FinalizePerfLog();
37 }
38 };
39 6
40 int main(int argc, char** argv) { 7 int main(int argc, char** argv) {
41 return PerfTestSuite(argc, argv).Run(); 8 return PerfTestSuite(argc, argv).Run();
42 } 9 }
OLDNEW
« no previous file with comments | « base/process_util_unittest.cc ('k') | base/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698