mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +00:00
Fix V2 PoV benchmarking (#13485)
* Bump default 'additional_trie_layers' to two The default here only works for extremely small runtimes, which have no more than 16 storage prefices. This is changed to a "sane" default of 2, which is save for runtimes with up to 4096 storage prefices (eg StorageValue). Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update tests and test weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix PoV weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_message_queue * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_glutton * Fix sanity check >0 would also do as a check, but let's try this. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
033a0d01a4
commit
1eb0cd31b9
@@ -567,7 +567,12 @@ pub fn benchmarks(
|
||||
#support::storage::transactional::TRANSACTION_LEVEL_KEY.into(),
|
||||
);
|
||||
whitelist.push(transactional_layer_key);
|
||||
#krate::benchmarking::set_whitelist(whitelist);
|
||||
// Whitelist the `:extrinsic_index`.
|
||||
let extrinsic_index = #krate::TrackedStorageKey::new(
|
||||
#krate::well_known_keys::EXTRINSIC_INDEX.into()
|
||||
);
|
||||
whitelist.push(extrinsic_index);
|
||||
#krate::benchmarking::set_whitelist(whitelist.clone());
|
||||
let mut results: #krate::Vec<#krate::BenchmarkResult> = #krate::Vec::new();
|
||||
|
||||
// Always do at least one internal repeat...
|
||||
@@ -590,6 +595,12 @@ pub fn benchmarks(
|
||||
// This will enable worst case scenario for reading from the database.
|
||||
#krate::benchmarking::commit_db();
|
||||
|
||||
// Access all whitelisted keys to get them into the proof recorder since the
|
||||
// recorder does now have a whitelist.
|
||||
for key in &whitelist {
|
||||
#krate::frame_support::storage::unhashed::get_raw(&key.key);
|
||||
}
|
||||
|
||||
// Reset the read/write counter so we don't count operations in the setup process.
|
||||
#krate::benchmarking::reset_read_write_count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user