mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +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_transaction_storage.
|
||||
@@ -59,11 +59,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn store(l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
@@ -72,9 +72,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn renew() -> Weight {
|
||||
(50_978_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(50_978_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: TransactionStorage ProofChecked (r:1 w:1)
|
||||
// Storage: TransactionStorage StoragePeriod (r:1 w:0)
|
||||
@@ -82,9 +82,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: System ParentHash (r:1 w:0)
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
fn check_proof_max() -> Weight {
|
||||
(106_990_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(106_990_000 as RefTimeWeight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ impl WeightInfo for () {
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn store(l: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(l as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
// Storage: TransactionStorage ByteFee (r:1 w:0)
|
||||
@@ -110,9 +110,9 @@ impl WeightInfo for () {
|
||||
// Storage: TransactionStorage BlockTransactions (r:1 w:1)
|
||||
// Storage: TransactionStorage MaxBlockTransactions (r:1 w:0)
|
||||
fn renew() -> Weight {
|
||||
(50_978_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(50_978_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: TransactionStorage ProofChecked (r:1 w:1)
|
||||
// Storage: TransactionStorage StoragePeriod (r:1 w:0)
|
||||
@@ -120,8 +120,8 @@ impl WeightInfo for () {
|
||||
// Storage: System ParentHash (r:1 w:0)
|
||||
// Storage: TransactionStorage Transactions (r:1 w:0)
|
||||
fn check_proof_max() -> Weight {
|
||||
(106_990_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
Weight::from_ref_time(106_990_000 as RefTimeWeight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user