mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
HRMP benchmarks (#3876)
* wip template for hrmp benchmarks * add all of the benchmarks, first draft * File was not saved :/ * cargo +nightly fmt * Use configs * add configs * Fix rococo * Final touches * revert fmt changes, one last time * Fix wrappings * Fix a bunch of tests * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs * add to westend * actually use everything * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs * Update runtime/parachains/src/hrmp.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * use real weight in wnd * reorg * minor cleanup * weigh some of the internal stuff as well * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs * add files * Master.into() * add validation * fmt * fmt * final fixes * all runtimes build * undo formatting * Update runtime/parachains/src/hrmp.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * non-controversial changes * do it the parachain-way: use const instead of type configs for simplicity. * borrow assert_storage_consistency_exhaustive * move assert_storage_consistency_exhaustive to Pallet, so it can be reused for benchmarks as well. * fix typo Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Sergey Shulepov <s.pepyakin@gmail.com> Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
This commit is contained in:
@@ -236,6 +236,7 @@ impl crate::hrmp::Config for Test {
|
||||
type Event = Event;
|
||||
type Origin = Origin;
|
||||
type Currency = pallet_balances::Pallet<Test>;
|
||||
type WeightInfo = crate::hrmp::TestWeightInfo;
|
||||
}
|
||||
|
||||
impl crate::disputes::Config for Test {
|
||||
@@ -363,6 +364,7 @@ impl UmpSink for TestUmpSink {
|
||||
let id = sp_io::hashing::blake2_256(actual_msg);
|
||||
return Err((id, weight))
|
||||
}
|
||||
|
||||
PROCESSED.with(|opt_hook| {
|
||||
opt_hook.borrow_mut().push((actual_origin, actual_msg.to_owned()));
|
||||
});
|
||||
@@ -395,6 +397,9 @@ impl inclusion::RewardValidators for TestRewardValidators {
|
||||
pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities {
|
||||
use sp_keystore::{testing::KeyStore, KeystoreExt, SyncCryptoStorePtr};
|
||||
use sp_std::sync::Arc;
|
||||
|
||||
sp_tracing::try_init_simple();
|
||||
|
||||
BACKING_REWARDS.with(|r| r.borrow_mut().clear());
|
||||
AVAILABILITY_REWARDS.with(|r| r.borrow_mut().clear());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user