|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
#include <gtest/gtest.h>#include <kcenon/monitoring/utils/stream_aggregator.h>#include <kcenon/monitoring/utils/aggregation_processor.h>#include <kcenon/monitoring/utils/metric_storage.h>#include <chrono>#include <thread>#include <vector>#include <random>#include <cmath>
Go to the source code of this file.
Classes | |
| class | StreamAggregationTest |
| Test suite for Phase 3 P2: Statistical aggregation functions. More... | |
Functions | |
| TEST_F (StreamAggregationTest, OnlineStatisticsBasic) | |
| TEST_F (StreamAggregationTest, OnlineStatisticsLargeDataset) | |
| TEST_F (StreamAggregationTest, QuantileEstimatorMedian) | |
| TEST_F (StreamAggregationTest, QuantileEstimatorPercentiles) | |
| TEST_F (StreamAggregationTest, MovingWindowBasic) | |
| TEST_F (StreamAggregationTest, MovingWindowExpiration) | |
| TEST_F (StreamAggregationTest, StreamAggregatorBasic) | |
| TEST_F (StreamAggregationTest, StreamAggregatorPercentiles) | |
| TEST_F (StreamAggregationTest, StreamAggregatorOutlierDetection) | |
| TEST_F (StreamAggregationTest, StreamAggregatorReset) | |
| TEST_F (StreamAggregationTest, AggregationProcessorBasic) | |
| TEST_F (StreamAggregationTest, AggregationProcessorMultipleMetrics) | |
| TEST_F (StreamAggregationTest, AggregationProcessorForceAggregation) | |
| TEST_F (StreamAggregationTest, AggregationProcessorInvalidRule) | |
| TEST_F (StreamAggregationTest, PearsonCorrelation) | |
| TEST_F (StreamAggregationTest, StandardAggregationRules) | |
| TEST_F (StreamAggregationTest, ConfigurationValidation) | |
| TEST_F (StreamAggregationTest, StreamAggregatorThreadSafety) | |
| TEST_F | ( | StreamAggregationTest | , |
| AggregationProcessorBasic | ) |
Definition at line 279 of file test_stream_aggregation.cpp.
References kcenon::monitoring::aggregation_processor::add_aggregation_rule(), kcenon::monitoring::aggregation_rule::aggregation_interval, kcenon::monitoring::aggregation_rule::compute_rate, kcenon::monitoring::aggregation_rule::detect_outliers, kcenon::monitoring::aggregation_processor::get_current_statistics(), kcenon::monitoring::aggregation_rule::percentiles, kcenon::monitoring::aggregation_processor::process_observation(), kcenon::monitoring::aggregation_rule::source_metric, kcenon::monitoring::storage, and kcenon::monitoring::aggregation_rule::target_metric_prefix.

| TEST_F | ( | StreamAggregationTest | , |
| AggregationProcessorForceAggregation | ) |
Definition at line 343 of file test_stream_aggregation.cpp.
References kcenon::monitoring::aggregation_processor::add_aggregation_rule(), kcenon::monitoring::aggregation_rule::aggregation_interval, kcenon::monitoring::aggregation_processor::force_aggregation(), kcenon::monitoring::aggregation_rule::percentiles, kcenon::monitoring::aggregation_processor::process_observation(), kcenon::monitoring::aggregation_rule::source_metric, kcenon::monitoring::storage, and kcenon::monitoring::aggregation_rule::target_metric_prefix.

| TEST_F | ( | StreamAggregationTest | , |
| AggregationProcessorInvalidRule | ) |
Definition at line 377 of file test_stream_aggregation.cpp.
References kcenon::monitoring::aggregation_processor::add_aggregation_rule(), kcenon::monitoring::aggregation_rule::source_metric, and kcenon::monitoring::aggregation_rule::target_metric_prefix.

| TEST_F | ( | StreamAggregationTest | , |
| AggregationProcessorMultipleMetrics | ) |
Definition at line 310 of file test_stream_aggregation.cpp.
References kcenon::monitoring::aggregation_processor::add_aggregation_rule(), kcenon::monitoring::aggregation_rule::aggregation_interval, kcenon::monitoring::aggregation_processor::get_configured_metrics(), kcenon::monitoring::aggregation_processor::process_observation(), kcenon::monitoring::aggregation_rule::source_metric, and kcenon::monitoring::aggregation_rule::target_metric_prefix.

| TEST_F | ( | StreamAggregationTest | , |
| ConfigurationValidation | ) |
Definition at line 458 of file test_stream_aggregation.cpp.
References kcenon::monitoring::aggregation_rule::source_metric, kcenon::monitoring::aggregation_rule::target_metric_prefix, kcenon::monitoring::aggregation_rule::validate(), kcenon::monitoring::stream_aggregator_config::validate(), kcenon::monitoring::stream_aggregator_config::window_duration, and kcenon::monitoring::stream_aggregator_config::window_size.

