| 6 |
| // include windows.h unless they need IoCounters. |
| 7 |
| 8 | #ifndef BASE_PROCESS_PROCESS_METRICS_IOCOUNTERS_H_ |
| 9 | #define BASE_PROCESS_PROCESS_METRICS_IOCOUNTERS_H_ |
| 10 |
| 11 | #include <stdint.h> |
| 12 |
| 13 | #include "base/process/process_metrics.h" |
| 14 | #include "build/build_config.h" |
| 15 |
| 16 | #if defined(OS_WIN) |
| 17 | #include <windows.h> |
| 18 | #endif |
| 19 |
| 20 | namespace base { |
| 21 |
| 22 | #if defined(OS_WIN) |
| 23 | struct IoCounters : public IO_COUNTERS {}; |
| 24 | #elif defined(OS_POSIX) |
| 25 | struct IoCounters { |
| 26 | uint64_t ReadOperationCount; |
| 27 | uint64_t WriteOperationCount; |
| 28 | uint64_t OtherOperationCount; |
| 29 | uint64_t ReadTransferCount; |
| 30 | uint64_t WriteTransferCount; |
| 31 | uint64_t OtherTransferCount; |
| 32 | }; |
| 33 | #endif |
| 34 |
| 35 | } // namespace base |
| 36 |
| 37 | #endif // BASE_PROCESS_PROCESS_METRICS_IOCOUNTERS_H_ |
| 38 |