We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84ac693 commit ded7f71Copy full SHA for ded7f71
contract/vault/examples/gas_report.rs
@@ -26,18 +26,14 @@ async fn main() {
26
let user1_amount = max / ITERATIONS as u128;
27
28
// Run supplies concurrently.
29
- let supply_futures = (0..ITERATIONS).map(|_| async {
30
- vault
+ let mut supply_gas_average = 0f64;
+ for _ in 0..ITERATIONS {
31
+ supply_gas_average += vault
32
.supply(&user1, user1_amount)
33
.await
34
.total_gas_burnt
35
.as_gas() as f64
- });
36
- let supply_results = futures::future::join_all(supply_futures).await;
37
-
38
- let mut supply_gas_average = 0f64;
39
- for s in supply_results {
40
- supply_gas_average += s / ITERATIONS as f64;
+ / ITERATIONS as f64;
41
}
42
43
let mut allocation_gas_average = 0f64;
0 commit comments