| TEST_F | ( | StreamAggregationTest | , |
| MovingWindowBasic | ) |
Definition at line 143 of file test_stream_aggregation.cpp.
References kcenon::monitoring::moving_window_aggregator< T >::add_value(), kcenon::monitoring::moving_window_aggregator< T >::get_values(), and kcenon::monitoring::moving_window_aggregator< T >::size().

| TEST_F | ( | StreamAggregationTest | , |
| MovingWindowExpiration | ) |
Definition at line 164 of file test_stream_aggregation.cpp.
References kcenon::monitoring::moving_window_aggregator< T >::add_value(), and kcenon::monitoring::moving_window_aggregator< T >::get_values().

| TEST_F | ( | StreamAggregationTest | , |
| OnlineStatisticsBasic | ) |
Definition at line 68 of file test_stream_aggregation.cpp.
References kcenon::monitoring::online_statistics::add_value(), kcenon::monitoring::online_statistics::count(), kcenon::monitoring::online_statistics::get_statistics(), kcenon::monitoring::online_statistics::mean(), and kcenon::monitoring::online_statistics::variance().

| TEST_F | ( | StreamAggregationTest | , |
| OnlineStatisticsLargeDataset | ) |
Definition at line 93 of file test_stream_aggregation.cpp.
References kcenon::monitoring::online_statistics::add_value(), and kcenon::monitoring::online_statistics::get_statistics().

| TEST_F | ( | StreamAggregationTest | , |
| PearsonCorrelation | ) |
Definition at line 401 of file test_stream_aggregation.cpp.
References kcenon::monitoring::pearson_correlation().

| TEST_F | ( | StreamAggregationTest | , |
| QuantileEstimatorMedian | ) |
Definition at line 112 of file test_stream_aggregation.cpp.
References kcenon::monitoring::quantile_estimator::add_observation(), and kcenon::monitoring::quantile_estimator::get_quantile().

| TEST_F | ( | StreamAggregationTest | , |
| QuantileEstimatorPercentiles | ) |
Definition at line 126 of file test_stream_aggregation.cpp.
References kcenon::monitoring::quantile_estimator::add_observation(), and kcenon::monitoring::quantile_estimator::get_quantile().

| TEST_F | ( | StreamAggregationTest | , |
| StandardAggregationRules | ) |
Definition at line 431 of file test_stream_aggregation.cpp.
References kcenon::monitoring::create_standard_aggregation_rules().

| TEST_F | ( | StreamAggregationTest | , |
| StreamAggregatorBasic | ) |
Definition at line 189 of file test_stream_aggregation.cpp.
References kcenon::monitoring::stream_aggregator::add_observation(), kcenon::monitoring::stream_aggregator_config::enable_outlier_detection, kcenon::monitoring::stream_aggregator::get_statistics(), and kcenon::monitoring::stream_aggregator_config::window_size.

| TEST_F | ( | StreamAggregationTest | , |
| StreamAggregatorOutlierDetection | ) |
Definition at line 238 of file test_stream_aggregation.cpp.
References kcenon::monitoring::stream_aggregator::add_observation(), kcenon::monitoring::stream_aggregator_config::enable_outlier_detection, kcenon::monitoring::stream_aggregator::get_statistics(), and kcenon::monitoring::stream_aggregator_config::outlier_threshold.

| TEST_F | ( | StreamAggregationTest | , |
| StreamAggregatorPercentiles | ) |
Definition at line 215 of file test_stream_aggregation.cpp.
References kcenon::monitoring::stream_aggregator::add_observation(), and kcenon::monitoring::stream_aggregator::get_percentile().

| TEST_F | ( | StreamAggregationTest | , |
| StreamAggregatorReset | ) |
Definition at line 260 of file test_stream_aggregation.cpp.
References kcenon::monitoring::stream_aggregator::add_observation(), kcenon::monitoring::stream_aggregator::count(), kcenon::monitoring::stream_aggregator::mean(), kcenon::monitoring::stream_aggregator::reset(), and kcenon::monitoring::stream_aggregator::variance().

| TEST_F | ( | StreamAggregationTest | , |
| StreamAggregatorThreadSafety | ) |
Definition at line 484 of file test_stream_aggregation.cpp.
References kcenon::monitoring::stream_aggregator::add_observation(), kcenon::monitoring::stream_aggregator::count(), and kcenon::monitoring::stream_aggregator::get_statistics().
