-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathgtop.hh
40 lines (31 loc) · 1006 Bytes
/
gtop.hh
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
37
38
39
40
// Martin Kersner, [email protected]
// 2017/04/21
#ifndef GTOP_HH_
#define GTOP_HH_
#include <ncurses.h>
#include <thread>
#include <memory>
#include <stdexcept>
#include <string>
#include <array>
#include <vector>
#include <sstream>
#include <mutex>
#include <condition_variable>
#include <unistd.h>
#include <iostream>
#include <algorithm>
#include "display.hh"
#include "utils.hh"
const int STATS_BUFFER_SIZE = 256;
const std::string TEGRASTATS_PATH = "~/tegrastats";
const std::string TEGRASTATSFAKE_PATH = "./tegrastats_fake";
void read_tegrastats();
tegrastats parse_tegrastats(const char *);
void get_cpu_stats_tx1(tegrastats &, const std::string &);
void get_cpu_stats_tx2(tegrastats &, const std::string &);
void get_gpu_stats(tegrastats &, const std::string &);
void get_mem_stats(tegrastats &, const std::string &);
void display_stats(const dimensions &, const tegrastats &);
void update_usage_chart(std::vector<std::vector<int>> &, const std::vector<int> &);
#endif // GTOP_HH_