-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathProcCache.h
34 lines (28 loc) · 836 Bytes
/
ProcCache.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef PROC_CACHE_H
#define PROC_CACHE_H PROC_CACHE_H
#include <cstdint>
#include <string>
#include <vector>
typedef std::vector<std::string> ProcessStatus;
/// cached values from a @ref processStatus in order to
/// reduce expensive string-number-string conversions
class Cache {
public:
/// creates an empty cache
Cache();
/// creates a cache from a @ref processStatus
/// @note @ref runTimeSecs has to be filled later
Cache(const ProcessStatus &status);
bool isEmpty;
uint64_t userTimeJiffies;
uint64_t systemTimeJiffies;
uint64_t startTimeJiffies;
double runTimeSecs;
uint64_t totReadBytes;
uint64_t totReadBytesStorage;
uint64_t totWrittenBytes;
uint64_t totWrittenBytesStorage;
uint64_t totReadCalls;
uint64_t totWriteCalls;
};
#endif // PROC_CACHE_H