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

Unified Diff: src/platform/microbenchmark/benchmarks/getpid.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/SConstruct ('k') | src/platform/microbenchmark/benchmarks/readwrite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/microbenchmark/benchmarks/getpid.cc
diff --git a/src/platform/microbenchmark/benchmarks/getpid.cc b/src/platform/microbenchmark/benchmarks/getpid.cc
new file mode 100644
index 0000000000000000000000000000000000000000..614f68111687460888e4bada035e5b1dd6492075
--- /dev/null
+++ b/src/platform/microbenchmark/benchmarks/getpid.cc
@@ -0,0 +1,19 @@
+// 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.
+//
+// Microbenchmark of getpid()
+#include "microbenchmark/microbenchmark.h"
+
+#include <syscall.h>
+namespace chromeos {
+namespace benchmarks {
+
+static void GetPid(bool scaffold_only) {
+ if (!scaffold_only) syscall(__NR_getpid);
+}
+CHROMEOS_MICROBENCHMARK(GetPid, 1000000);
+
+} // namespace benchmarks
+} // namespace chromeos
« no previous file with comments | « src/platform/microbenchmark/SConstruct ('k') | src/platform/microbenchmark/benchmarks/readwrite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698