mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 22:05:42 +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:
@@ -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_state_trie_migration.
|
||||
@@ -59,40 +59,40 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: StateTrieMigration SignedMigrationMaxLimits (r:1 w:0)
|
||||
// Storage: StateTrieMigration MigrationProcess (r:1 w:1)
|
||||
fn continue_migrate() -> Weight {
|
||||
(19_019_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(19_019_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: StateTrieMigration SignedMigrationMaxLimits (r:1 w:0)
|
||||
fn continue_migrate_wrong_witness() -> Weight {
|
||||
(1_874_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
Weight::from_ref_time(1_874_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
}
|
||||
fn migrate_custom_top_success() -> Weight {
|
||||
(16_381_000 as Weight)
|
||||
Weight::from_ref_time(16_381_000 as RefTimeWeight)
|
||||
}
|
||||
// Storage: unknown [0x666f6f] (r:1 w:1)
|
||||
fn migrate_custom_top_fail() -> Weight {
|
||||
(25_966_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(25_966_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
fn migrate_custom_child_success() -> Weight {
|
||||
(16_712_000 as Weight)
|
||||
Weight::from_ref_time(16_712_000 as RefTimeWeight)
|
||||
}
|
||||
// Storage: unknown [0x666f6f] (r:1 w:1)
|
||||
fn migrate_custom_child_fail() -> Weight {
|
||||
(29_885_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(29_885_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: unknown [0x6b6579] (r:1 w:1)
|
||||
fn process_top_key(v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,39 +101,39 @@ impl WeightInfo for () {
|
||||
// Storage: StateTrieMigration SignedMigrationMaxLimits (r:1 w:0)
|
||||
// Storage: StateTrieMigration MigrationProcess (r:1 w:1)
|
||||
fn continue_migrate() -> Weight {
|
||||
(19_019_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(19_019_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: StateTrieMigration SignedMigrationMaxLimits (r:1 w:0)
|
||||
fn continue_migrate_wrong_witness() -> Weight {
|
||||
(1_874_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
Weight::from_ref_time(1_874_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
}
|
||||
fn migrate_custom_top_success() -> Weight {
|
||||
(16_381_000 as Weight)
|
||||
Weight::from_ref_time(16_381_000 as RefTimeWeight)
|
||||
}
|
||||
// Storage: unknown [0x666f6f] (r:1 w:1)
|
||||
fn migrate_custom_top_fail() -> Weight {
|
||||
(25_966_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(25_966_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
fn migrate_custom_child_success() -> Weight {
|
||||
(16_712_000 as Weight)
|
||||
Weight::from_ref_time(16_712_000 as RefTimeWeight)
|
||||
}
|
||||
// Storage: unknown [0x666f6f] (r:1 w:1)
|
||||
fn migrate_custom_child_fail() -> Weight {
|
||||
(29_885_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(29_885_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: unknown [0x6b6579] (r:1 w:1)
|
||||
fn process_top_key(v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user