Skip to content

Commit

Permalink
Update litentry weights (#632)
Browse files Browse the repository at this point in the history
* [benchmarking bot] Auto commit generated weights files (#628)

Co-authored-by: Kailai-Wang <[email protected]>

* update weights usage

* bump spec_version for litentry runtime

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kailai-Wang <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2022
1 parent 254ac12 commit 4a20e2d
Show file tree
Hide file tree
Showing 19 changed files with 423 additions and 311 deletions.
10 changes: 5 additions & 5 deletions runtime/litentry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
authoring_version: 1,
// same versioning-mechanism as polkadot:
// last digit is used for minor updates, like 9110 -> 9111 in polkadot
spec_version: 9070,
spec_version: 9071,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -435,7 +435,7 @@ impl pallet_utility::Config for Runtime {
type Event = Event;
type Call = Call;
type PalletsOrigin = OriginCaller;
type WeightInfo = ();
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -612,7 +612,7 @@ impl pallet_treasury::Config for Runtime {
type Burn = Burn;
type BurnDestination = ();
type SpendFunds = ();
type WeightInfo = ();
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
type MaxApprovals = MaxApprovals;
}

Expand Down Expand Up @@ -650,7 +650,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
type ControllerOrigin = EnsureRoot<AccountId>;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type WeightInfo = ();
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
}

impl cumulus_pallet_dmp_queue::Config for Runtime {
Expand Down Expand Up @@ -1041,7 +1041,7 @@ impl_runtime_apis! {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};

use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
Expand Down
61 changes: 61 additions & 0 deletions runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2020-2022 Litentry Technologies GmbH.
// This file is part of Litentry.
//
// Litentry is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Litentry is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Litentry. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-08, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
// ./litentry-collator
// benchmark
// pallet
// --chain=litentry-dev
// --execution=wasm
// --db-cache=20
// --wasm-execution=compiled
// --pallet=cumulus_pallet_xcmp_queue
// --extrinsic=*
// --heap-pages=4096
// --steps=20
// --repeat=50
// --header=./LICENSE_HEADER
// --output=./runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs

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

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

/// Weight functions for `cumulus_pallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(3_831_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(3_767_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
15 changes: 8 additions & 7 deletions runtime/litentry/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
//! Autogenerated weights for `frame_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-02, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-06-08, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
// ./litentry-collator
// benchmark
// pallet
// --chain=litentry-dev
// --execution=wasm
// --db-cache=20
Expand Down Expand Up @@ -58,29 +59,29 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(5_255_000 as Weight)
(3_324_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 0
.saturating_add((817_000 as Weight).saturating_mul(i as Weight))
.saturating_add((626_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn kill_storage(i: u32, ) -> Weight {
(0 as Weight)
(2_216_000 as Weight)
// Standard Error: 1_000
.saturating_add((564_000 as Weight).saturating_mul(i as Weight))
.saturating_add((454_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
// Storage: Skipped Metadata (r:0 w:0)
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 2_000
.saturating_add((1_186_000 as Weight).saturating_mul(p as Weight))
// Standard Error: 1_000
.saturating_add((1_063_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
}
5 changes: 3 additions & 2 deletions runtime/litentry/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#![allow(clippy::unnecessary_cast)]

pub mod cumulus_pallet_xcmp_queue;
pub mod frame_system;
pub mod pallet_balances;
pub mod pallet_collator_selection;
Expand All @@ -30,5 +31,5 @@ pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_timestamp;
// pub mod pallet_treasury;
// pub mod pallet_utility;
pub mod pallet_treasury;
pub mod pallet_utility;
17 changes: 9 additions & 8 deletions runtime/litentry/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-03-02, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-06-08, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
// ./litentry-collator
// benchmark
// pallet
// --chain=litentry-dev
// --execution=wasm
// --db-cache=20
Expand All @@ -47,43 +48,43 @@ 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 {
(66_868_000 as Weight)
(50_720_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(49_980_000 as Weight)
(37_357_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(29_805_000 as Weight)
(22_565_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(35_154_000 as Weight)
(27_141_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(65_891_000 as Weight)
(48_615_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(60_083_000 as Weight)
(44_163_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(26_143_000 as Weight)
(19_784_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Expand Down
59 changes: 39 additions & 20 deletions runtime/litentry/src/weights/pallet_collator_selection.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
// Copyright 2020-2022 Litentry Technologies GmbH.
// This file is part of Litentry.
//
// Litentry is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Litentry is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Litentry. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_collator_selection`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-12-09, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 20
//! DATE: 2022-06-08, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
// ./litentry-collator
// benchmark
// --chain=dev
// pallet
// --chain=litentry-dev
// --execution=wasm
// --db-cache=20
// --wasm-execution=compiled
Expand All @@ -17,7 +33,8 @@
// --heap-pages=4096
// --steps=20
// --repeat=50
// --output=./runtime/src/weights/pallet_collator_selection.rs
// --header=./LICENSE_HEADER
// --output=./runtime/litentry/src/weights/pallet_collator_selection.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -29,21 +46,23 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
// Storage: Session NextKeys (r:1 w:0)
// Storage: CollatorSelection Invulnerables (r:0 w:1)
fn set_invulnerables(b: u32, ) -> Weight {
(17_993_000 as Weight)
// Standard Error: 0
.saturating_add((44_000 as Weight).saturating_mul(b as Weight))
(10_261_000 as Weight)
// Standard Error: 7_000
.saturating_add((4_552_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
fn set_desired_candidates() -> Weight {
(19_656_000 as Weight)
(13_645_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: CollatorSelection CandidacyBond (r:0 w:1)
fn set_candidacy_bond() -> Weight {
(16_394_000 as Weight)
(11_437_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
Expand All @@ -53,26 +72,26 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection CandidacyBond (r:1 w:0)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn register_as_candidate(c: u32, ) -> Weight {
(77_219_000 as Weight)
// Standard Error: 6_000
.saturating_add((423_000 as Weight).saturating_mul(c as Weight))
(54_805_000 as Weight)
// Standard Error: 4_000
.saturating_add((385_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn leave_intent(c: u32, ) -> Weight {
(55_689_000 as Weight)
// Standard Error: 6_000
.saturating_add((498_000 as Weight).saturating_mul(c as Weight))
(40_074_000 as Weight)
// Standard Error: 5_000
.saturating_add((246_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:2 w:2)
// Storage: System BlockWeight (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn note_author() -> Weight {
(73_539_000 as Weight)
(44_906_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
Expand All @@ -83,10 +102,10 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: System BlockWeight (r:1 w:1)
fn new_session(r: u32, c: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 1_353_000
.saturating_add((11_095_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 1_353_000
.saturating_add((44_435_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 744_000
.saturating_add((6_278_000 as Weight).saturating_mul(r as Weight))
// Standard Error: 744_000
.saturating_add((25_101_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
Expand Down
Loading

0 comments on commit 4a20e2d

Please sign in to comment.