-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathramstatreader.h
More file actions
36 lines (25 loc) · 1.21 KB
/
ramstatreader.h
File metadata and controls
36 lines (25 loc) · 1.21 KB
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
35
36
#ifndef RAMSTATREADER_H
#define RAMSTATREADER_H
#include <QObject>
#include <deque>
#include "StatReader.h"
namespace StatTypes{
struct RamData{
// inline CPUData(int dataPointsPerMinute) : currentActivityData(dataPointsPerMinute,0.0),currentClockSpeed(dataPointsPerMinute,0.0){}
QString AdapterName = " " ; //!< name of the memory
std::deque<double> currentUsage; //!< vector that always holds one minute of datapoints of cpu activity data, constant ammoutn of element
std::deque<double> currentSwap; //!< vector that always holds one minute of datapoints of transfer statitisc data, constant ammoutn of elemen
int RamSizeKiB = 0; //!<hold max size of installed memory
int SwapSizeKiB = 0; //!<hold max size of mounted swap space , also relfects if swapfile gets mounted /unmounted
};
}
class RamStatReader : public QObject, public StatReader<StatTypes::RamData>
{
Q_OBJECT
public:
explicit RamStatReader(QObject *parent = nullptr);
void measure_main_loop(); //!< implements the main measurement loop that runs contionously untils stopped in a separate thread
signals:
void data_ready();
};
#endif // RAMSTATREADER_H