mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 02:21:04 +00:00
Weight v1.5: Opaque Struct (#12138)
* initial idea * update frame_support * update a bunch more * add ord * adjust RuntimeDbWeight * frame_system builds * re-export * frame_support tests pass * frame_executive compile * frame_executive builds * frame_system tests passing * pallet-utility tests pass * fix a bunch of pallets * more * phragmen * state-trie-migration * scheduler and referenda * pallet-election-provider-multi-phase * aura * staking * more * babe * balances * bunch more * sudo * transaction-payment * asset-tx-payment * last pallets * fix alliance merge * fix node template runtime * fix pallet-contracts cc @athei * fix node runtime * fix compile on runtime-benchmarks feature * comment * fix frame-support-test * fix more tests * weight regex * frame system works * fix a bunch * more * more * more * more * more * more fixes * update templates * fix contracts benchmarks * Update lib.rs * Update lib.rs * fix ui * make scalar saturating mul const * more const functions * scalar div * refactor using constant functions * move impl * fix overhead template * use compactas * Update lib.rs
This commit is contained in:
@@ -21,7 +21,6 @@ use codec::{Decode, Encode};
|
||||
use core::marker::PhantomData;
|
||||
use frame_election_provider_support::ScoreProvider;
|
||||
use frame_support::traits::OnRuntimeUpgrade;
|
||||
use sp_runtime::traits::Zero;
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use frame_support::ensure;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight, constants::RocksDbWeight}};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for pallet_bags_list.
|
||||
@@ -57,18 +57,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn rebag_non_terminal() -> Weight {
|
||||
(55_040_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
Weight::from_ref_time(55_040_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: BagsList ListNodes (r:3 w:3)
|
||||
// Storage: BagsList ListBags (r:2 w:2)
|
||||
fn rebag_terminal() -> Weight {
|
||||
(53_671_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
Weight::from_ref_time(53_671_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
|
||||
}
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
@@ -76,9 +76,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn put_in_front_of() -> Weight {
|
||||
(56_410_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
Weight::from_ref_time(56_410_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(10 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,18 +89,18 @@ impl WeightInfo for () {
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn rebag_non_terminal() -> Weight {
|
||||
(55_040_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
Weight::from_ref_time(55_040_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Staking Bonded (r:1 w:0)
|
||||
// Storage: Staking Ledger (r:1 w:0)
|
||||
// Storage: BagsList ListNodes (r:3 w:3)
|
||||
// Storage: BagsList ListBags (r:2 w:2)
|
||||
fn rebag_terminal() -> Weight {
|
||||
(53_671_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
|
||||
Weight::from_ref_time(53_671_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight))
|
||||
}
|
||||
// Storage: BagsList ListNodes (r:4 w:4)
|
||||
// Storage: Staking Bonded (r:2 w:0)
|
||||
@@ -108,8 +108,8 @@ impl WeightInfo for () {
|
||||
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||
// Storage: BagsList ListBags (r:1 w:1)
|
||||
fn put_in_front_of() -> Weight {
|
||||
(56_410_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
|
||||
Weight::from_ref_time(56_410_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(10 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user