worker_autoscaler_metrics - OmniCloudOrg/OmniOrchestrator GitHub Wiki
metrics (src/worker_autoscaler)
Path: src/worker_autoscaler/metrics.rs
Table of Contents
Public Items
trait MetricsCollector
Definition
pub trait MetricsCollector: Send + Sync + std::fmt::Debug {
/// Collect metrics from a specific VM
async fn collect_vm_metrics(&self, vm_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 VMs and nodes
async fn collect_aggregate_metrics(&self) -> Result<HashMap<String, f32>, AutoscalerError>;
}
Documentation
Interface for collecting metrics from VMs 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