From bdedd282afe2d121dc25e56044bba8737cde4893 Mon Sep 17 00:00:00 2001 From: Igor Kozyrev Date: Thu, 20 Apr 2023 19:26:21 +0000 Subject: [PATCH] bench collator selection --- --- a/pallets/collator-selection/src/weights.rs +++ b/pallets/collator-selection/src/weights.rs @@ -1,190 +1,403 @@ -// Copyright 2019-2022 Unique Network (Gibraltar) Ltd. -// This file is part of Unique Network. - -// Unique Network 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. - -// Unique Network 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 Unique Network. If not, see . - -// Original license: -// This file is part of Substrate. +// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs -// Copyright (C) 2021 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 +//! Autogenerated weights for pallet_collator_selection +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-20, STEPS: `50`, REPEAT: `80`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `bench-host`, CPU: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Executed Command: +// target/release/unique-collator +// benchmark +// pallet +// --pallet +// pallet-collator-selection +// --wasm-execution +// compiled +// --extrinsic +// * +// --template=.maintain/frame-weight-template.hbs +// --steps=50 +// --repeat=80 +// --heap-pages=4096 +// --output=./pallets/collator-selection/src/weights.rs +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, -}; +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; -// The weight info trait for `pallet_collator_selection`. +/// Weight functions needed for pallet_collator_selection. pub trait WeightInfo { - fn add_invulnerable(_b: u32) -> Weight; - fn remove_invulnerable(_b: u32) -> Weight; - fn get_license(_c: u32) -> Weight; - fn onboard(_c: u32) -> Weight; - fn offboard(_c: u32) -> Weight; - fn release_license(_c: u32) -> Weight; - fn force_release_license(_c: u32) -> Weight; + fn add_invulnerable(b: u32, ) -> Weight; + fn remove_invulnerable(b: u32, ) -> Weight; + fn get_license(c: u32, ) -> Weight; + fn onboard(c: u32, ) -> Weight; + fn offboard(c: u32, ) -> Weight; + fn release_license(c: u32, ) -> Weight; + fn force_release_license(c: u32, ) -> Weight; fn note_author() -> Weight; - fn new_session(_c: u32, _r: u32) -> Weight; + fn new_session(r: u32, c: u32, ) -> Weight; } /// Weights for pallet_collator_selection using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - fn add_invulnerable(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + /// Storage: Session NextKeys (r:1 w:0) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: CollatorSelection Invulnerables (r:1 w:1) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection Candidates (r:1 w:0) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 7]`. + fn add_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `403 + b * (45 ±0)` + // Estimated: `7485 + b * (45 ±0)` + // Minimum execution time: 14_147_000 picoseconds. + Weight::from_parts(15_313_627, 7485) + // Standard Error: 1_744 + .saturating_add(Weight::from_parts(178_890, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(b.into())) } - fn remove_invulnerable(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + /// Storage: CollatorSelection Invulnerables (r:1 w:1) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 7]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `96 + b * (32 ±0)` + // Estimated: `1806` + // Minimum execution time: 9_426_000 picoseconds. + Weight::from_parts(9_693_408, 1806) + // Standard Error: 1_638 + .saturating_add(Weight::from_parts(227_917, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn get_license(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:0) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Configuration CollatorSelectionLicenseBondOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionLicenseBondOverride (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 9]`. + fn get_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `610 + c * (26 ±0)` + // Estimated: `9099 + c * (28 ±0)` + // Minimum execution time: 22_741_000 picoseconds. + Weight::from_parts(24_210_604, 9099) + // Standard Error: 2_703 + .saturating_add(Weight::from_parts(255_686, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 28).saturating_mul(c.into())) } - fn onboard(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:0) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection Invulnerables (r:1 w:0) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionDesiredCollatorsOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionKickThresholdOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionKickThresholdOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 7]`. + fn onboard(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `445 + c * (54 ±0)` + // Estimated: `10119` + // Minimum execution time: 20_397_000 picoseconds. + Weight::from_parts(21_415_013, 10119) + // Standard Error: 4_086 + .saturating_add(Weight::from_parts(252_810, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - fn offboard(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn offboard(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `111 + c * (32 ±0)` + // Estimated: `1806` + // Minimum execution time: 10_543_000 picoseconds. + Weight::from_parts(11_227_541, 1806) + // Standard Error: 1_699 + .saturating_add(Weight::from_parts(181_030, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - fn release_license(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn release_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (61 ±0)` + // Estimated: `5335` + // Minimum execution time: 22_214_000 picoseconds. + Weight::from_parts(24_373_981, 5335) + // Standard Error: 8_018 + .saturating_add(Weight::from_parts(405_404, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } - fn force_release_license(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn force_release_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (61 ±0)` + // Estimated: `5335` + // Minimum execution time: 22_159_000 picoseconds. + Weight::from_parts(24_200_796, 5335) + // Standard Error: 8_328 + .saturating_add(Weight::from_parts(312_138, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) fn note_author() -> Weight { - Weight::from_ref_time(71_461_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `7729` + // Minimum execution time: 16_520_000 picoseconds. + Weight::from_parts(16_933_000, 7729) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - fn new_session(r: u32, c: u32) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(109_961_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(151_952_000 as u64).saturating_mul(c as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + /// Storage: CollatorSelection Candidates (r:1 w:0) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionKickThresholdOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionKickThresholdOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:10 w:0) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: CollatorSelection Invulnerables (r:1 w:0) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:9 w:9) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: System Account (r:10 w:10) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 10]`. + /// The range of component `c` is `[1, 10]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `562 + r * (190 ±0) + c * (83 ±0)` + // Estimated: `91818518943723 + c * (2519 ±0) + r * (5142 ±1)` + // Minimum execution time: 16_153_000 picoseconds. + Weight::from_parts(16_601_000, 91818518943723) + // Standard Error: 119_095 + .saturating_add(Weight::from_parts(10_660_813, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 5142).saturating_mul(r.into())) } } // For backwards compatibility and tests impl WeightInfo for () { - fn add_invulnerable(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + /// Storage: Session NextKeys (r:1 w:0) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: CollatorSelection Invulnerables (r:1 w:1) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection Candidates (r:1 w:0) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 7]`. + fn add_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `403 + b * (45 ±0)` + // Estimated: `7485 + b * (45 ±0)` + // Minimum execution time: 14_147_000 picoseconds. + Weight::from_parts(15_313_627, 7485) + // Standard Error: 1_744 + .saturating_add(Weight::from_parts(178_890, 0).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(b.into())) } - fn remove_invulnerable(b: u32) -> Weight { - Weight::from_ref_time(18_563_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(b as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + /// Storage: CollatorSelection Invulnerables (r:1 w:1) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 7]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `96 + b * (32 ±0)` + // Estimated: `1806` + // Minimum execution time: 9_426_000 picoseconds. + Weight::from_parts(9_693_408, 1806) + // Standard Error: 1_638 + .saturating_add(Weight::from_parts(227_917, 0).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn get_license(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: Session NextKeys (r:1 w:0) + /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) + /// Storage: Configuration CollatorSelectionLicenseBondOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionLicenseBondOverride (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 9]`. + fn get_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `610 + c * (26 ±0)` + // Estimated: `9099 + c * (28 ±0)` + // Minimum execution time: 22_741_000 picoseconds. + Weight::from_parts(24_210_604, 9099) + // Standard Error: 2_703 + .saturating_add(Weight::from_parts(255_686, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 28).saturating_mul(c.into())) } - fn onboard(c: u32) -> Weight { - Weight::from_ref_time(71_196_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(198_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:0) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection Invulnerables (r:1 w:0) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionDesiredCollatorsOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionKickThresholdOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionKickThresholdOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 7]`. + fn onboard(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `445 + c * (54 ±0)` + // Estimated: `10119` + // Minimum execution time: 20_397_000 picoseconds. + Weight::from_parts(21_415_013, 10119) + // Standard Error: 4_086 + .saturating_add(Weight::from_parts(252_810, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } - fn offboard(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn offboard(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `111 + c * (32 ±0)` + // Estimated: `1806` + // Minimum execution time: 10_543_000 picoseconds. + Weight::from_parts(11_227_541, 1806) + // Standard Error: 1_699 + .saturating_add(Weight::from_parts(181_030, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } - fn release_license(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn release_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (61 ±0)` + // Estimated: `5335` + // Minimum execution time: 22_214_000 picoseconds. + Weight::from_parts(24_373_981, 5335) + // Standard Error: 8_018 + .saturating_add(Weight::from_parts(405_404, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } - fn force_release_license(c: u32) -> Weight { - Weight::from_ref_time(55_336_000 as u64) - // Standard Error: 0 - .saturating_add(Weight::from_ref_time(151_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) + /// Storage: CollatorSelection Candidates (r:1 w:1) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:1 w:1) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// The range of component `c` is `[1, 10]`. + fn force_release_license(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (61 ±0)` + // Estimated: `5335` + // Minimum execution time: 22_159_000 picoseconds. + Weight::from_parts(24_200_796, 5335) + // Standard Error: 8_328 + .saturating_add(Weight::from_parts(312_138, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) fn note_author() -> Weight { - Weight::from_ref_time(71_461_000 as u64) - .saturating_add(RocksDbWeight::get().reads(3 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `7729` + // Minimum execution time: 16_520_000 picoseconds. + Weight::from_parts(16_933_000, 7729) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } - fn new_session(r: u32, c: u32) -> Weight { - Weight::from_ref_time(0 as u64) - // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(109_961_000 as u64).saturating_mul(r as u64)) - // Standard Error: 1_010_000 - .saturating_add(Weight::from_ref_time(151_952_000 as u64).saturating_mul(c as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(c as u64))) - .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(r as u64))) - .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + /// Storage: CollatorSelection Candidates (r:1 w:0) + /// Proof: CollatorSelection Candidates (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: Configuration CollatorSelectionKickThresholdOverride (r:1 w:0) + /// Proof: Configuration CollatorSelectionKickThresholdOverride (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: CollatorSelection LastAuthoredBlock (r:10 w:0) + /// Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) + /// Storage: CollatorSelection Invulnerables (r:1 w:0) + /// Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: System BlockWeight (r:1 w:1) + /// Proof: System BlockWeight (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: CollatorSelection LicenseDepositOf (r:9 w:9) + /// Proof: CollatorSelection LicenseDepositOf (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: System Account (r:10 w:10) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `r` is `[1, 10]`. + /// The range of component `c` is `[1, 10]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `562 + r * (190 ±0) + c * (83 ±0)` + // Estimated: `91818518943723 + c * (2519 ±0) + r * (5142 ±1)` + // Minimum execution time: 16_153_000 picoseconds. + Weight::from_parts(16_601_000, 91818518943723) + // Standard Error: 119_095 + .saturating_add(Weight::from_parts(10_660_813, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 5142).saturating_mul(r.into())) } } + -- gitstuff