Add core temperatures
This commit is contained in:
@@ -39,6 +39,8 @@ namespace metrics
|
||||
buf.writeUint8(static_cast<uint8_t>(cpu.coreLoads.size()));
|
||||
for (float f : cpu.coreLoads)
|
||||
buf.writeFloat(f);
|
||||
for (float f : cpu.coreTemps)
|
||||
buf.writeFloat(f);
|
||||
|
||||
// Memory
|
||||
buf.writeUint64(memory.memory.used);
|
||||
@@ -81,6 +83,10 @@ namespace metrics
|
||||
h.cpu.coreLoads.reserve(numCpu);
|
||||
for (uint8_t i = 0; i < numCpu; ++i)
|
||||
h.cpu.coreLoads.push_back(buf.readFloat());
|
||||
h.cpu.coreTemps.clear();
|
||||
h.cpu.coreTemps.reserve(numCpu);
|
||||
for (uint8_t i = 0; i < numCpu; ++i)
|
||||
h.cpu.coreTemps.push_back(buf.readFloat());
|
||||
|
||||
// Memory
|
||||
h.memory.memory.used = buf.readUint64();
|
||||
|
||||
Reference in New Issue
Block a user