OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium 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 | 4 |
5 // This file contains routines for gathering resource statistics for processes | 5 // This file contains routines for gathering resource statistics for processes |
6 // running on the system. | 6 // running on the system. |
7 | 7 |
8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ | 8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ |
9 #define BASE_PROCESS_PROCESS_METRICS_H_ | 9 #define BASE_PROCESS_PROCESS_METRICS_H_ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/base_export.h" | 13 #include "base/base_export.h" |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/process/process_handle.h" | 16 #include "base/process/process_handle.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 | 19 |
20 #if defined(OS_MACOSX) | 20 #if defined(OS_MACOSX) |
21 #include <mach/mach.h> | 21 #include <mach/mach.h> |
22 #endif | 22 #endif |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 | 25 |
26 #if defined(OS_WIN) | 26 #if defined(OS_POSIX) |
27 struct IoCounters : public IO_COUNTERS { | |
28 }; | |
29 #elif defined(OS_POSIX) | |
30 struct IoCounters { | 27 struct IoCounters { |
31 uint64_t ReadOperationCount; | 28 uint64_t ReadOperationCount; |
32 uint64_t WriteOperationCount; | 29 uint64_t WriteOperationCount; |
33 uint64_t OtherOperationCount; | 30 uint64_t OtherOperationCount; |
34 uint64_t ReadTransferCount; | 31 uint64_t ReadTransferCount; |
35 uint64_t WriteTransferCount; | 32 uint64_t WriteTransferCount; |
36 uint64_t OtherTransferCount; | 33 uint64_t OtherTransferCount; |
37 }; | 34 }; |
38 #endif | 35 #endif |
39 | 36 |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 SystemDiskInfo disk_info_; | 380 SystemDiskInfo disk_info_; |
384 #endif | 381 #endif |
385 #if defined(OS_CHROMEOS) | 382 #if defined(OS_CHROMEOS) |
386 SwapInfo swap_info_; | 383 SwapInfo swap_info_; |
387 #endif | 384 #endif |
388 }; | 385 }; |
389 | 386 |
390 } // namespace base | 387 } // namespace base |
391 | 388 |
392 #endif // BASE_PROCESS_PROCESS_METRICS_H_ | 389 #endif // BASE_PROCESS_PROCESS_METRICS_H_ |
OLD | NEW |