-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bench(synth-bench): Add read_nonces_from_network
flag to benchmark binaries
#12826
Conversation
ee30283
to
8218349
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12826 +/- ##
=======================================
Coverage 70.41% 70.41%
=======================================
Files 848 848
Lines 174849 174930 +81
Branches 174849 174930 +81
=======================================
+ Hits 123117 123185 +68
- Misses 46485 46489 +4
- Partials 5247 5256 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
read_nonces_from_network
flag to benchmark binariesread_nonces_from_network
flag to benchmark binaries
read_nonces_from_network
flag to benchmark binariesread_nonces_from_network
flag to benchmark binaries
827d5c1
to
88bb222
Compare
[issue 12805](#12805) The flag (default=false) triggers the update of the account nonces from the network before generating the transactions. impl details: - extract the `update_account_nonces()` function - add a corresponding flag to benhmark_native_transfers and benchmark_mpc binaries + apply the `update_account_nonces()` depending on the flag value tested: - run the benchmark from the clean state - edit the `a_user_0.test.near.json`, set "nonce" to 7000001 - update the log level to "trace" in the justfile - re-run the benchmark - find the `[2025-01-29T13:06:56Z TRACE near_synth_bm::account] updating nonce for a user a_user_0.test.near (7000001->7000020)` in the log
88bb222
to
f0bb1a0
Compare
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.
Looking good, just some nits regarding the implementation.
As we want to improve docs, I would suggest adding a section for --read-nonces-from-network
to common parameters:
- Explaining why it exists (see issue description).
- Recommend it when using few accounts resp. when it's ok to wait for the nonces being queried.
I will definitely update it after the other PRs touching the benchmarking docs land. That will probably be easier than de-conflicting it. |
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, please just change log
to tracing
.
done |
There are a number of spellcheck errors that you'll need to resolve before this can land. |
sub_accounts = update_account_nonces( | ||
client.clone(), | ||
sub_accounts, | ||
1_000_000 / args.interval_duration_micros, |
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.
Any reason this code goes from duration to Hz and then back within the function?
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.
Might be a side effect of having multiple PRs in flight.
issue 12805
The flag (default=false) triggers the update of the account nonces from the network before generating the transactions.
impl details:
update_account_nonces()
functionupdate_account_nonces()
depending on the flag valuetested:
a_user_0.test.near.json
, set "nonce" to 7000001[2025-01-29T13:06:56Z TRACE near_synth_bm::account] updating nonce for a user a_user_0.test.near (7000001->7000020)
in the log