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 // Microbenchmark of basic read/write throughput | 5 // Microbenchmark of basic read/write throughput |
7 #include "microbenchmark/microbenchmark.h" | 6 #include "microbenchmark/microbenchmark.h" |
8 | 7 |
9 #include <fcntl.h> | 8 #include <fcntl.h> |
10 #include <stdio.h> | 9 #include <stdio.h> |
11 #include <stdlib.h> | 10 #include <stdlib.h> |
12 #include <sys/stat.h> | 11 #include <sys/stat.h> |
13 #include <sys/types.h> | 12 #include <sys/types.h> |
14 #include <sys/unistd.h> | 13 #include <sys/unistd.h> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 CALL_SYSCALL(scaffold_only, __NR_write, wfd, buf, bytes) != bytes) | 73 CALL_SYSCALL(scaffold_only, __NR_write, wfd, buf, bytes) != bytes) |
75 << "An unexpected error occurred during write."; | 74 << "An unexpected error occurred during write."; |
76 } | 75 } |
77 } | 76 } |
78 CHROMEOS_MICROBENCHMARK_WITH_SETUP(ReadWriteSetup, ReadWrite, 1000); | 77 CHROMEOS_MICROBENCHMARK_WITH_SETUP(ReadWriteSetup, ReadWrite, 1000); |
79 #undef IO_SIZE | 78 #undef IO_SIZE |
80 #undef CALL_SYSCALL | 79 #undef CALL_SYSCALL |
81 | 80 |
82 } // namespace benchmarks | 81 } // namespace benchmarks |
83 } // namespace chromeos | 82 } // namespace chromeos |
OLD | NEW |