feat: eval should take initial budget

This commit is contained in:
rvcas
2022-12-08 10:55:27 -05:00
parent 4cdb5d8d02
commit f250d3df84
3 changed files with 9 additions and 7 deletions

View File

@@ -61,7 +61,9 @@ pub fn exec(
program = program.apply_term(&term);
}
let (term, cost, logs) = program.eval();
let budget = ExBudget::default();
let (term, cost, logs) = program.eval(budget);
match term {
Ok(term) => {
@@ -74,8 +76,6 @@ pub fn exec(
}
}
let budget = ExBudget::default();
println!(
"\nCosts\n-----\ncpu: {}\nmemory: {}",
budget.cpu - cost.cpu,