-
Notifications
You must be signed in to change notification settings - Fork 1.1k
benchmarking: fix DB read/write counts #10947
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
base: master
Are you sure you want to change the base?
Conversation
PR #10802 added `reset_read_write_count()` at the end of commit_db() to prevent warmup operations from appearing in benchmarking results. However, commit_db is called twice: one on_before_start() closure before benchmark, and one after benchmark execution after benchmark. This PR moves read_write_count() call before the post-benchmark commit_db() call.
|
/cmd prdoc --audience runtime_dev --bump patch |
…time_dev --bump patch'
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
Tested via Pallet: "pallet_staking_async", Extrinsic: "force_apply_min_commission", Lowest values: [], Highest values: [], Steps: 2, Repeat: 1
Raw Storage Info
========
Storage: `Staking::MinCommission` (r:1 w:0)
Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
Storage: `Staking::Validators` (r:1 w:1)
Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
Median Slopes Analysis
========
-- Extrinsic Time --
Model:
Time ~= 58.33
µs
Reads = 2
Writes = 1
Recorded proof Size = 640
Min Squares Analysis
========
-- Extrinsic Time --
Model:
Time ~= 58.33
µs
Reads = 2
Writes = 1
Recorded proof Size = 640 |
mertwole
left a 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.
Aldo the pallet-staking-async weights need to be benched again as #10802 removed DB read/write weights there
Fair - I was not sure if doing it in a follow-up PR or here, but seems reasonable to do it here. Lemme |
|
/cmd bench --pallet pallet_staking_async --runtime asset-hub-westend |
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has started 🚀 See logs here |
|
/cmd bench --pallet pallet_conviction_voting --runtime asset-hub-westend |
|
Command "bench --pallet pallet_conviction_voting --runtime asset-hub-westend" has started 🚀 See logs here |
let me add that to the prdoc too 😄 |
…t_staking_async --runtime asset-hub-westend'
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has finished ✅ See logs here DetailsSubweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
…t_conviction_voting --runtime asset-hub-westend'
|
Command "bench --pallet pallet_conviction_voting --runtime asset-hub-westend" has finished ✅ See logs here DetailsSubweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
PR #10802 added
reset_read_write_count()at the end of commit_db() to prevent warmup operations from appearing in benchmarking results. However, commit_db is called twice: one onon_before_start()closure before benchmark, and one after benchmark execution after benchmark.This PR whitelists the warmup key used in commit_db so that it doesn't appear in the read/write count.
We also regenerated staking-async weights (wrongly benchmarked in #10802) and conviction-voting to check both v1 and v2 benchmarking.