Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jayz22 committed Jul 18, 2023
1 parent 5e7578f commit f6470b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions soroban-env-host/src/test/metering_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use soroban_test_wasms::{ADD_I32, COMPLEX};

use super::util::{generate_account_id, generate_bytes_array};

// The follow tests enables resource (cpu and mem) trackers, their main purpose is to evaluate
// metering accuracy by comparing modeled resource usage from the budget vs actual resource usage.
// The follow tests enables resource (cpu and mem) trackers, their main purpose is to evaluate
// metering accuracy by comparing modeled resource usage from the budget vs actual resource usage.
// They should be run with release profile, i.e. `cargo test --release` to get a fair comparison.
//
// These tests should be disabled by default, due to two reasons
Expand Down
8 changes: 6 additions & 2 deletions soroban-env-host/src/test/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,12 @@ impl Host {
let ht = HostTracker::start(None);

let val = self.call(contract, func, args);
let cpu_consumed = budget.get_cpu_insns_consumed().expect("unable to retrieve cpu consumed");
let mem_consumed = budget.get_mem_bytes_consumed().expect("unable to retrieve mem consumed");
let cpu_consumed = budget
.get_cpu_insns_consumed()
.expect("unable to retrieve cpu consumed");
let mem_consumed = budget
.get_mem_bytes_consumed()
.expect("unable to retrieve mem consumed");

let (cpu_insns, mem_bytes, _) = ht.stop();
println!(
Expand Down

0 comments on commit f6470b3

Please sign in to comment.