Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
metric_types.h File Reference

Common metric type definitions for efficient storage. More...

#include "../core/result_types.h"
#include "../core/error_codes.h"
#include <string>
#include <chrono>
#include <unordered_map>
#include <variant>
#include <vector>
#include <cstdint>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <limits>
Include dependency graph for metric_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::monitoring::metric_metadata
 Compact metadata for metrics. More...
 
struct  kcenon::monitoring::compact_metric_value
 Memory-efficient metric value storage. More...
 
struct  kcenon::monitoring::metric_batch
 Batch of metrics for efficient processing. More...
 
struct  kcenon::monitoring::histogram_bucket
 Bucket for histogram metrics. More...
 
struct  kcenon::monitoring::histogram_data
 Histogram data with buckets. More...
 
struct  kcenon::monitoring::summary_data
 Summary statistics for metrics. More...
 
struct  kcenon::monitoring::timer_data
 Timer data with percentile calculations. More...
 
struct  kcenon::monitoring::timer_data::snapshot
 Get snapshot of current statistics. More...
 
class  kcenon::monitoring::timer_scope
 RAII timer scope for automatic duration recording with timer_data. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::monitoring
 

Enumerations

enum class  kcenon::monitoring::metric_type : uint8_t {
  kcenon::monitoring::counter , kcenon::monitoring::gauge , kcenon::monitoring::histogram , kcenon::monitoring::summary ,
  kcenon::monitoring::timer , kcenon::monitoring::counter = 0 , kcenon::monitoring::gauge , kcenon::monitoring::histogram ,
  kcenon::monitoring::summary , kcenon::monitoring::timer , kcenon::monitoring::set
}
 

Functions

constexpr const char * kcenon::monitoring::metric_type_to_string (metric_type type) noexcept
 Convert metric type to string.
 
uint32_t kcenon::monitoring::hash_metric_name (const std::string &name) noexcept
 Hash function for metric names.
 
metric_metadata kcenon::monitoring::create_metric_metadata (const std::string &name, metric_type type, size_t tag_count=0)
 Create metric metadata from name and type.
 

Detailed Description

Common metric type definitions for efficient storage.

This file defines standardized metric types optimized for memory efficiency and cache-friendly access patterns in the monitoring system.

Definition in file metric_types.h.