Skip to content

Commit

Permalink
more tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
ruseinov committed Dec 4, 2024
1 parent e24480b commit 97fd072
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions near-sdk/tests/store_performance_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ async fn test_lazy() -> anyhow::Result<()> {

let res = account
.call(&contract_id, "flush")
.args_json((3550000,))
.args_json((3000000,))
.max_gas()
.transact()
.await?
Expand Down Expand Up @@ -488,13 +488,13 @@ async fn test_lazy() -> anyhow::Result<()> {
perform_asserts(res.total_gas_burnt.as_gas(), "lazy:insert_flush");

let res = account
.call(&contract_id, "insert_take_flush")
.call(&contract_id, "insert_take")
.args_json((700,))
.max_gas()
.transact()
.await?
.unwrap();

perform_asserts(res.total_gas_burnt.as_gas(), "lazy:insert_take_flush");
perform_asserts(res.total_gas_burnt.as_gas(), "lazy:insert_take");
Ok(())
}
2 changes: 1 addition & 1 deletion near-sdk/tests/test-contracts/lazy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl LazyContract {

/// This should write twice on each iteration.
#[payable]
pub fn insert_take_flush(&mut self, iterations: u32) {
pub fn insert_take(&mut self, iterations: u32) {
let mut insertable = self.insertable();
for idx in 0..=iterations {
insertable.index = idx as u32;
Expand Down

0 comments on commit 97fd072

Please sign in to comment.