forked from martinkersner/gtop
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgtop.hh
47 lines (36 loc) · 1.24 KB
/
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
41
42
43
44
45
46
47
// Martin Kersner, m.kersner@gmail.com
// 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 = 1024;
const std::string TEGRASTATS_PATH = "~/tegrastats";
const std::string TEGRASTATSFAKE_PATH = "./tegrastats_fake";
void read_tegrastats();
tegrastats parse_tegrastats(bool*, bool*, bool*, bool*, const char *);
void get_tx2_stats(tegrastats &,
bool*, bool*, bool*, bool*, const std::vector<std::string>);
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 get_emc_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> &);
void write_csv(tegrastats &);
void write_csv_header(int numCpus);
#endif // GTOP_HH_