NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
MemoryMetrics class, that is responsible for collecting and managing memory metrics. More...
#include <MemoryMetrics.hpp>
Public Member Functions | |
MemoryMetrics () | |
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 MemoryMetrics &rhs) const |
bool | operator!= (const MemoryMetrics &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 | |
WorkerId | nodeId |
uint64_t | timestamp |
uint64_t | TOTAL_RAM |
uint64_t | TOTAL_SWAP |
uint64_t | FREE_RAM |
uint64_t | SHARED_RAM |
uint64_t | BUFFER_RAM |
uint64_t | FREE_SWAP |
uint64_t | TOTAL_HIGH |
uint64_t | FREE_HIGH |
uint64_t | PROCS |
uint64_t | MEM_UNIT |
uint64_t | LOADS_1MIN |
uint64_t | LOADS_5MIN |
uint64_t | LOADS_15MIN |
MemoryMetrics class, that is responsible for collecting and managing memory metrics.
NES::Monitoring::MemoryMetrics::MemoryMetrics | ( | ) |
|
static |
Returns the schema of the class with a given prefix.
prefix |
References NES::Schema::createFromSchemaType(), and getSchemaType().
Referenced by NES::Monitoring::getSchema(), readFromBuffer(), NES::TEST_F(), and writeToBuffer().
|
static |
Returns the schema of the class with a given prefix.
prefix |
Referenced by getSchema(), and NES::Monitoring::MetricUtils::getSchemaFromCollectorType().
bool NES::Monitoring::MemoryMetrics::operator!= | ( | const MemoryMetrics & | rhs | ) | const |
bool NES::Monitoring::MemoryMetrics::operator== | ( | const MemoryMetrics & | rhs | ) | const |
References BUFFER_RAM, FREE_HIGH, FREE_RAM, FREE_SWAP, LOADS_15MIN, LOADS_1MIN, LOADS_5MIN, MEM_UNIT, nodeId, PROCS, SHARED_RAM, timestamp, TOTAL_HIGH, TOTAL_RAM, and TOTAL_SWAP.
void NES::Monitoring::MemoryMetrics::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 BUFFER_RAM, NES::Runtime::MemoryLayouts::RowLayout::create(), FREE_HIGH, FREE_RAM, FREE_SWAP, NES::Runtime::TupleBuffer::getBufferSize(), getSchema(), LOADS_15MIN, LOADS_1MIN, LOADS_5MIN, MEM_UNIT, nodeId, PROCS, SHARED_RAM, timestamp, TOTAL_HIGH, TOTAL_RAM, and TOTAL_SWAP.
Referenced by NES::Monitoring::readFromBuffer().
nlohmann::json NES::Monitoring::MemoryMetrics::toJson | ( | ) | const |
Returns the metrics as json.
References BUFFER_RAM, FREE_HIGH, FREE_RAM, FREE_SWAP, LOADS_15MIN, LOADS_1MIN, LOADS_5MIN, MEM_UNIT, nodeId, PROCS, SHARED_RAM, timestamp, TOTAL_HIGH, TOTAL_RAM, and TOTAL_SWAP.
Referenced by NES::Monitoring::asJson().
void NES::Monitoring::MemoryMetrics::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 BUFFER_RAM, NES::Runtime::MemoryLayouts::RowLayout::create(), FREE_HIGH, FREE_RAM, FREE_SWAP, NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), NES::NESStrongType< T, Tag, invalid, initial >::getRawValue(), getSchema(), LOADS_15MIN, LOADS_1MIN, LOADS_5MIN, MEM_UNIT, NES_ASSERT, nodeId, PROCS, NES::Runtime::TupleBuffer::setNumberOfTuples(), SHARED_RAM, timestamp, TOTAL_HIGH, TOTAL_RAM, and TOTAL_SWAP.
Referenced by NES::Monitoring::writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::BUFFER_RAM |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::FREE_HIGH |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::FREE_RAM |
Referenced by NES::MetricValidator::isValid(), operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::FREE_SWAP |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::LOADS_15MIN |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::LOADS_1MIN |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::LOADS_5MIN |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::MEM_UNIT |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
WorkerId NES::Monitoring::MemoryMetrics::nodeId |
uint64_t NES::Monitoring::MemoryMetrics::PROCS |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::SHARED_RAM |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::timestamp |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::TOTAL_HIGH |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::MemoryMetrics::TOTAL_RAM |
uint64_t NES::Monitoring::MemoryMetrics::TOTAL_SWAP |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().