forked from scaidermern/audria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcCache.h
33 lines (27 loc) · 935 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
#ifndef PROC_CACHE_H
#define PROC_CACHE_H PROC_CACHE_H
#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;
unsigned long long userTimeJiffies;
unsigned long long systemTimeJiffies;
unsigned long long startTimeJiffies;
double runTimeSecs;
unsigned long long totReadBytes;
unsigned long long totReadBytesStorage;
unsigned long long totWrittenBytes;
unsigned long long totWrittenBytesStorage;
unsigned long long totReadCalls;
unsigned long long totWriteCalls;
};
#endif // PROC_CACHE_H