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

DiskMetrics class, that is responsible for collecting and managing disk metrics. More...

#include <DiskMetrics.hpp>

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

Public Member Functions

 DiskMetrics ()
 
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 DiskMetrics &rhs) const
 
bool operator!= (const DiskMetrics &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 fBsize
 
uint64_t fFrsize
 
uint64_t fBlocks
 
uint64_t fBfree
 
uint64_t fBavail
 

Detailed Description

DiskMetrics class, that is responsible for collecting and managing disk metrics.

Constructor & Destructor Documentation

◆ DiskMetrics()

NES::Monitoring::DiskMetrics::DiskMetrics ( )

Member Function Documentation

◆ getSchema()

SchemaPtr NES::Monitoring::DiskMetrics::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::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::DiskMetrics::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::DiskMetrics::operator!= ( const DiskMetrics rhs) const

◆ operator==()

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

◆ readFromBuffer()

void NES::Monitoring::DiskMetrics::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(), fBavail, fBfree, fBlocks, fBsize, fFrsize, NES::Runtime::TupleBuffer::getBufferSize(), getSchema(), nodeId, and timestamp.

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::DiskMetrics::toJson ( ) const

Returns the metrics as json.

Returns
Json containing the metrics

References fBavail, fBfree, fBlocks, fBsize, fFrsize, nodeId, and timestamp.

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

Here is the caller graph for this function:

◆ writeToBuffer()

void NES::Monitoring::DiskMetrics::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(), fBavail, fBfree, fBlocks, fBsize, fFrsize, NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::TupleBuffer::getNumberOfTuples(), getSchema(), NES_ASSERT, nodeId, NES::Runtime::TupleBuffer::setNumberOfTuples(), and timestamp.

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

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

Member Data Documentation

◆ fBavail

uint64_t NES::Monitoring::DiskMetrics::fBavail

◆ fBfree

uint64_t NES::Monitoring::DiskMetrics::fBfree

◆ fBlocks

uint64_t NES::Monitoring::DiskMetrics::fBlocks

◆ fBsize

uint64_t NES::Monitoring::DiskMetrics::fBsize

◆ fFrsize

uint64_t NES::Monitoring::DiskMetrics::fFrsize

◆ nodeId

◆ timestamp

uint64_t NES::Monitoring::DiskMetrics::timestamp

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