NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Monitoring::NetworkMetrics Class Reference

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>

Collaboration diagram for NES::Monitoring::NetworkMetrics:
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NetworkMetrics()

NES::Monitoring::NetworkMetrics::NetworkMetrics ( )

Member Function Documentation

◆ getSchema()

SchemaPtr NES::Monitoring::NetworkMetrics::getSchema ( const std::string &  prefix)
static

Returns the schema of the class with a given prefix.

Parameters
prefix
Returns
the schema

References NES::Schema::createFromSchemaType(), and getSchemaType().

Referenced by readFromBuffer(), NES::Monitoring::NetworkMetricsWrapper::readFromBuffer(), NES::TEST_F(), writeToBuffer(), and NES::Monitoring::NetworkMetricsWrapper::writeToBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSchemaType()

Configurations::SchemaTypePtr NES::Monitoring::NetworkMetrics::getSchemaType ( const std::string &  prefix)
static

Returns the schema of the class with a given prefix.

Parameters
prefix
Returns
the schema

Referenced by getSchema(), and NES::Monitoring::MetricUtils::getSchemaFromCollectorType().

Here is the caller graph for this function:

◆ operator!=()

bool NES::Monitoring::NetworkMetrics::operator!= ( const NetworkMetrics rhs) const

◆ operator==()

bool NES::Monitoring::NetworkMetrics::operator== ( const NetworkMetrics rhs) const

◆ readFromBuffer()

void NES::Monitoring::NetworkMetrics::readFromBuffer ( Runtime::TupleBuffer buf,
uint64_t  tupleIndex 
)

Parses a metrics objects from a TupleBuffer..

Parameters
bufthe tuple buffer
thetuple 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toJson()

nlohmann::json NES::Monitoring::NetworkMetrics::toJson ( ) const

Returns the metrics as json.

Returns
Json containing the metrics

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().

Here is the caller graph for this function:

◆ writeToBuffer()

void NES::Monitoring::NetworkMetrics::writeToBuffer ( Runtime::TupleBuffer buf,
uint64_t  tupleIndex 
) const

Writes a metrics objects to the given TupleBuffer and index.

Parameters
bufthe tuple buffer
tupleIndexthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ interfaceName

uint64_t NES::Monitoring::NetworkMetrics::interfaceName

◆ nodeId

◆ rBytes

uint64_t NES::Monitoring::NetworkMetrics::rBytes

◆ rCompressed

uint64_t NES::Monitoring::NetworkMetrics::rCompressed

◆ rDrop

uint64_t NES::Monitoring::NetworkMetrics::rDrop

◆ rErrs

uint64_t NES::Monitoring::NetworkMetrics::rErrs

◆ rFifo

uint64_t NES::Monitoring::NetworkMetrics::rFifo

◆ rFrame

uint64_t NES::Monitoring::NetworkMetrics::rFrame

◆ rMulticast

uint64_t NES::Monitoring::NetworkMetrics::rMulticast

◆ rPackets

uint64_t NES::Monitoring::NetworkMetrics::rPackets

◆ tBytes

uint64_t NES::Monitoring::NetworkMetrics::tBytes

◆ tCarrier

uint64_t NES::Monitoring::NetworkMetrics::tCarrier

◆ tColls

uint64_t NES::Monitoring::NetworkMetrics::tColls

◆ tCompressed

uint64_t NES::Monitoring::NetworkMetrics::tCompressed

◆ tDrop

uint64_t NES::Monitoring::NetworkMetrics::tDrop

◆ tErrs

uint64_t NES::Monitoring::NetworkMetrics::tErrs

◆ tFifo

uint64_t NES::Monitoring::NetworkMetrics::tFifo

◆ timestamp

uint64_t NES::Monitoring::NetworkMetrics::timestamp

◆ tPackets

uint64_t NES::Monitoring::NetworkMetrics::tPackets

The documentation for this class was generated from the following files: