Will Drewry | b551847 | 2009-12-10 12:31:47 -0800 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | // |
| 5 | // Microbenchmark of getpid() |
| 6 | #include "microbenchmark/microbenchmark.h" |
| 7 | |
| 8 | #include <syscall.h> |
| 9 | namespace chromeos { |
| 10 | namespace benchmarks { |
| 11 | |
| 12 | static void GetPid(bool scaffold_only) { |
| 13 | if (!scaffold_only) syscall(__NR_getpid); |
| 14 | } |
| 15 | CHROMEOS_MICROBENCHMARK(GetPid, 1000000); |
| 16 | |
| 17 | } // namespace benchmarks |
| 18 | } // namespace chromeos |