NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
This class represents the metric values read from /proc/net/dev: bytes The total number of bytes of data transmitted or received by the interface. packets The total number of packets of data transmitted or received by the interface. errs The total number of transmit or receive errors detected by the device driver. fifo The number of FIFO buffer errors. frame The number of packet framing errors. colls The number of collisions detected on the interface. compressed The number of compressed packets transmitted or received by the device driver. (This appears to be unused in the 2.2.15 kernel.) carrier The number of carrier losses detected by the device driver. multicast The number of multicast frames transmitted or received by the device driver. More...
#include <NetworkMetrics.hpp>
Public Member Functions | |
NetworkMetrics () | |
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 NetworkMetrics &rhs) const |
bool | operator!= (const NetworkMetrics &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 | interfaceName |
uint64_t | rBytes |
uint64_t | rPackets |
uint64_t | rErrs |
uint64_t | rDrop |
uint64_t | rFifo |
uint64_t | rFrame |
uint64_t | rCompressed |
uint64_t | rMulticast |
uint64_t | tBytes |
uint64_t | tPackets |
uint64_t | tErrs |
uint64_t | tDrop |
uint64_t | tFifo |
uint64_t | tColls |
uint64_t | tCarrier |
uint64_t | tCompressed |
This class represents the metric values read from /proc/net/dev: bytes The total number of bytes of data transmitted or received by the interface. packets The total number of packets of data transmitted or received by the interface. errs The total number of transmit or receive errors detected by the device driver. fifo The number of FIFO buffer errors. frame The number of packet framing errors. colls The number of collisions detected on the interface. compressed The number of compressed packets transmitted or received by the device driver. (This appears to be unused in the 2.2.15 kernel.) carrier The number of carrier losses detected by the device driver. multicast The number of multicast frames transmitted or received by the device driver.
NES::Monitoring::NetworkMetrics::NetworkMetrics | ( | ) |
|
static |
Returns the schema of the class with a given prefix.
prefix |
References NES::Schema::createFromSchemaType(), and getSchemaType().
Referenced by readFromBuffer(), NES::Monitoring::NetworkMetricsWrapper::readFromBuffer(), NES::TEST_F(), writeToBuffer(), and NES::Monitoring::NetworkMetricsWrapper::writeToBuffer().
|
static |
Returns the schema of the class with a given prefix.
prefix |
Referenced by getSchema(), and NES::Monitoring::MetricUtils::getSchemaFromCollectorType().
bool NES::Monitoring::NetworkMetrics::operator!= | ( | const NetworkMetrics & | rhs | ) | const |
bool NES::Monitoring::NetworkMetrics::operator== | ( | const NetworkMetrics & | rhs | ) | const |
References interfaceName, nodeId, rBytes, rCompressed, rDrop, rErrs, rFifo, rFrame, rMulticast, rPackets, tBytes, tCarrier, tColls, tCompressed, tDrop, tErrs, tFifo, timestamp, and tPackets.
void NES::Monitoring::NetworkMetrics::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 NES::Runtime::MemoryLayouts::RowLayout::create(), NES::Runtime::TupleBuffer::getBufferSize(), getSchema(), interfaceName, nodeId, rBytes, rCompressed, rDrop, rErrs, rFifo, rFrame, rMulticast, rPackets, tBytes, tCarrier, tColls, tCompressed, tDrop, tErrs, tFifo, timestamp, and tPackets.
Referenced by NES::Monitoring::readFromBuffer().
nlohmann::json NES::Monitoring::NetworkMetrics::toJson | ( | ) | const |
Returns the metrics as json.
References nodeId, rBytes, rCompressed, rDrop, rErrs, rFifo, rFrame, rMulticast, rPackets, tBytes, tCarrier, tColls, tCompressed, tDrop, tErrs, tFifo, timestamp, and tPackets.
Referenced by NES::Monitoring::asJson().
void NES::Monitoring::NetworkMetrics::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 NES::Runtime::MemoryLayouts::RowLayout::create(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), getSchema(), interfaceName, NES_ASSERT, nodeId, rBytes, rCompressed, rDrop, rErrs, rFifo, rFrame, rMulticast, rPackets, NES::Runtime::TupleBuffer::setNumberOfTuples(), tBytes, tCarrier, tColls, tCompressed, tDrop, tErrs, tFifo, timestamp, and tPackets.
Referenced by NES::Monitoring::writeToBuffer(), and NES::Monitoring::NetworkMetricsWrapper::writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::interfaceName |
Referenced by operator==(), readFromBuffer(), and writeToBuffer().
WorkerId NES::Monitoring::NetworkMetrics::nodeId |
uint64_t NES::Monitoring::NetworkMetrics::rBytes |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rCompressed |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rDrop |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rErrs |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rFifo |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rFrame |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rMulticast |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::rPackets |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tBytes |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tCarrier |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tColls |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tCompressed |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tDrop |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tErrs |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tFifo |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::timestamp |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().
uint64_t NES::Monitoring::NetworkMetrics::tPackets |
Referenced by operator==(), readFromBuffer(), toJson(), and writeToBuffer().