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

This class is responsible for verifying the content of metrics read by the SystemResourcesReader. More...

#include <MetricValidator.hpp>

Static Public Member Functions

static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::MetricPtr metric)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::RuntimeMetrics metrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::RegistrationMetrics metrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::CpuMetricsWrapper cpuMetrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::NetworkMetricsWrapper networkMetrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::MemoryMetrics memoryMetrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::DiskMetrics diskMetrics)
 
static bool isValid (Monitoring::AbstractSystemResourcesReaderPtr reader, Monitoring::StoredNodeMetricsPtr storedMetrics, Monitoring::MetricType expectedType, WorkerId expectedNodeId, uint64_t expectedSize)
 
static bool isValidAll (Monitoring::AbstractSystemResourcesReaderPtr reader, nlohmann::json json)
 
static bool isValidAllStorage (Monitoring::AbstractSystemResourcesReaderPtr reader, nlohmann::json json)
 
static bool isValidRegistrationMetrics (Monitoring::AbstractSystemResourcesReaderPtr reader, nlohmann::json json)
 
static bool checkNodeIds (nlohmann::json json, WorkerId nodeId)
 
static bool checkNodeIdsStorage (nlohmann::json json, WorkerId nodeId)
 
static bool checkEntriesOfStream (std::set< std::string > setOfStr, nlohmann::json jsons)
 
static bool checkNodeIds (Monitoring::MetricPtr metric, WorkerId nodeId)
 
static bool waitForMonitoringStreamsOrTimeout (const std::set< Monitoring::MetricType > &monitoringStreams, uint16_t maxTimeout, uint64_t restPort)
 

Detailed Description

This class is responsible for verifying the content of metrics read by the SystemResourcesReader.

Member Function Documentation

◆ checkEntriesOfStream()

static bool NES::MetricValidator::checkEntriesOfStream ( std::set< std::string >  setOfStr,
nlohmann::json  jsons 
)
static

Referenced by NES::TEST_F().

Here is the caller graph for this function:

◆ checkNodeIds() [1/2]

◆ checkNodeIds() [2/2]

bool NES::MetricValidator::checkNodeIds ( nlohmann::json  json,
WorkerId  nodeId 
)
static

References NES_ERROR, and nodeId.

Referenced by checkNodeIdsStorage(), isValid(), and NES::TEST_F().

Here is the caller graph for this function:

◆ checkNodeIdsStorage()

bool NES::MetricValidator::checkNodeIdsStorage ( nlohmann::json  json,
WorkerId  nodeId 
)
static

References checkNodeIds(), and nodeId.

Referenced by NES::TEST_F().

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

◆ isValid() [1/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::CpuMetricsWrapper  cpuMetrics 
)
static

◆ isValid() [2/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::DiskMetrics  diskMetrics 
)
static

◆ isValid() [3/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::MemoryMetrics  memoryMetrics 
)
static

◆ isValid() [4/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::MetricPtr  metric 
)
static

References NES::Monitoring::DiskMetric, NES::Monitoring::MemoryMetric, NES::Monitoring::RegistrationMetric, NES::Monitoring::WrappedCpuMetrics, and NES::Monitoring::WrappedNetworkMetrics.

Referenced by isValid(), NES::MonitoringQueriesTest::runMetricsQueryTest(), and NES::TEST_F().

Here is the caller graph for this function:

◆ isValid() [5/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::NetworkMetricsWrapper  networkMetrics 
)
static

◆ isValid() [6/8]

◆ isValid() [7/8]

◆ isValid() [8/8]

bool NES::MetricValidator::isValid ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
Monitoring::StoredNodeMetricsPtr  storedMetrics,
Monitoring::MetricType  expectedType,
WorkerId  expectedNodeId,
uint64_t  expectedSize 
)
static

References checkNodeIds(), isValid(), NES_ERROR, NES_INFO, NES::Monitoring::MetricUtils::toJson(), and NES::Monitoring::toString().

Here is the call graph for this function:

◆ isValidAll()

bool NES::MetricValidator::isValidAll ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
nlohmann::json  json 
)
static

References AbstractReader, NES::Monitoring::DiskMetric, magic_enum::enum_name(), isValidRegistrationMetrics(), NES::Monitoring::MemoryMetric, NES_ERROR, NES_WARNING, NES::Monitoring::RegistrationMetric, size(), NES::Monitoring::WrappedCpuMetrics, and NES::Monitoring::WrappedNetworkMetrics.

Referenced by NES::TEST_F().

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

◆ isValidAllStorage()

bool NES::MetricValidator::isValidAllStorage ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
nlohmann::json  json 
)
static

References AbstractReader, isValidRegistrationMetrics(), NES_ERROR, NES_WARNING, and size().

Referenced by NES::TEST_F().

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

◆ isValidRegistrationMetrics()

bool NES::MetricValidator::isValidRegistrationMetrics ( Monitoring::AbstractSystemResourcesReaderPtr  reader,
nlohmann::json  json 
)
static

References AbstractReader, NES::Monitoring::RegistrationMetrics::getSchema(), NES_ERROR, and NES_WARNING.

Referenced by isValidAll(), isValidAllStorage(), and NES::TEST_F().

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

◆ waitForMonitoringStreamsOrTimeout()

bool NES::MetricValidator::waitForMonitoringStreamsOrTimeout ( const std::set< Monitoring::MetricType > &  monitoringStreams,
uint16_t  maxTimeout,
uint64_t  restPort 
)
static

References NES::TestUtils::makeMonitoringRestCall(), NES_ERROR, NES_INFO, nodeId, NES::TestUtils::restPort(), and NES::Monitoring::toString().

Referenced by NES::TEST_F().

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

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