Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion of paritytech/substrate#12157 #5964

Merged
merged 3 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions runtime/kusama/src/weights/frame_benchmarking_baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,52 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `frame_benchmarking::baseline`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for WeightInfo<T> {
/// The range of component `i` is `[0, 1000000]`.
fn addition(_i: u32, ) -> Weight {
Weight::from_ref_time(123_000 as RefTimeWeight)
Weight::from_ref_time(123_000 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn subtraction(_i: u32, ) -> Weight {
Weight::from_ref_time(110_000 as RefTimeWeight)
Weight::from_ref_time(110_000 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn multiplication(_i: u32, ) -> Weight {
Weight::from_ref_time(124_000 as RefTimeWeight)
Weight::from_ref_time(124_000 as u64)
}
/// The range of component `i` is `[0, 1000000]`.
fn division(_i: u32, ) -> Weight {
Weight::from_ref_time(120_000 as RefTimeWeight)
Weight::from_ref_time(120_000 as u64)
}
/// The range of component `i` is `[0, 100]`.
fn hashing(_i: u32, ) -> Weight {
Weight::from_ref_time(19_606_352_000 as RefTimeWeight)
Weight::from_ref_time(19_606_352_000 as u64)
}
/// The range of component `i` is `[1, 100]`.
fn sr25519_verification(i: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 38_000
.saturating_add(Weight::from_ref_time(47_929_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight))
.saturating_add(Weight::from_ref_time(47_929_000 as u64).saturating_mul(i as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[0, 1000]`.
fn storage_read(i: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 4_000
.saturating_add(Weight::from_ref_time(2_101_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(2_101_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[0, 1000]`.
fn storage_write(i: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(330_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(330_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
}
14 changes: 7 additions & 7 deletions runtime/kusama/src/weights/frame_election_provider_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `frame_election_provider_support`.
Expand All @@ -48,20 +48,20 @@ impl<T: frame_system::Config> frame_election_provider_support::WeightInfo for We
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmen(v: u32, _t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 87_000
.saturating_add(Weight::from_ref_time(22_196_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(Weight::from_ref_time(22_196_000 as u64).saturating_mul(v as u64))
// Standard Error: 7_520_000
.saturating_add(Weight::from_ref_time(3_555_366_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight))
.saturating_add(Weight::from_ref_time(3_555_366_000 as u64).saturating_mul(d as u64))
}
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn phragmms(v: u32, _t: u32, d: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 74_000
.saturating_add(Weight::from_ref_time(15_098_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(Weight::from_ref_time(15_098_000 as u64).saturating_mul(v as u64))
// Standard Error: 6_402_000
.saturating_add(Weight::from_ref_time(2_580_118_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_580_118_000 as u64).saturating_mul(d as u64))
}
}
34 changes: 17 additions & 17 deletions runtime/kusama/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,53 +38,53 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `frame_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(b: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
Weight::from_ref_time(4_767_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(4_767_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(550_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(550_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(441_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(441_000 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(955_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(955_000 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
}
20 changes: 10 additions & 10 deletions runtime/kusama/src/weights/pallet_bags_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_bags_list`.
Expand All @@ -49,27 +49,27 @@ impl<T: frame_system::Config> pallet_bags_list::WeightInfo for WeightInfo<T> {
// Storage: VoterList ListNodes (r:4 w:4)
// Storage: VoterList ListBags (r:1 w:1)
fn rebag_non_terminal() -> Weight {
Weight::from_ref_time(50_938_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(50_938_000 as u64)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: Staking Bonded (r:1 w:0)
// Storage: Staking Ledger (r:1 w:0)
// Storage: VoterList ListNodes (r:3 w:3)
// Storage: VoterList ListBags (r:2 w:2)
fn rebag_terminal() -> Weight {
Weight::from_ref_time(49_843_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(49_843_000 as u64)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: VoterList ListNodes (r:4 w:4)
// Storage: Staking Bonded (r:2 w:0)
// Storage: Staking Ledger (r:2 w:0)
// Storage: VoterList CounterForListNodes (r:1 w:1)
// Storage: VoterList ListBags (r:1 w:1)
fn put_in_front_of() -> Weight {
Weight::from_ref_time(51_965_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(10 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
Weight::from_ref_time(51_965_000 as u64)
.saturating_add(T::DbWeight::get().reads(10 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
}
44 changes: 22 additions & 22 deletions runtime/kusama/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,52 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
Weight::from_ref_time(38_958_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(38_958_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
Weight::from_ref_time(30_030_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(30_030_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
Weight::from_ref_time(19_591_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(19_591_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
Weight::from_ref_time(22_871_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(22_871_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
Weight::from_ref_time(39_215_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(39_215_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
Weight::from_ref_time(34_799_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(34_799_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
Weight::from_ref_time(17_925_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(17_925_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
Loading