app_autoscaler_metrics - OmniCloudOrg/OmniOrchestrator GitHub Wiki

metrics (src/app_autoscaler)

Path: src/app_autoscaler/metrics.rs

Table of Contents

Public Items

trait MetricsCollector

Definition

pub trait MetricsCollector: Send + Sync + std::fmt::Debug {
    /// Collect metrics from a specific app instance
    async fn collect_instance_metrics(&self, instance_id: &str) -> Result<HashMap<String, f32>, AutoscalerError>;
    
    /// Collect metrics from a specific node
    async fn collect_node_metrics(&self, node_id: &str) -> Result<HashMap<String, f32>, AutoscalerError>;
    
    /// Collect aggregate metrics for all app instances and nodes
    async fn collect_aggregate_metrics(&self) -> Result<HashMap<String, f32>, AutoscalerError>;
}

Documentation

Interface for collecting metrics from app instances and nodes

enum MetricThreshold

Definition

pub enum MetricThreshold {
    Float(f32),
    Integer(i64),
    Boolean(bool),
}

Documentation

Possible threshold types for metrics

enum ScalingAction

Definition

pub enum ScalingAction {
    ScaleUp,
    ScaleDown,
    NoAction,

Documentation

Represents a scaling action to be taken