MCPcopy Create free account
hub / github.com/bamlab/flashlight / printCpuStats

Function printCpuStats

packages/platforms/android/cpp-profiler/src/main.cpp:23–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21};
22
23void printCpuStats(std::vector<string> pids)
24{
25 for (string pid : pids)
26 {
27 string path = "/proc/" + pid + "/task";
28
29 if (!fs::exists(path))
30 {
31 throw PidClosedError("Directory does not exist: " + path);
32 }
33
34 for (const auto &entry : fs::directory_iterator(path))
35 {
36 string subProcessPath = entry.path().string() + "/stat";
37 readFile(subProcessPath);
38 }
39 }
40}
41
42void printMemoryStats(std::vector<string> pids)
43{

Callers 1

printPerformanceMeasureFunction · 0.85

Calls 2

PidClosedErrorClass · 0.85
readFileFunction · 0.85

Tested by

no test coverage detected