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

update weights #5097

Merged
merged 15 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
46 changes: 36 additions & 10 deletions runtime/kusama/src/weights/runtime_common_auctions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -15,12 +15,12 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `runtime_common::auctions`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// target/release/polkadot
// target/production/polkadot
// benchmark
// --chain=kusama-dev
// --steps=50
Expand All @@ -31,8 +31,9 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/kusama/src/weights/runtime_common_auctions.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -42,23 +43,48 @@ use sp_std::marker::PhantomData;
/// Weight functions for `runtime_common::auctions`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_common::auctions::WeightInfo for WeightInfo<T> {
// Storage: Auctions AuctionInfo (r:1 w:1)
// Storage: Auctions AuctionCounter (r:1 w:1)
fn new_auction() -> Weight {
(24_436_000 as Weight)
(11_899_000 as Weight)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explanation here and in other places: paritytech/substrate#10692 should have reduced all weights across all runtimes.
Substrate weights were updated in that MR but Polkadot et.al. not.

.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Paras ParaLifecycles (r:1 w:0)
// Storage: Auctions AuctionCounter (r:1 w:0)
// Storage: Auctions AuctionInfo (r:1 w:0)
// Storage: Slots Leases (r:1 w:0)
// Storage: Auctions Winning (r:1 w:1)
// Storage: Auctions ReservedAmounts (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn bid() -> Weight {
(137_499_000 as Weight)
(71_214_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Auctions AuctionInfo (r:1 w:1)
// Storage: Babe NextRandomness (r:1 w:0)
// Storage: Babe EpochStart (r:1 w:0)
// Storage: Auctions AuctionCounter (r:1 w:0)
// Storage: Auctions Winning (r:3600 w:3600)
// Storage: Auctions ReservedAmounts (r:37 w:36)
// Storage: System Account (r:36 w:36)
// Storage: Slots Leases (r:7 w:7)
// Storage: Paras ParaLifecycles (r:1 w:1)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Registrar Paras (r:1 w:1)
fn on_initialize() -> Weight {
(23_555_687_000 as Weight)
(14_248_763_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3688 as Weight))
.saturating_add(T::DbWeight::get().writes(3683 as Weight))
}
// Storage: Auctions ReservedAmounts (r:37 w:36)
// Storage: System Account (r:36 w:36)
// Storage: Auctions Winning (r:0 w:3600)
// Storage: Auctions AuctionInfo (r:0 w:1)
fn cancel_auction() -> Weight {
(5_007_594_000 as Weight)
(2_942_973_000 as Weight)
.saturating_add(T::DbWeight::get().reads(73 as Weight))
.saturating_add(T::DbWeight::get().writes(3673 as Weight))
}
Expand Down
19 changes: 9 additions & 10 deletions runtime/kusama/src/weights/runtime_common_claims.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -16,11 +16,11 @@
//! Autogenerated weights for `runtime_common::claims`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-06, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// target/release/polkadot
// target/production/polkadot
// benchmark
// --chain=kusama-dev
// --steps=50
Expand All @@ -33,7 +33,6 @@
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/runtime_common_claims.rs


#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
Expand All @@ -52,7 +51,7 @@ impl<T: frame_system::Config> runtime_common::claims::WeightInfo for WeightInfo<
// Storage: System Account (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
fn claim() -> Weight {
(442_992_000 as Weight)
(134_189_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
Expand All @@ -61,7 +60,7 @@ impl<T: frame_system::Config> runtime_common::claims::WeightInfo for WeightInfo<
// Storage: Claims Claims (r:0 w:1)
// Storage: Claims Signing (r:0 w:1)
fn mint_claim() -> Weight {
(12_098_000 as Weight)
(6_247_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
Expand All @@ -73,7 +72,7 @@ impl<T: frame_system::Config> runtime_common::claims::WeightInfo for WeightInfo<
// Storage: System Account (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
fn claim_attest() -> Weight {
(442_328_000 as Weight)
(137_515_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
Expand All @@ -86,7 +85,7 @@ impl<T: frame_system::Config> runtime_common::claims::WeightInfo for WeightInfo<
// Storage: System Account (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
fn attest() -> Weight {
(126_506_000 as Weight)
(55_232_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
Expand All @@ -95,7 +94,7 @@ impl<T: frame_system::Config> runtime_common::claims::WeightInfo for WeightInfo<
// Storage: Claims Signing (r:1 w:2)
// Storage: Claims Preclaims (r:1 w:1)
fn move_claim() -> Weight {
(26_618_000 as Weight)
(14_922_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
Expand Down
69 changes: 53 additions & 16 deletions runtime/kusama/src/weights/runtime_common_paras_registrar.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -15,12 +15,12 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `runtime_common::paras_registrar`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// target/release/polkadot
// target/production/polkadot
// benchmark
// --chain=kusama-dev
// --steps=50
Expand All @@ -31,8 +31,9 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -42,28 +43,64 @@ use sp_std::marker::PhantomData;
/// Weight functions for `runtime_common::paras_registrar`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_common::paras_registrar::WeightInfo for WeightInfo<T> {
// Storage: Registrar NextFreeParaId (r:1 w:1)
// Storage: Registrar Paras (r:1 w:1)
// Storage: Paras ParaLifecycles (r:1 w:0)
fn reserve() -> Weight {
(48_931_000 as Weight)
(23_240_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Registrar Paras (r:1 w:1)
// Storage: Paras ParaLifecycles (r:1 w:1)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: Paras PvfActiveVoteMap (r:1 w:0)
// Storage: Paras CodeByHash (r:1 w:1)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Paras CodeByHashRefs (r:1 w:1)
// Storage: Paras CurrentCodeHash (r:0 w:1)
// Storage: Paras UpcomingParasGenesis (r:0 w:1)
fn register() -> Weight {
(4_193_117_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
(8_646_169_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of Read/Writes should only change when there was a logic change that did not update the weights.
Happened in Substrate quite often but I don't know about Polkadot.

.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
// Storage: Registrar Paras (r:1 w:1)
// Storage: Paras ParaLifecycles (r:1 w:1)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: Paras PvfActiveVoteMap (r:1 w:0)
// Storage: Paras CodeByHash (r:1 w:1)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Paras CodeByHashRefs (r:1 w:1)
// Storage: Paras CurrentCodeHash (r:0 w:1)
// Storage: Paras UpcomingParasGenesis (r:0 w:1)
fn force_register() -> Weight {
(4_174_902_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
(8_516_357_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
// Storage: Registrar Paras (r:1 w:1)
// Storage: Paras ParaLifecycles (r:1 w:1)
// Storage: Paras FutureCodeHash (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Registrar PendingSwap (r:0 w:1)
fn deregister() -> Weight {
(81_324_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
(45_338_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Registrar Paras (r:1 w:0)
// Storage: Paras ParaLifecycles (r:2 w:2)
// Storage: Registrar PendingSwap (r:1 w:1)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Crowdloan Funds (r:2 w:2)
// Storage: Slots Leases (r:2 w:2)
fn swap() -> Weight {
(69_717_000 as Weight)
(38_695_000 as Weight)
.saturating_add(T::DbWeight::get().reads(10 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
Expand Down
44 changes: 30 additions & 14 deletions runtime/kusama/src/weights/runtime_common_slots.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
Expand All @@ -15,12 +15,12 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `runtime_common::slots`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// target/release/polkadot
// target/production/polkadot
// benchmark
// --chain=kusama-dev
// --steps=50
Expand All @@ -31,8 +31,9 @@
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/
// --output=./runtime/kusama/src/weights/runtime_common_slots.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -42,31 +43,46 @@ use sp_std::marker::PhantomData;
/// Weight functions for `runtime_common::slots`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_common::slots::WeightInfo for WeightInfo<T> {
// Storage: Slots Leases (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn force_lease() -> Weight {
(92_502_000 as Weight)
(22_096_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn manage_lease_period_start(c: u32, t: u32) -> Weight {
// Storage: Paras Parachains (r:1 w:0)
// Storage: Slots Leases (r:101 w:100)
// Storage: Paras ParaLifecycles (r:101 w:101)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Registrar Paras (r:100 w:100)
fn manage_lease_period_start(c: u32, t: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 17_000
.saturating_add((16_401_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 17_000
.saturating_add((34_480_000 as Weight).saturating_mul(t as Weight))
// Standard Error: 15_000
.saturating_add((6_877_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 15_000
.saturating_add((17_189_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(t as Weight)))
}
// Storage: Slots Leases (r:1 w:1)
// Storage: System Account (r:8 w:8)
fn clear_all_leases() -> Weight {
(194_756_000 as Weight)
(91_490_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(9 as Weight))
}
// Storage: Slots Leases (r:1 w:0)
// Storage: Paras ParaLifecycles (r:1 w:1)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
// Storage: Registrar Paras (r:1 w:1)
fn trigger_onboard() -> Weight {
(41_785_000 as Weight)
(23_414_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
Expand Down
Loading