mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
Storage Layer for All FRAME Extrinsics (#11431)
* add new trait * implement DispatchableWithStorageLayer * at least one transactional * all dispatch is at least transactional * storage_layer api * add test * storage layer tests * deprecate transactional tag * i guess no reason to deprecate * remove transactional from batch_all * update tests * extend trait * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix copy paste name * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Create run_all_benchmarks.sh * uncomment build * update number of steps and repeats * add skip build * Update run_all_benchmarks.sh * Update run_all_benchmarks.sh * new benchmarks * Update frame/support/src/traits/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/src/traits/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/test/tests/storage_layers.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/test/tests/storage_layers.rs * weights * Update dispatch.rs * doc link * decl_macro support Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_membership
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -61,9 +61,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(15_572_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((48_000 as Weight).saturating_mul(m as Weight))
|
||||
(15_318_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((51_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -73,9 +73,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(18_090_000 as Weight)
|
||||
(18_005_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((43_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((45_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -85,9 +85,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(18_199_000 as Weight)
|
||||
(18_029_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((54_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((55_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -97,7 +97,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(18_238_000 as Weight)
|
||||
(18_105_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((158_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
@@ -109,9 +109,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(18_911_000 as Weight)
|
||||
(18_852_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((53_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((55_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
@@ -119,16 +119,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(4_843_000 as Weight)
|
||||
(4_869_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((27_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((28_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(1_662_000 as Weight)
|
||||
(1_593_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
@@ -142,9 +142,9 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn add_member(m: u32, ) -> Weight {
|
||||
(15_572_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((48_000 as Weight).saturating_mul(m as Weight))
|
||||
(15_318_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((51_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -154,9 +154,9 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn remove_member(m: u32, ) -> Weight {
|
||||
(18_090_000 as Weight)
|
||||
(18_005_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((43_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((45_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -166,9 +166,9 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn swap_member(m: u32, ) -> Weight {
|
||||
(18_199_000 as Weight)
|
||||
(18_029_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((54_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((55_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -178,7 +178,7 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn reset_member(m: u32, ) -> Weight {
|
||||
(18_238_000 as Weight)
|
||||
(18_105_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((158_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
@@ -190,9 +190,9 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalCommittee Members (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn change_key(m: u32, ) -> Weight {
|
||||
(18_911_000 as Weight)
|
||||
(18_852_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((53_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((55_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
@@ -200,16 +200,16 @@ impl WeightInfo for () {
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn set_prime(m: u32, ) -> Weight {
|
||||
(4_843_000 as Weight)
|
||||
(4_869_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((27_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add((28_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: TechnicalMembership Prime (r:0 w:1)
|
||||
// Storage: TechnicalCommittee Prime (r:0 w:1)
|
||||
fn clear_prime(m: u32, ) -> Weight {
|
||||
(1_662_000 as Weight)
|
||||
(1_593_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
|
||||
Reference in New Issue
Block a user