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

MemoryMetrics class, that is responsible for collecting and managing memory metrics. More...

#include <MemoryMetrics.hpp>

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

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
 

Detailed Description

MemoryMetrics class, that is responsible for collecting and managing memory metrics.

Constructor & Destructor Documentation

◆ MemoryMetrics()

NES::Monitoring::MemoryMetrics::MemoryMetrics ( )

Member Function Documentation

◆ getSchema()

SchemaPtr NES::Monitoring::MemoryMetrics::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 NES::Monitoring::getSchema(), readFromBuffer(), NES::TEST_F(), and writeToBuffer().

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

◆ getSchemaType()

Configurations::SchemaTypePtr NES::Monitoring::MemoryMetrics::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::MemoryMetrics::operator!= ( const MemoryMetrics rhs) const

◆ operator==()

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

◆ readFromBuffer()

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

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

◆ toJson()

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

Returns the metrics as json.

Returns
Json containing the metrics

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

Here is the caller graph for this function:

◆ writeToBuffer()

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

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

Member Data Documentation

◆ BUFFER_RAM

uint64_t NES::Monitoring::MemoryMetrics::BUFFER_RAM

◆ FREE_HIGH

uint64_t NES::Monitoring::MemoryMetrics::FREE_HIGH

◆ FREE_RAM

uint64_t NES::Monitoring::MemoryMetrics::FREE_RAM

◆ FREE_SWAP

uint64_t NES::Monitoring::MemoryMetrics::FREE_SWAP

◆ LOADS_15MIN

uint64_t NES::Monitoring::MemoryMetrics::LOADS_15MIN

◆ LOADS_1MIN

uint64_t NES::Monitoring::MemoryMetrics::LOADS_1MIN

◆ LOADS_5MIN

uint64_t NES::Monitoring::MemoryMetrics::LOADS_5MIN

◆ MEM_UNIT

uint64_t NES::Monitoring::MemoryMetrics::MEM_UNIT

◆ nodeId

◆ PROCS

uint64_t NES::Monitoring::MemoryMetrics::PROCS

◆ SHARED_RAM

uint64_t NES::Monitoring::MemoryMetrics::SHARED_RAM

◆ timestamp

uint64_t NES::Monitoring::MemoryMetrics::timestamp

◆ TOTAL_HIGH

uint64_t NES::Monitoring::MemoryMetrics::TOTAL_HIGH

◆ TOTAL_RAM

◆ TOTAL_SWAP

uint64_t NES::Monitoring::MemoryMetrics::TOTAL_SWAP

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