pub struct CostAnalyzer { /* private fields */ }Expand description
Cost optimizer
Implementations§
Source§impl CostAnalyzer
impl CostAnalyzer
Sourcepub fn new(provider: CloudProvider) -> Self
pub fn new(provider: CloudProvider) -> Self
Create a new cost analyzer for a specific provider
Sourcepub fn set_cost_model(&mut self, tier: CostTier, model: TierCostModel)
pub fn set_cost_model(&mut self, tier: CostTier, model: TierCostModel)
Set custom cost model for a tier
Sourcepub fn record_write(&mut self, tier: CostTier, bytes: u64)
pub fn record_write(&mut self, tier: CostTier, bytes: u64)
Record a write operation
Sourcepub fn record_read(&mut self, tier: CostTier, bytes: u64)
pub fn record_read(&mut self, tier: CostTier, bytes: u64)
Record a read operation
Sourcepub fn record_delete(&mut self, tier: CostTier, bytes: u64)
pub fn record_delete(&mut self, tier: CostTier, bytes: u64)
Record a delete operation
Sourcepub fn record_transfer(&mut self, tier: CostTier, bytes: u64)
pub fn record_transfer(&mut self, tier: CostTier, bytes: u64)
Record data transfer
Sourcepub fn calculate_tier_cost(
&self,
tier: CostTier,
days: u32,
) -> Option<CostBreakdown>
pub fn calculate_tier_cost( &self, tier: CostTier, days: u32, ) -> Option<CostBreakdown>
Calculate cost for a specific tier
Sourcepub fn calculate_total_cost(&self, days: u32) -> CostBreakdown
pub fn calculate_total_cost(&self, days: u32) -> CostBreakdown
Calculate total cost across all tiers
Sourcepub fn recommend_tier(
&self,
access_frequency: f64,
data_size_gb: f64,
) -> TierRecommendation
pub fn recommend_tier( &self, access_frequency: f64, data_size_gb: f64, ) -> TierRecommendation
Get tier recommendation based on access pattern
Sourcepub fn project_costs(&self, days: u32) -> CostProjection
pub fn project_costs(&self, days: u32) -> CostProjection
Project costs for next N days
Auto Trait Implementations§
impl Freeze for CostAnalyzer
impl !RefUnwindSafe for CostAnalyzer
impl Send for CostAnalyzer
impl Sync for CostAnalyzer
impl Unpin for CostAnalyzer
impl UnwindSafe for CostAnalyzer
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> 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 more