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

Unified Diff: src/platform/microbenchmark/main.cc

Issue 481009: Add a simple microbenchmark framework, packaging, and sample tests. (Closed)
Patch Set: fix the bad comment Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/microbenchmark/debian/rules ('k') | src/platform/microbenchmark/make_pkg.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/microbenchmark/main.cc
diff --git a/src/platform/microbenchmark/main.cc b/src/platform/microbenchmark/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a4683ec247a3bd6ba7860463c2238669f5ae3e9d
--- /dev/null
+++ b/src/platform/microbenchmark/main.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Some portions Copyright (c) 2009 The Chromium Authors.
+
+#include "microbenchmark/microbenchmark.h"
+
+#include <stdlib.h>
+
+int main(int argc, char **argv) {
+ CommandLine::Init(argc, argv);
+ logging::InitLogging(NULL,
+ logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
+ logging::DONT_LOCK_LOG_FILE,
+ logging::APPEND_TO_OLD_LOG_FILE);
+ ::testing::InitGoogleTest(&argc, argv);
+ CommandLine *cl = CommandLine::ForCurrentProcess();
+ if (cl->GetSwitchValueASCII(chromeos::Microbenchmark::kRunsSwitch).empty()) {
+ LOG(INFO) << "Defaulting to the number of runs specified per test";
+ LOG(INFO) << "To override, use --"
+ << chromeos::Microbenchmark::kRunsSwitch
+ << "=NUM";
+ }
+ return RUN_ALL_TESTS();
+}
« no previous file with comments | « src/platform/microbenchmark/debian/rules ('k') | src/platform/microbenchmark/make_pkg.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698