pub struct LiveRecommendation {Show 15 fields
pub workload_name: String,
pub workload_kind: String,
pub namespace: String,
pub container_name: String,
pub severity: Severity,
pub current_cpu_millicores: Option<u64>,
pub current_memory_bytes: Option<u64>,
pub actual_cpu_millicores: u64,
pub actual_memory_bytes: u64,
pub recommended_cpu_millicores: u64,
pub recommended_memory_bytes: u64,
pub cpu_waste_pct: f32,
pub memory_waste_pct: f32,
pub confidence: u8,
pub data_source: DataSource,
}Expand description
A single recommendation from live analysis.
Fields§
§workload_name: String§workload_kind: String§namespace: String§container_name: String§severity: Severity§current_cpu_millicores: Option<u64>Current CPU request (millicores)
current_memory_bytes: Option<u64>Current memory request (bytes)
actual_cpu_millicores: u64Actual CPU usage (millicores)
actual_memory_bytes: u64Actual memory usage (bytes)
recommended_cpu_millicores: u64Recommended CPU request (millicores)
recommended_memory_bytes: u64Recommended memory request (bytes)
cpu_waste_pct: f32CPU waste percentage (positive = over-provisioned)
memory_waste_pct: f32Memory waste percentage (positive = over-provisioned)
confidence: u8Confidence level (0-100)
data_source: DataSourceSource of the data
Implementations§
Source§impl LiveRecommendation
impl LiveRecommendation
Sourcepub fn generate_fix_yaml(&self) -> String
pub fn generate_fix_yaml(&self) -> String
Generate a YAML fix snippet for this recommendation.
Trait Implementations§
Source§impl Clone for LiveRecommendation
impl Clone for LiveRecommendation
Source§fn clone(&self) -> LiveRecommendation
fn clone(&self) -> LiveRecommendation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LiveRecommendation
impl Debug for LiveRecommendation
Source§impl<'de> Deserialize<'de> for LiveRecommendation
impl<'de> Deserialize<'de> for LiveRecommendation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LiveRecommendation
impl RefUnwindSafe for LiveRecommendation
impl Send for LiveRecommendation
impl Sync for LiveRecommendation
impl Unpin for LiveRecommendation
impl UnwindSafe for LiveRecommendation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.