Add another cost estimate to this one
(&mut self, other: &CostEstimate)
| 102 | |
| 103 | /// Add another cost estimate to this one |
| 104 | pub fn add(&mut self, other: &CostEstimate) { |
| 105 | self.cpu_cost += other.cpu_cost; |
| 106 | self.io_cost += other.io_cost; |
| 107 | self.memory_cost += other.memory_cost; |
| 108 | self.network_cost += other.network_cost; |
| 109 | self.total_time += other.total_time; |
| 110 | } |
| 111 | |
| 112 | /// Calculate total cost as weighted sum |
| 113 | pub fn total_cost(&self) -> f64 { |
no outgoing calls
no test coverage detected