NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
CpuMetrics.hpp File Reference
#include <Identifiers/Identifiers.hpp>
#include <Monitoring/MonitoringForwardRefs.hpp>
#include <Runtime/RuntimeForwardRefs.hpp>
#include <string>
#include <vector>
Include dependency graph for CpuMetrics.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  NES::Monitoring::CpuMetrics
 This class represents the metrics read from /proc/stat: usr – % CPU usage at the user level nice – % CPU usage for user processes labeled “nice” sys – % CPU usage at the system (Linux kernel) level iowait – % CPU usage idling waiting on a disk read/write irq – % CPU usage handling hardware interrupts soft – % CPU usage handing software interrupts steal – % CPU usage being forced to wait for a hypervisor handling other virtual processors guest – % CPU usage spent running a virtual processor idle – % CPU usage on idle time (no processes, and not waiting on a disk read/write) More...
 

Namespaces

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

Typedefs

using NES::Configurations::SchemaTypePtr = std::shared_ptr< SchemaType >
 

Functions

class NES::Monitoring::CpuMetrics NES::Monitoring::__attribute__ ((packed))
 
 CpuMetrics ()
 
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...
 
std::ostream & operator<< (std::ostream &os, const CpuMetrics &values)
 Source operator to convert the object to string. More...
 
nlohmann::json toJson () const
 Returns the metrics as json. More...
 
bool operator== (const CpuMetrics &rhs) const
 
bool operator!= (const CpuMetrics &rhs) const
 
void NES::Monitoring::writeToBuffer (const CpuMetrics &metrics, Runtime::TupleBuffer &buf, uint64_t tupleIndex)
 The serialize method to write metrics into the given Schema and TupleBuffer. More...
 
void NES::Monitoring::readFromBuffer (CpuMetrics &metrics, Runtime::TupleBuffer &buf, uint64_t tupleIndex)
 Parses a metrics objects from a given Schema and TupleBuffer. More...
 
nlohmann::json NES::Monitoring::asJson (const CpuMetrics &metrics)
 Parses the metric to JSON. More...
 

Variables

WorkerId nodeId
 
uint64_t timestamp
 
uint64_t coreNum
 
uint64_t user
 
uint64_t nice
 
uint64_t system
 
uint64_t idle
 
uint64_t iowait
 
uint64_t irq
 
uint64_t softirq
 
uint64_t steal
 
uint64_t guest
 
uint64_t guestnice
 

Function Documentation

◆ CpuMetrics()

__attribute__::CpuMetrics ( )

Referenced by NES::Monitoring::AbstractSystemResourcesReader::readCpuStats(), and NES::Monitoring::LinuxSystemResourcesReader::readCpuStats().

Here is the caller graph for this function:

◆ operator!=()

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

◆ operator<<()

friend std::ostream& __attribute__::operator<< ( std::ostream &  os,
const CpuMetrics values 
)

Source operator to convert the object to string.

Parameters
os
values
Returns
the source

◆ operator==()

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

◆ readFromBuffer()

void __attribute__::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

Referenced by NES::TEST_F().

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 metrics objects to the given TupleBuffer and index.

Parameters
bufthe tuple buffer
tupleIndexthe index indication its location in the buffer

Referenced by NES::TEST_F().

Here is the caller graph for this function:

Variable Documentation

◆ coreNum

uint64_t coreNum

◆ guest

uint64_t guest

◆ guestnice

uint64_t guestnice

◆ idle

uint64_t idle

◆ iowait

uint64_t iowait

◆ irq

uint64_t irq

◆ nice

uint64_t nice

◆ nodeId

WorkerId nodeId

Referenced by NES::Monitoring::AllEntriesMetricStore::addMetrics(), NES::Monitoring::LatestEntriesMetricStore::addMetrics(), NES::Monitoring::MonitoringManager::addMonitoringData(), NES::MetricValidator::checkNodeIds(), NES::MetricValidator::checkNodeIdsStorage(), NES::DistributedMatrixJoinIntegrationTest::createTestHarness(), NES::DistributedNemoJoinIntegrationTest::createTestHarness(), NES::REST::Controller::LocationController::ENDPOINT(), NES::REST::Controller::MonitoringController::ENDPOINT(), NES::Monitoring::AllEntriesMetricStore::getAllMetrics(), NES::Monitoring::LatestEntriesMetricStore::getAllMetrics(), NES::Monitoring::MonitoringManager::getMonitoringPlan(), NES::CoordinatorRPCServer::GetParents(), NES::Monitoring::AllEntriesMetricStore::hasMetrics(), NES::Monitoring::LatestEntriesMetricStore::hasMetrics(), operator==(), NES::Monitoring::MonitoringManager::registerRemoteMonitoringPlans(), NES::CoordinatorRPCServer::RegisterWorker(), NES::Monitoring::AllEntriesMetricStore::removeMetrics(), NES::Monitoring::LatestEntriesMetricStore::removeMetrics(), NES::Monitoring::MonitoringManager::removeMonitoringNode(), NES::MonitoringService::requestMonitoringDataAsJson(), NES::MonitoringService::requestMonitoringDataFromAllNodesAsJson(), NES::MonitoringService::requestNewestMonitoringDataFromMetricStoreAsJson(), NES::Monitoring::MonitoringManager::requestRemoteMonitoringData(), NES::MonitoringQueriesTest::runMetricsQueryTest(), NES::Monitoring::MetricCollector::setNodeId(), NES::Monitoring::CpuMetricsWrapper::setNodeId(), NES::Monitoring::NetworkMetricsWrapper::setNodeId(), NES::Monitoring::MonitoringAgent::setNodeId(), NES::MetricCollectorTest::SetUp(), NES::TEST_F(), TEST_F(), and NES::MetricValidator::waitForMonitoringStreamsOrTimeout().

◆ softirq

uint64_t softirq

◆ steal

uint64_t steal

◆ system

uint64_t system

◆ timestamp

◆ user

uint64_t user