NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
Wrapper class to represent the metrics read from the OS about dynamically changing data represented in other metric classes. More...
#include <RuntimeMetrics.hpp>
Public Member Functions | |
RuntimeMetrics () | |
void | writeToBuffer (Runtime::TupleBuffer &buf, uint64_t tupleIndex) const |
Writes a metrics objects to the given TupleBuffer and index. More... | |
void | readFromBuffer (Runtime::TupleBuffer &buf, uint64_t tupleIndex) |
Parses a metrics objects from a TupleBuffer.. More... | |
nlohmann::json | toJson () const |
Returns the metrics as json. More... | |
bool | operator== (const RuntimeMetrics &rhs) const |
bool | operator!= (const RuntimeMetrics &rhs) const |
Static Public Member Functions | |
static Configurations::SchemaTypePtr | getSchemaType (const std::string &prefix="") |
Returns the schema of the class with a given prefix. More... | |
static SchemaPtr | getSchema (const std::string &prefix) |
Returns the schema of the class with a given prefix. More... | |
Public Attributes | |
uint64_t | nodeId |
uint64_t | wallTimeNs |
uint64_t | memoryUsageInBytes |
uint64_t | cpuLoadInJiffies |
uint64_t | blkioBytesRead |
uint64_t | blkioBytesWritten |
uint64_t | batteryStatusInPercent |
uint64_t | latCoord |
uint64_t | longCoord |
Wrapper class to represent the metrics read from the OS about dynamically changing data represented in other metric classes.
NES::Monitoring::RuntimeMetrics::RuntimeMetrics | ( | ) |
References NES_DEBUG.
|
static |
Returns the schema of the class with a given prefix.
prefix |
References NES::Schema::createFromSchemaType(), and getSchemaType().
Referenced by readFromBuffer(), and writeToBuffer().
|
static |
Returns the schema of the class with a given prefix.
prefix |
Referenced by getSchema().
bool NES::Monitoring::RuntimeMetrics::operator!= | ( | const RuntimeMetrics & | rhs | ) | const |
bool NES::Monitoring::RuntimeMetrics::operator== | ( | const RuntimeMetrics & | rhs | ) | const |
References batteryStatusInPercent, blkioBytesRead, blkioBytesWritten, cpuLoadInJiffies, latCoord, longCoord, memoryUsageInBytes, nodeId, and wallTimeNs.
void NES::Monitoring::RuntimeMetrics::readFromBuffer | ( | Runtime::TupleBuffer & | buf, |
uint64_t | tupleIndex | ||
) |
Parses a metrics objects from a TupleBuffer..
buf | the tuple buffer |
the | tuple index indicating the location of the tuple |
References batteryStatusInPercent, blkioBytesRead, blkioBytesWritten, cpuLoadInJiffies, NES::Runtime::MemoryLayouts::RowLayout::create(), NES::Runtime::TupleBuffer::getBufferSize(), getSchema(), latCoord, longCoord, memoryUsageInBytes, nodeId, and wallTimeNs.
Referenced by NES::Monitoring::readFromBuffer().
nlohmann::json NES::Monitoring::RuntimeMetrics::toJson | ( | ) | const |
Returns the metrics as json.
References batteryStatusInPercent, blkioBytesRead, blkioBytesWritten, cpuLoadInJiffies, latCoord, longCoord, memoryUsageInBytes, nodeId, and wallTimeNs.
Referenced by NES::Monitoring::asJson().
void NES::Monitoring::RuntimeMetrics::writeToBuffer | ( | Runtime::TupleBuffer & | buf, |
uint64_t | tupleIndex | ||
) | const |
Writes a metrics objects to the given TupleBuffer and index.
buf | the tuple buffer |
tupleIndex | the index indication its location in the buffer |
References batteryStatusInPercent, blkioBytesRead, blkioBytesWritten, cpuLoadInJiffies, NES::Runtime::MemoryLayouts::RowLayout::create(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), getSchema(), latCoord, longCoord, memoryUsageInBytes, NES_ASSERT, nodeId, NES::Runtime::TupleBuffer::setNumberOfTuples(), and wallTimeNs.
Referenced by NES::Monitoring::writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::batteryStatusInPercent |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::blkioBytesRead |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::blkioBytesWritten |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::cpuLoadInJiffies |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::latCoord |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::longCoord |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::memoryUsageInBytes |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::nodeId |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::RuntimeMetrics::wallTimeNs |