| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 // Some portions Copyright (c) 2009 The Chromium Authors. | |
| 5 | 4 |
| 6 #include "microbenchmark/microbenchmark.h" | 5 #include "microbenchmark/microbenchmark.h" |
| 7 | 6 |
| 8 #include <stdlib.h> | 7 #include <stdlib.h> |
| 9 | 8 |
| 10 int main(int argc, char **argv) { | 9 int main(int argc, char **argv) { |
| 11 CommandLine::Init(argc, argv); | 10 CommandLine::Init(argc, argv); |
| 12 logging::InitLogging(NULL, | 11 logging::InitLogging(NULL, |
| 13 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 12 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
| 14 logging::DONT_LOCK_LOG_FILE, | 13 logging::DONT_LOCK_LOG_FILE, |
| 15 logging::APPEND_TO_OLD_LOG_FILE); | 14 logging::APPEND_TO_OLD_LOG_FILE); |
| 16 ::testing::InitGoogleTest(&argc, argv); | 15 ::testing::InitGoogleTest(&argc, argv); |
| 17 CommandLine *cl = CommandLine::ForCurrentProcess(); | 16 CommandLine *cl = CommandLine::ForCurrentProcess(); |
| 18 if (cl->GetSwitchValueASCII(chromeos::Microbenchmark::kRunsSwitch).empty()) { | 17 if (cl->GetSwitchValueASCII(chromeos::Microbenchmark::kRunsSwitch).empty()) { |
| 19 LOG(INFO) << "Defaulting to the number of runs specified per test"; | 18 LOG(INFO) << "Defaulting to the number of runs specified per test"; |
| 20 LOG(INFO) << "To override, use --" | 19 LOG(INFO) << "To override, use --" |
| 21 << chromeos::Microbenchmark::kRunsSwitch | 20 << chromeos::Microbenchmark::kRunsSwitch |
| 22 << "=NUM"; | 21 << "=NUM"; |
| 23 } | 22 } |
| 24 return RUN_ALL_TESTS(); | 23 return RUN_ALL_TESTS(); |
| 25 } | 24 } |
| OLD | NEW |