-
Notifications
You must be signed in to change notification settings - Fork 4.7k
accounts-cluster-bench, close all accounts in a sliding window #17993
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17993 +/- ##
=========================================
- Coverage 82.6% 82.6% -0.1%
=========================================
Files 435 435
Lines 121572 121572
=========================================
- Hits 100466 100443 -23
- Misses 21106 21129 +23 |
accounts-cluster-bench/src/main.rs
Outdated
.long("close-frequency") | ||
.takes_value(true) | ||
.value_name("BYTES") | ||
.help( | ||
"Send close transactions after this many accounts created. \ | ||
"Every `n` batches, create a batch of close transactions for | ||
the first batch of accounts created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first batch of accounts created. | |
the earliest remaining batch of accounts created. |
accounts-cluster-bench/src/main.rs
Outdated
Note: a `close-frequency` value near or below `batch-size` \ | ||
may result in transaction-simulation errors, as the close \ | ||
transactions will be submitted before the corresponding \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this part of the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the comment!
accounts-cluster-bench/src/main.rs
Outdated
let expected_closed = (total_accounts_created as u64 | ||
/ (close_nth_batch * batch_size as u64)) | ||
* batch_size as u64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let expected_closed = (total_accounts_created as u64 | |
/ (close_nth_batch * batch_size as u64)) | |
* batch_size as u64; | |
let num_batches_to_close = total_accounts_created as u64 | |
/ (close_nth_batch * batch_size as u64); | |
let expected_closed = num_batches_to_close * batch_size as u64; |
Total nit, but just makes it a little more clear why the batch_sizes
don't cancel out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
(cherry picked from commit ed18add)
… (#18026) (cherry picked from commit ed18add) Co-authored-by: carllin <[email protected]>
Problem
Can't simulate cleaning of zero-lamport accounts in accounts-cluster-bench unless a sliding window of
created accounts are all eventually zeroed
Summary of Changes
Support closing all accounts in a sliding window
Fixes #