Skip to content

Commit

Permalink
Merge pull request #2 from hydro-project/dev
Browse files Browse the repository at this point in the history
Bug fix for Python implementation of loader
  • Loading branch information
tiemobang authored Feb 7, 2024
2 parents 3803674 + 9a4bdd2 commit 5f1642b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions baselines/src/py_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ impl PyLoader {
}

pub fn put_price(&self) -> HashMap<String, f64> {
self.object_stores.iter().map(|o| (o.fully_qualified_name(), o.cost.get_cost)).collect::<HashMap<_,_>>()
self.object_stores.iter().map(|o| (o.fully_qualified_name(), o.cost.put_cost)).collect::<HashMap<_,_>>()
}

pub fn storage_price(&self) -> HashMap<String, f64> {
self.object_stores.iter().map(|o| (o.fully_qualified_name(), o.cost.get_cost)).collect::<HashMap<_,_>>()
self.object_stores.iter().map(|o| (o.fully_qualified_name(), o.cost.size_cost)).collect::<HashMap<_,_>>()
}

pub fn network_price(&self) -> HashMap<String, HashMap<String, f64>> {
Expand Down Expand Up @@ -100,4 +100,12 @@ impl PyLoader {
pub fn object_store_names(&self) -> Vec<String> {
self.object_stores.iter().map(|o| o.fully_qualified_name()).collect::<Vec<_>>()
}

fn __repr__(&self) -> String {
format!("{:?}", self)
}

fn __str__(&self) -> String {
self.__repr__()
}
}

0 comments on commit 5f1642b

Please sign in to comment.