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

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
 

Detailed Description

Wrapper class to represent the metrics read from the OS about dynamically changing data represented in other metric classes.

Constructor & Destructor Documentation

◆ RuntimeMetrics()

NES::Monitoring::RuntimeMetrics::RuntimeMetrics ( )

References NES_DEBUG.

Member Function Documentation

◆ getSchema()

SchemaPtr NES::Monitoring::RuntimeMetrics::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(), and writeToBuffer().

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

◆ getSchemaType()

Configurations::SchemaTypePtr NES::Monitoring::RuntimeMetrics::getSchemaType ( const std::string &  prefix = "")
static

Returns the schema of the class with a given prefix.

Parameters
prefix
Returns
the schema

Referenced by getSchema().

Here is the caller graph for this function:

◆ operator!=()

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

◆ operator==()

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

◆ readFromBuffer()

void NES::Monitoring::RuntimeMetrics::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 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().

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

◆ toJson()

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

Returns the metrics as json.

Returns
Json containing the metrics

References batteryStatusInPercent, blkioBytesRead, blkioBytesWritten, cpuLoadInJiffies, latCoord, longCoord, memoryUsageInBytes, nodeId, and wallTimeNs.

Referenced by NES::Monitoring::asJson().

Here is the caller graph for this function:

◆ writeToBuffer()

void NES::Monitoring::RuntimeMetrics::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 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().

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

Member Data Documentation

◆ batteryStatusInPercent

uint64_t NES::Monitoring::RuntimeMetrics::batteryStatusInPercent

◆ blkioBytesRead

uint64_t NES::Monitoring::RuntimeMetrics::blkioBytesRead

◆ blkioBytesWritten

uint64_t NES::Monitoring::RuntimeMetrics::blkioBytesWritten

◆ cpuLoadInJiffies

uint64_t NES::Monitoring::RuntimeMetrics::cpuLoadInJiffies

◆ latCoord

uint64_t NES::Monitoring::RuntimeMetrics::latCoord

◆ longCoord

uint64_t NES::Monitoring::RuntimeMetrics::longCoord

◆ memoryUsageInBytes

uint64_t NES::Monitoring::RuntimeMetrics::memoryUsageInBytes

◆ nodeId

uint64_t NES::Monitoring::RuntimeMetrics::nodeId

◆ wallTimeNs


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