NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
CpuMetricsWrapper.hpp File Reference
Include dependency graph for CpuMetricsWrapper.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  NES::Monitoring::CpuMetricsWrapper
 Wrapper class to represent a tuple buffer with multiple CpuMetrics objects. More...
 

Namespaces

 NES
 This exception represents a network error.
 
 NES::Monitoring
 

Functions

class NES::Monitoring::CpuMetrics NES::Monitoring::__attribute__ ((packed))
 
 CpuMetricsWrapper ()
 
 CpuMetricsWrapper (uint64_t nodeId)
 
 CpuMetricsWrapper (std::vector< CpuMetrics > &&arr)
 
void writeToBuffer (Runtime::TupleBuffer &buf, uint64_t tupleIndex) const
 Writes a wrapper object to a given TupleBuffer. More...
 
void readFromBuffer (Runtime::TupleBuffer &buf, uint64_t tupleIndex)
 Parses a wrapper object from a given TupleBuffer. More...
 
CpuMetrics getValue (unsigned int cpuCore) const
 Returns the cpu metrics for a given core. More...
 
uint64_t size () const
 The number of CPU metrics contained in the wrapper. The number is equivalent to the number of cores + 1. More...
 
CpuMetrics getTotal () const
 The summarized stats over all CPU metrics. This metric is equivalent to the 0th element of the list. More...
 
WorkerId getNodeId () const
 
void setNodeId (WorkerId nodeId)
 
nlohmann::json toJson () const
 Returns the metrics as json. More...
 
bool operator== (const CpuMetricsWrapper &rhs) const
 
bool operator!= (const CpuMetricsWrapper &rhs) const
 
void NES::Monitoring::writeToBuffer (const CpuMetricsWrapper &metrics, Runtime::TupleBuffer &buf, uint64_t tupleIndex)
 The serialize method to write metrics into the given Schema and TupleBuffer. More...
 
void NES::Monitoring::readFromBuffer (CpuMetricsWrapper &wrapper, Runtime::TupleBuffer &buf, uint64_t tupleIndex)
 The deserialize method to read metrics from the given Schema and TupleBuffer. More...
 
nlohmann::json NES::Monitoring::asJson (const CpuMetricsWrapper &metrics)
 Parses the metric to JSON. More...
 

Function Documentation

◆ CpuMetricsWrapper() [1/3]

__attribute__::CpuMetricsWrapper ( )

Default Ctor for CpuMetricsWrapper with timestamp=0.

Referenced by NES::MetricStoreTest::SetUp(), and NES::UserDefinedMonitoringTest::SetUp().

Here is the caller graph for this function:

◆ CpuMetricsWrapper() [2/3]

__attribute__::CpuMetricsWrapper ( std::vector< CpuMetrics > &&  arr)
explicit

Ctor for CpuMetricsWrapper with a set of CpuMetrics. Node is 0 here.

Parameters
arrCpuMetrics

◆ CpuMetricsWrapper() [3/3]

__attribute__::CpuMetricsWrapper ( uint64_t  nodeId)
explicit

Ctor for CpuMetricsWrapper with a nodeId.

Parameters
nodeId

◆ getNodeId()

WorkerId __attribute__::getNodeId ( ) const

◆ getTotal()

CpuMetrics __attribute__::getTotal ( ) const

The summarized stats over all CPU metrics. This metric is equivalent to the 0th element of the list.

Returns
CPUMetrics

◆ getValue()

CpuMetrics __attribute__::getValue ( unsigned int  cpuCore) const

Returns the cpu metrics for a given core.

Parameters
cpuCorecore number
Returns
the cpu metrics

◆ operator!=()

bool __attribute__::operator!= ( const CpuMetricsWrapper rhs) const

◆ operator==()

bool __attribute__::operator== ( const CpuMetricsWrapper rhs) const

References nodeId.

◆ readFromBuffer()

void __attribute__::readFromBuffer ( Runtime::TupleBuffer &  buf,
uint64_t  tupleIndex 
)

Parses a wrapper object from a given TupleBuffer.

Parameters
buf
tupleIndex

References NES::Monitoring::CpuMetricsWrapper::CpuMetricsWrapper().

Here is the call graph for this function:

◆ setNodeId()

void __attribute__::setNodeId ( WorkerId  nodeId)

◆ size()

uint64_t __attribute__::size ( ) const

The number of CPU metrics contained in the wrapper. The number is equivalent to the number of cores + 1.

Returns
Number of CPU metrics

Referenced by NES::Runtime::detail::allocAligned(), NES::Runtime::allocateVariableLengthField(), backward::StackTraceImplHolder::begin(), NES::TestUtils::bufferSizeInBytes(), magic_enum::detail::cmp_equal(), NES::ArrayPhysicalType::convertRawToString(), NES::BasicPhysicalType::convertRawToString(), NES::ArrayPhysicalType::convertRawToStringWithoutFill(), NES::BasicPhysicalType::convertRawToStringWithoutFill(), NES::DataTypeFactory::createFixedCharValue(), NES::Parsers::NesCEPQueryPlanCreator::createTimeBasedWindow(), jitify::experimental::serialization::detail::deserialize(), NES::Parsers::NesCEPQueryPlanCreator::enterCepPattern(), NES::Parsers::NesCEPQueryPlanCreator::enterOrder(), NES::Parsers::NesCEPQueryPlanCreator::enterWindowConstraints(), NES::TCPSource::fillBuffer(), jitify::KernelInstantiation::get_constant_ptr(), jitify::experimental::KernelInstantiation::get_constant_ptr(), jitify::KernelInstantiation::get_global_ptr(), jitify::experimental::KernelInstantiation::get_global_ptr(), NES::Runtime::TupleBuffer::getBufferSize(), NES::Runtime::Execution::PipelineExecutionContext::getOperatorHandler(), NES::Schema::getSchemaSizeInBytes(), NES::Runtime::LocalBufferPool::getUnpooledBuffer(), NES::Runtime::QueryStatistics::incAvailableFixedBufferSum(), NES::Runtime::QueryStatistics::incAvailableGlobalBufferSum(), NES::Runtime::QueryStatistics::incQueueSizeSum(), NES::MetricValidator::isValidAll(), NES::MetricValidator::isValidAllStorage(), NES::Runtime::detail::BufferControlBlock::loadChildBuffer(), apex::memmove_dispatcher(), cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::locked_table::operator!=(), NES::Runtime::TupleBuffer::operator=(), cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::locked_table::operator==(), backward::StackTraceImplHolder::operator[](), Yaml::Parse(), NES::Monitoring::LinuxSystemResourcesReader::readCpuStats(), NES::Monitoring::LinuxSystemResourcesReader::readRuntimeNesMetrics(), NES::Runtime::TupleBuffer::release(), NES::TEST_F(), NES::RequestProcessor::TEST_F(), NES::ThreadBarrier::ThreadBarrier(), NES::UDFCatalogControllerTest::verifyByteCodeList(), and NES::RawBufferSink::writeData().

Here is the caller graph for this function:

◆ toJson()

nlohmann::json __attribute__::toJson ( ) const

Returns the metrics as json.

Returns
Json containing the metrics

◆ writeToBuffer()

void __attribute__::writeToBuffer ( Runtime::TupleBuffer &  buf,
uint64_t  tupleIndex 
) const

Writes a wrapper object to a given TupleBuffer.

Parameters
buf
tupleIndex