• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium 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 // This is a separate file so that users of process metrics don't need to
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