From 959d91870d331852e20eae85e3e0186f2223a91d Mon Sep 17 00:00:00 2001 From: Jonathan Brown <jbrown@acuity.social> Date: Thu, 20 Feb 2025 02:00:16 +0700 Subject: [PATCH] [pallet-broker] add extrinsic to remove a lease (#7026) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description #6929 requests more extrinsics for "managing the network's coretime allocations without needing to dabble with migration+runtime upgrade or set/kill storage patterns" This pull request implements the remove_lease() extrinsic. ## Integration Downstream projects need to benchmark the weight for the remove_lease() extrinsic. ## Review Notes Mentorship is requested to ensure this is implemented correctly. The lease is removed from state using the TaskId as a key. Is this sufficient. Does the extrinsic need to do anything else? --------- Co-authored-by: Jonathan Brown <jbrown@acuity.network> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> Co-authored-by: Dónal Murray <donalm@seadanda.dev> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dónal Murray <donal.murray@parity.io> --- .../src/weights/pallet_broker.rs | 352 ++++++-------- .../src/weights/pallet_broker.rs | 330 ++++++------- prdoc/pr_7026.prdoc | 17 + substrate/frame/broker/src/benchmarking.rs | 25 + .../frame/broker/src/dispatchable_impls.rs | 9 + substrate/frame/broker/src/lib.rs | 17 + substrate/frame/broker/src/tests.rs | 12 + substrate/frame/broker/src/weights.rs | 457 ++++++++++-------- 8 files changed, 637 insertions(+), 582 deletions(-) create mode 100644 prdoc/pr_7026.prdoc diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs index f83cd5fd0e6..1a94a810add 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs @@ -1,5 +1,4 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,25 +16,30 @@ //! Autogenerated weights for `pallet_broker` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-acd6uxux-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("coretime-rococo-dev")`, DB CACHE: 1024 +//! HOSTNAME: `3d3aa761b4e4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// target/production/polkadot-parachain +// frame-omni-bencher +// v1 // benchmark // pallet -// --steps=50 -// --repeat=20 // --extrinsic=* +// --runtime=target/production/wbuild/coretime-rococo-runtime/coretime_rococo_runtime.wasm +// --pallet=pallet_broker +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights // --wasm-execution=compiled +// --steps=50 +// --repeat=20 // --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json -// --pallet=pallet_broker -// --chain=coretime-rococo-dev -// --header=./cumulus/file_header.txt -// --output=./cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/ +// --no-storage-info +// --no-min-squares +// --no-median-slopes +// --genesis-builder-policy=none +// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,8 +58,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_250_000 picoseconds. - Weight::from_parts(2_419_000, 0) + // Minimum execution time: 1_938_000 picoseconds. + Weight::from_parts(2_053_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,10 +67,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) fn reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `10888` + // Measured: `10826` // Estimated: `13506` - // Minimum execution time: 25_785_000 picoseconds. - Weight::from_parts(26_335_000, 0) + // Minimum execution time: 21_616_000 picoseconds. + Weight::from_parts(22_103_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,10 +79,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) fn unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `12090` + // Measured: `12028` // Estimated: `13506` - // Minimum execution time: 24_549_000 picoseconds. - Weight::from_parts(25_010_000, 0) + // Minimum execution time: 20_780_000 picoseconds. + Weight::from_parts(21_119_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,14 +95,26 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_lease() -> Weight { // Proof Size summary in bytes: - // Measured: `466` - // Estimated: `1951` - // Minimum execution time: 14_135_000 picoseconds. - Weight::from_parts(14_603_000, 0) - .saturating_add(Weight::from_parts(0, 1951)) + // Measured: `400` + // Estimated: `1886` + // Minimum execution time: 9_092_000 picoseconds. + Weight::from_parts(9_625_000, 0) + .saturating_add(Weight::from_parts(0, 1886)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Broker::Leases` (r:1 w:1) + /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`) + fn remove_lease() -> Weight { + // Proof Size summary in bytes: + // Measured: `408` + // Estimated: `1886` + // Minimum execution time: 7_825_000 picoseconds. + Weight::from_parts(8_367_000, 0) + .saturating_add(Weight::from_parts(0, 1886)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Broker::Configuration` (r:1 w:0) /// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`) /// Storage: `Broker::Leases` (r:1 w:1) @@ -107,14 +123,6 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0) @@ -132,15 +140,15 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `n` is `[0, 1000]`. fn start_sales(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12599` - // Estimated: `15065 + n * (1 ±0)` - // Minimum execution time: 54_087_000 picoseconds. - Weight::from_parts(145_466_213, 0) - .saturating_add(Weight::from_parts(0, 15065)) - // Standard Error: 2_407 - .saturating_add(Weight::from_parts(20_971, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(14)) - .saturating_add(T::DbWeight::get().writes(60)) + // Measured: `12505` + // Estimated: `14971 + n * (1 ±0)` + // Minimum execution time: 46_159_000 picoseconds. + Weight::from_parts(138_417_372, 0) + .saturating_add(Weight::from_parts(0, 14971)) + // Standard Error: 2_456 + .saturating_add(Weight::from_parts(20_567, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(58)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } /// Storage: `Broker::Status` (r:1 w:0) @@ -155,10 +163,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `437` + // Measured: `356` // Estimated: `3593` - // Minimum execution time: 58_341_000 picoseconds. - Weight::from_parts(59_505_000, 0) + // Minimum execution time: 57_583_000 picoseconds. + Weight::from_parts(58_954_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -179,10 +187,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `658` + // Measured: `577` // Estimated: `4698` - // Minimum execution time: 92_983_000 picoseconds. - Weight::from_parts(99_237_000, 0) + // Minimum execution time: 83_772_000 picoseconds. + Weight::from_parts(89_427_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -191,10 +199,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 17_512_000 picoseconds. - Weight::from_parts(18_099_000, 0) + // Minimum execution time: 17_886_000 picoseconds. + Weight::from_parts(18_525_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -203,10 +211,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn partition() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 18_715_000 picoseconds. - Weight::from_parts(19_768_000, 0) + // Minimum execution time: 19_667_000 picoseconds. + Weight::from_parts(20_437_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -215,10 +223,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn interlace() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 20_349_000 picoseconds. - Weight::from_parts(21_050_000, 0) + // Minimum execution time: 20_947_000 picoseconds. + Weight::from_parts(21_887_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -233,10 +241,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn assign() -> Weight { // Proof Size summary in bytes: - // Measured: `937` + // Measured: `916` // Estimated: `4681` - // Minimum execution time: 31_876_000 picoseconds. - Weight::from_parts(33_536_000, 0) + // Minimum execution time: 33_146_000 picoseconds. + Weight::from_parts(34_424_000, 0) .saturating_add(Weight::from_parts(0, 4681)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -253,10 +261,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn pool() -> Weight { // Proof Size summary in bytes: - // Measured: `1003` + // Measured: `982` // Estimated: `5996` - // Minimum execution time: 39_500_000 picoseconds. - Weight::from_parts(40_666_000, 0) + // Minimum execution time: 40_827_000 picoseconds. + Weight::from_parts(42_091_000, 0) .saturating_add(Weight::from_parts(0, 5996)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -270,13 +278,13 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[1, 3]`. fn claim_revenue(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `671` + // Measured: `649` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 65_843_000 picoseconds. - Weight::from_parts(65_768_512, 0) + // Minimum execution time: 67_568_000 picoseconds. + Weight::from_parts(68_621_490, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 40_994 - .saturating_add(Weight::from_parts(2_084_877, 0).saturating_mul(m.into())) + // Standard Error: 50_354 + .saturating_add(Weight::from_parts(1_501_769, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -286,23 +294,15 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn purchase_credit() -> Weight { // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `3788` - // Minimum execution time: 73_250_000 picoseconds. - Weight::from_parts(75_059_000, 0) - .saturating_add(Weight::from_parts(0, 3788)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 60_754_000 picoseconds. + Weight::from_parts(62_377_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Broker::Status` (r:1 w:0) /// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`) @@ -310,10 +310,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn drop_region() -> Weight { // Proof Size summary in bytes: - // Measured: `466` + // Measured: `445` // Estimated: `3551` - // Minimum execution time: 55_088_000 picoseconds. - Weight::from_parts(65_329_000, 0) + // Minimum execution time: 37_832_000 picoseconds. + Weight::from_parts(41_790_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -326,10 +326,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn drop_contribution() -> Weight { // Proof Size summary in bytes: - // Measured: `463` + // Measured: `442` // Estimated: `3533` - // Minimum execution time: 102_280_000 picoseconds. - Weight::from_parts(130_319_000, 0) + // Minimum execution time: 45_268_000 picoseconds. + Weight::from_parts(49_260_000, 0) .saturating_add(Weight::from_parts(0, 3533)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -344,10 +344,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn drop_history() -> Weight { // Proof Size summary in bytes: - // Measured: `979` + // Measured: `855` // Estimated: `3593` - // Minimum execution time: 78_195_000 picoseconds. - Weight::from_parts(105_946_000, 0) + // Minimum execution time: 57_254_000 picoseconds. + Weight::from_parts(66_693_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -358,47 +358,36 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) fn drop_renewal() -> Weight { // Proof Size summary in bytes: - // Measured: `957` + // Measured: `936` // Estimated: `4698` - // Minimum execution time: 41_642_000 picoseconds. - Weight::from_parts(48_286_000, 0) + // Minimum execution time: 35_473_000 picoseconds. + Weight::from_parts(38_959_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1000]`. fn request_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `74` - // Estimated: `3539` - // Minimum execution time: 23_727_000 picoseconds. - Weight::from_parts(25_029_439, 0) - .saturating_add(Weight::from_parts(0, 3539)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 13_587_000 picoseconds. + Weight::from_parts(17_521_302, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. - fn process_core_count(n: u32, ) -> Weight { + fn process_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `266` + // Measured: `208` // Estimated: `1487` - // Minimum execution time: 7_887_000 picoseconds. - Weight::from_parts(8_477_863, 0) + // Minimum execution time: 6_952_000 picoseconds. + Weight::from_parts(7_430_700, 0) .saturating_add(Weight::from_parts(0, 1487)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(76, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -410,10 +399,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `461` + // Measured: `440` // Estimated: `6196` - // Minimum execution time: 52_505_000 picoseconds. - Weight::from_parts(53_392_000, 0) + // Minimum execution time: 54_469_000 picoseconds. + Weight::from_parts(55_909_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -443,13 +432,13 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `n` is `[0, 1000]`. fn rotate_sale(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `32497` - // Estimated: `233641 + n * (198 ±9)` - // Minimum execution time: 28_834_000 picoseconds. - Weight::from_parts(2_467_159_777, 0) + // Measured: `32278` + // Estimated: `233641 + n * (198 ±0)` + // Minimum execution time: 26_967_000 picoseconds. + Weight::from_parts(2_608_120_906, 0) .saturating_add(Weight::from_parts(0, 233641)) - // Standard Error: 149_483 - .saturating_add(Weight::from_parts(4_045_956, 0).saturating_mul(n.into())) + // Standard Error: 158_189 + .saturating_add(Weight::from_parts(3_910_138, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(126)) .saturating_add(T::DbWeight::get().writes(181)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) @@ -461,10 +450,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolHistory` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) fn process_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `0` // Estimated: `3493` - // Minimum execution time: 7_689_000 picoseconds. - Weight::from_parts(7_988_000, 0) + // Minimum execution time: 4_947_000 picoseconds. + Weight::from_parts(5_218_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -475,43 +464,26 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workload` (`max_values`: None, `max_size`: Some(1212), added: 3687, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn process_core_schedule() -> Weight { // Proof Size summary in bytes: - // Measured: `1321` - // Estimated: `4786` - // Minimum execution time: 37_394_000 picoseconds. - Weight::from_parts(38_379_000, 0) - .saturating_add(Weight::from_parts(0, 4786)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `1223` + // Estimated: `4688` + // Minimum execution time: 26_345_000 picoseconds. + Weight::from_parts(27_141_000, 0) + .saturating_add(Weight::from_parts(0, 4688)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn request_revenue_info_at() -> Weight { // Proof Size summary in bytes: - // Measured: `74` - // Estimated: `3539` - // Minimum execution time: 19_203_000 picoseconds. - Weight::from_parts(19_797_000, 0) - .saturating_add(Weight::from_parts(0, 3539)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 7_982_000 picoseconds. + Weight::from_parts(10_628_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) @@ -519,8 +491,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_129_000 picoseconds. - Weight::from_parts(2_266_000, 0) + // Minimum execution time: 1_893_000 picoseconds. + Weight::from_parts(2_080_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -530,8 +502,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_233_000 picoseconds. - Weight::from_parts(2_351_000, 0) + // Minimum execution time: 1_900_000 picoseconds. + Weight::from_parts(2_028_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -547,11 +519,11 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn do_tick_base() -> Weight { // Proof Size summary in bytes: - // Measured: `408` - // Estimated: `1893` - // Minimum execution time: 15_716_000 picoseconds. - Weight::from_parts(16_160_000, 0) - .saturating_add(Weight::from_parts(0, 1893)) + // Measured: `327` + // Estimated: `1812` + // Minimum execution time: 12_838_000 picoseconds. + Weight::from_parts(13_387_000, 0) + .saturating_add(Weight::from_parts(0, 1812)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -565,10 +537,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn force_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `11125` + // Measured: `11120` // Estimated: `13506` - // Minimum execution time: 32_286_000 picoseconds. - Weight::from_parts(33_830_000, 0) + // Minimum execution time: 38_247_000 picoseconds. + Weight::from_parts(40_006_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -577,10 +549,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`) fn swap_leases() -> Weight { // Proof Size summary in bytes: - // Measured: `470` + // Measured: `408` // Estimated: `1886` - // Minimum execution time: 8_887_000 picoseconds. - Weight::from_parts(9_178_000, 0) + // Minimum execution time: 5_293_000 picoseconds. + Weight::from_parts(5_636_000, 0) .saturating_add(Weight::from_parts(0, 1886)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -603,10 +575,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn enable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `2829` + // Measured: `2748` // Estimated: `6196` - // Minimum execution time: 130_799_000 picoseconds. - Weight::from_parts(139_893_000, 0) + // Minimum execution time: 118_555_000 picoseconds. + Weight::from_parts(124_311_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -615,10 +587,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(1002), added: 1497, mode: `MaxEncodedLen`) fn disable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `1307` + // Measured: `1286` // Estimated: `2487` - // Minimum execution time: 22_945_000 picoseconds. - Weight::from_parts(24_855_000, 0) + // Minimum execution time: 23_909_000 picoseconds. + Weight::from_parts(26_797_000, 0) .saturating_add(Weight::from_parts(0, 2487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -627,22 +599,14 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_new_timeslice() -> Weight { // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `3788` - // Minimum execution time: 56_864_000 picoseconds. - Weight::from_parts(59_119_000, 0) - .saturating_add(Weight::from_parts(0, 3788)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 49_039_000 picoseconds. + Weight::from_parts(50_172_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs index e431ccbbc29..e865f7e3a36 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs @@ -1,5 +1,4 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,25 +16,30 @@ //! Autogenerated weights for `pallet_broker` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-acd6uxux-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("coretime-westend-dev")`, DB CACHE: 1024 +//! HOSTNAME: `3d3aa761b4e4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// target/production/polkadot-parachain +// frame-omni-bencher +// v1 // benchmark // pallet -// --steps=50 -// --repeat=20 // --extrinsic=* +// --runtime=target/production/wbuild/coretime-westend-runtime/coretime_westend_runtime.wasm +// --pallet=pallet_broker +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/coretime/coretime-westend/src/weights // --wasm-execution=compiled +// --steps=50 +// --repeat=20 // --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json -// --pallet=pallet_broker -// --chain=coretime-westend-dev -// --header=./cumulus/file_header.txt -// --output=./cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/ +// --no-storage-info +// --no-min-squares +// --no-median-slopes +// --genesis-builder-policy=none +// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,8 +58,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_274_000 picoseconds. - Weight::from_parts(2_421_000, 0) + // Minimum execution time: 1_965_000 picoseconds. + Weight::from_parts(2_076_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,10 +67,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) fn reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `10888` + // Measured: `10826` // Estimated: `13506` - // Minimum execution time: 26_257_000 picoseconds. - Weight::from_parts(26_802_000, 0) + // Minimum execution time: 21_785_000 picoseconds. + Weight::from_parts(22_243_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,10 +79,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) fn unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `12090` + // Measured: `12028` // Estimated: `13506` - // Minimum execution time: 24_692_000 picoseconds. - Weight::from_parts(25_275_000, 0) + // Minimum execution time: 20_848_000 picoseconds. + Weight::from_parts(21_014_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,14 +95,26 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_lease() -> Weight { // Proof Size summary in bytes: - // Measured: `146` - // Estimated: `1631` - // Minimum execution time: 13_872_000 picoseconds. - Weight::from_parts(14_509_000, 0) - .saturating_add(Weight::from_parts(0, 1631)) + // Measured: `80` + // Estimated: `1566` + // Minimum execution time: 9_102_000 picoseconds. + Weight::from_parts(9_645_000, 0) + .saturating_add(Weight::from_parts(0, 1566)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Broker::Leases` (r:1 w:1) + /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(81), added: 576, mode: `MaxEncodedLen`) + fn remove_lease() -> Weight { + // Proof Size summary in bytes: + // Measured: `88` + // Estimated: `1566` + // Minimum execution time: 7_779_000 picoseconds. + Weight::from_parts(8_213_000, 0) + .saturating_add(Weight::from_parts(0, 1566)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Broker::Configuration` (r:1 w:0) /// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`) /// Storage: `Broker::Leases` (r:1 w:1) @@ -107,14 +123,6 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0) @@ -132,15 +140,15 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `n` is `[0, 1000]`. fn start_sales(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12279` - // Estimated: `14805 + n * (1 ±0)` - // Minimum execution time: 52_916_000 picoseconds. - Weight::from_parts(96_122_236, 0) - .saturating_add(Weight::from_parts(0, 14805)) - // Standard Error: 969 - .saturating_add(Weight::from_parts(5_732, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(14)) - .saturating_add(T::DbWeight::get().writes(27)) + // Measured: `12185` + // Estimated: `14711 + n * (1 ±0)` + // Minimum execution time: 46_724_000 picoseconds. + Weight::from_parts(91_319_033, 0) + .saturating_add(Weight::from_parts(0, 14711)) + // Standard Error: 1_009 + .saturating_add(Weight::from_parts(6_084, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(25)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } /// Storage: `Broker::Status` (r:1 w:0) @@ -155,10 +163,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `437` + // Measured: `356` // Estimated: `3593` - // Minimum execution time: 56_955_000 picoseconds. - Weight::from_parts(59_005_000, 0) + // Minimum execution time: 56_441_000 picoseconds. + Weight::from_parts(58_144_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -179,10 +187,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `658` + // Measured: `577` // Estimated: `4698` - // Minimum execution time: 108_853_000 picoseconds. - Weight::from_parts(117_467_000, 0) + // Minimum execution time: 89_738_000 picoseconds. + Weight::from_parts(91_728_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -191,10 +199,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 16_922_000 picoseconds. - Weight::from_parts(17_544_000, 0) + // Minimum execution time: 17_422_000 picoseconds. + Weight::from_parts(17_953_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -203,10 +211,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn partition() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 18_762_000 picoseconds. - Weight::from_parts(19_162_000, 0) + // Minimum execution time: 19_091_000 picoseconds. + Weight::from_parts(19_825_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -215,10 +223,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn interlace() -> Weight { // Proof Size summary in bytes: - // Measured: `358` + // Measured: `337` // Estimated: `3551` - // Minimum execution time: 20_297_000 picoseconds. - Weight::from_parts(20_767_000, 0) + // Minimum execution time: 20_538_000 picoseconds. + Weight::from_parts(21_018_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -233,10 +241,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn assign() -> Weight { // Proof Size summary in bytes: - // Measured: `736` + // Measured: `715` // Estimated: `4681` - // Minimum execution time: 31_347_000 picoseconds. - Weight::from_parts(32_259_000, 0) + // Minimum execution time: 31_287_000 picoseconds. + Weight::from_parts(32_190_000, 0) .saturating_add(Weight::from_parts(0, 4681)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -253,10 +261,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn pool() -> Weight { // Proof Size summary in bytes: - // Measured: `802` + // Measured: `781` // Estimated: `5996` - // Minimum execution time: 38_310_000 picoseconds. - Weight::from_parts(39_777_000, 0) + // Minimum execution time: 38_372_000 picoseconds. + Weight::from_parts(39_684_000, 0) .saturating_add(Weight::from_parts(0, 5996)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -270,13 +278,13 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[1, 3]`. fn claim_revenue(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `671` + // Measured: `649` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 65_960_000 picoseconds. - Weight::from_parts(66_194_985, 0) + // Minimum execution time: 68_600_000 picoseconds. + Weight::from_parts(69_000_986, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 42_455 - .saturating_add(Weight::from_parts(1_808_497, 0).saturating_mul(m.into())) + // Standard Error: 48_024 + .saturating_add(Weight::from_parts(1_786_360, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -286,23 +294,15 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn purchase_credit() -> Weight { // Proof Size summary in bytes: - // Measured: `321` - // Estimated: `3786` - // Minimum execution time: 69_918_000 picoseconds. - Weight::from_parts(72_853_000, 0) - .saturating_add(Weight::from_parts(0, 3786)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `103` + // Estimated: `3593` + // Minimum execution time: 60_734_000 picoseconds. + Weight::from_parts(62_365_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Broker::Status` (r:1 w:0) /// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`) @@ -310,10 +310,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn drop_region() -> Weight { // Proof Size summary in bytes: - // Measured: `466` + // Measured: `445` // Estimated: `3551` - // Minimum execution time: 44_775_000 picoseconds. - Weight::from_parts(58_978_000, 0) + // Minimum execution time: 35_204_000 picoseconds. + Weight::from_parts(38_437_000, 0) .saturating_add(Weight::from_parts(0, 3551)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -326,10 +326,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn drop_contribution() -> Weight { // Proof Size summary in bytes: - // Measured: `463` + // Measured: `442` // Estimated: `3533` - // Minimum execution time: 67_098_000 picoseconds. - Weight::from_parts(93_626_000, 0) + // Minimum execution time: 45_583_000 picoseconds. + Weight::from_parts(51_523_000, 0) .saturating_add(Weight::from_parts(0, 3533)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -344,10 +344,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn drop_history() -> Weight { // Proof Size summary in bytes: - // Measured: `979` + // Measured: `855` // Estimated: `3593` - // Minimum execution time: 89_463_000 picoseconds. - Weight::from_parts(113_286_000, 0) + // Minimum execution time: 58_254_000 picoseconds. + Weight::from_parts(62_156_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -358,44 +358,35 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) fn drop_renewal() -> Weight { // Proof Size summary in bytes: - // Measured: `556` + // Measured: `535` // Estimated: `4698` - // Minimum execution time: 42_073_000 picoseconds. - Weight::from_parts(52_211_000, 0) + // Minimum execution time: 33_857_000 picoseconds. + Weight::from_parts(37_186_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1000]`. fn request_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `74` - // Estimated: `3539` - // Minimum execution time: 22_937_000 picoseconds. - Weight::from_parts(23_898_154, 0) - .saturating_add(Weight::from_parts(0, 3539)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 13_620_000 picoseconds. + Weight::from_parts(17_342_552, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. fn process_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `266` + // Measured: `208` // Estimated: `1487` - // Minimum execution time: 7_650_000 picoseconds. - Weight::from_parts(8_166_809, 0) + // Minimum execution time: 6_540_000 picoseconds. + Weight::from_parts(7_024_123, 0) .saturating_add(Weight::from_parts(0, 1487)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -408,10 +399,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `461` + // Measured: `440` // Estimated: `6196` - // Minimum execution time: 53_023_000 picoseconds. - Weight::from_parts(54_564_000, 0) + // Minimum execution time: 49_713_000 picoseconds. + Weight::from_parts(53_514_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -441,13 +432,13 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// The range of component `n` is `[0, 1000]`. fn rotate_sale(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16480` - // Estimated: `69404 + n * (8 ±1)` - // Minimum execution time: 29_313_000 picoseconds. - Weight::from_parts(746_062_644, 0) + // Measured: `16294` + // Estimated: `69404 + n * (8 ±0)` + // Minimum execution time: 27_718_000 picoseconds. + Weight::from_parts(833_814_401, 0) .saturating_add(Weight::from_parts(0, 69404)) - // Standard Error: 22_496 - .saturating_add(Weight::from_parts(1_545_204, 0).saturating_mul(n.into())) + // Standard Error: 26_834 + .saturating_add(Weight::from_parts(1_447_378, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(44)) .saturating_add(T::DbWeight::get().writes(57)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) @@ -459,10 +450,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::InstaPoolHistory` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) fn process_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `0` // Estimated: `3493` - // Minimum execution time: 7_625_000 picoseconds. - Weight::from_parts(7_910_000, 0) + // Minimum execution time: 5_288_000 picoseconds. + Weight::from_parts(5_696_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -473,43 +464,26 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workload` (`max_values`: None, `max_size`: Some(1212), added: 3687, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn process_core_schedule() -> Weight { // Proof Size summary in bytes: - // Measured: `1321` - // Estimated: `4786` - // Minimum execution time: 36_572_000 picoseconds. - Weight::from_parts(37_316_000, 0) - .saturating_add(Weight::from_parts(0, 4786)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `1223` + // Estimated: `4688` + // Minimum execution time: 26_479_000 picoseconds. + Weight::from_parts(27_129_000, 0) + .saturating_add(Weight::from_parts(0, 4688)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn request_revenue_info_at() -> Weight { // Proof Size summary in bytes: - // Measured: `74` - // Estimated: `3539` - // Minimum execution time: 18_362_000 picoseconds. - Weight::from_parts(18_653_000, 0) - .saturating_add(Weight::from_parts(0, 3539)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 8_553_000 picoseconds. + Weight::from_parts(11_110_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) @@ -517,8 +491,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_193_000 picoseconds. - Weight::from_parts(2_393_000, 0) + // Minimum execution time: 1_899_000 picoseconds. + Weight::from_parts(2_041_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -528,8 +502,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_344_000 picoseconds. - Weight::from_parts(2_486_000, 0) + // Minimum execution time: 1_977_000 picoseconds. + Weight::from_parts(2_092_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -545,11 +519,11 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn do_tick_base() -> Weight { // Proof Size summary in bytes: - // Measured: `408` - // Estimated: `1893` - // Minimum execution time: 15_443_000 picoseconds. - Weight::from_parts(15_753_000, 0) - .saturating_add(Weight::from_parts(0, 1893)) + // Measured: `327` + // Estimated: `1812` + // Minimum execution time: 12_227_000 picoseconds. + Weight::from_parts(12_849_000, 0) + .saturating_add(Weight::from_parts(0, 1812)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -563,10 +537,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn force_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `11125` + // Measured: `11120` // Estimated: `13506` - // Minimum execution time: 31_464_000 picoseconds. - Weight::from_parts(32_798_000, 0) + // Minimum execution time: 37_190_000 picoseconds. + Weight::from_parts(38_297_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -575,10 +549,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(81), added: 576, mode: `MaxEncodedLen`) fn swap_leases() -> Weight { // Proof Size summary in bytes: - // Measured: `150` + // Measured: `88` // Estimated: `1566` - // Minimum execution time: 8_637_000 picoseconds. - Weight::from_parts(8_883_000, 0) + // Minimum execution time: 4_937_000 picoseconds. + Weight::from_parts(5_237_000, 0) .saturating_add(Weight::from_parts(0, 1566)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -601,10 +575,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn enable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `1451` + // Measured: `1370` // Estimated: `6196` - // Minimum execution time: 120_585_000 picoseconds. - Weight::from_parts(148_755_000, 0) + // Minimum execution time: 112_871_000 picoseconds. + Weight::from_parts(117_045_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -613,10 +587,10 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(201), added: 696, mode: `MaxEncodedLen`) fn disable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `506` + // Measured: `485` // Estimated: `1686` - // Minimum execution time: 18_235_000 picoseconds. - Weight::from_parts(19_113_000, 0) + // Minimum execution time: 17_566_000 picoseconds. + Weight::from_parts(18_037_000, 0) .saturating_add(Weight::from_parts(0, 1686)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -627,8 +601,8 @@ impl<T: frame_system::Config> pallet_broker::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 4_863_000 picoseconds. - Weight::from_parts(5_045_000, 0) + // Minimum execution time: 4_814_000 picoseconds. + Weight::from_parts(4_996_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/prdoc/pr_7026.prdoc b/prdoc/pr_7026.prdoc new file mode 100644 index 00000000000..8e50f61ea17 --- /dev/null +++ b/prdoc/pr_7026.prdoc @@ -0,0 +1,17 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: "[pallet-broker] add extrinsic to remove a lease" + +doc: + - audience: Runtime User + description: | + A new `remove_lease` extrinsic is introduced to the broker pallet to allow a lease to be removed by the root origin. + +crates: + - name: pallet-broker + bump: major + - name: coretime-rococo-runtime + bump: patch + - name: coretime-westend-runtime + bump: patch diff --git a/substrate/frame/broker/src/benchmarking.rs b/substrate/frame/broker/src/benchmarking.rs index 49003afcdd8..65a8b1803b0 100644 --- a/substrate/frame/broker/src/benchmarking.rs +++ b/substrate/frame/broker/src/benchmarking.rs @@ -191,6 +191,31 @@ mod benches { Ok(()) } + #[benchmark] + fn remove_lease() -> Result<(), BenchmarkError> { + let task = 1u32; + let until = 10u32; + + // Assume Leases to be almost filled for worst case + let mut leases = vec![ + LeaseRecordItem { task, until }; + T::MaxLeasedCores::get().saturating_sub(1) as usize + ]; + let task = 2u32; + leases.push(LeaseRecordItem { task, until }); + Leases::<T>::put(BoundedVec::try_from(leases).unwrap()); + + let origin = + T::AdminOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + #[extrinsic_call] + _(origin as T::RuntimeOrigin, task); + + assert_eq!(Leases::<T>::get().len(), T::MaxLeasedCores::get().saturating_sub(1) as usize); + + Ok(()) + } + #[benchmark] fn start_sales(n: Linear<0, { MAX_CORE_COUNT.into() }>) -> Result<(), BenchmarkError> { let config = new_config_record::<T>(); diff --git a/substrate/frame/broker/src/dispatchable_impls.rs b/substrate/frame/broker/src/dispatchable_impls.rs index 77bbf0878b4..057e94ca3de 100644 --- a/substrate/frame/broker/src/dispatchable_impls.rs +++ b/substrate/frame/broker/src/dispatchable_impls.rs @@ -91,6 +91,15 @@ impl<T: Config> Pallet<T> { Ok(()) } + pub(crate) fn do_remove_lease(task: TaskId) -> DispatchResult { + let mut r = Leases::<T>::get(); + let i = r.iter().position(|lease| lease.task == task).ok_or(Error::<T>::LeaseNotFound)?; + r.remove(i); + Leases::<T>::put(r); + Self::deposit_event(Event::<T>::LeaseRemoved { task }); + Ok(()) + } + pub(crate) fn do_start_sales( end_price: BalanceOf<T>, extra_cores: CoreIndex, diff --git a/substrate/frame/broker/src/lib.rs b/substrate/frame/broker/src/lib.rs index f605815a421..86461e903f6 100644 --- a/substrate/frame/broker/src/lib.rs +++ b/substrate/frame/broker/src/lib.rs @@ -340,6 +340,11 @@ pub mod pallet { /// longer apply). until: Timeslice, }, + /// A lease has been removed. + LeaseRemoved { + /// The task to which a core was assigned. + task: TaskId, + }, /// A lease is about to end. LeaseEnding { /// The task to which a core was assigned. @@ -519,6 +524,8 @@ pub mod pallet { TooManyReservations, /// The maximum amount of leases has already been reached. TooManyLeases, + /// The lease does not exist. + LeaseNotFound, /// The revenue for the Instantaneous Core Sales of this period is not (yet) known and thus /// this operation cannot proceed. UnknownRevenue, @@ -979,6 +986,16 @@ pub mod pallet { Ok(Pays::No.into()) } + /// Remove a lease. + /// + /// - `origin`: Must be Root or pass `AdminOrigin`. + /// - `task`: The task id of the lease which should be removed. + #[pallet::call_index(24)] + pub fn remove_lease(origin: OriginFor<T>, task: TaskId) -> DispatchResult { + T::AdminOrigin::ensure_origin_or_root(origin)?; + Self::do_remove_lease(task) + } + #[pallet::call_index(99)] #[pallet::weight(T::WeightInfo::swap_leases())] pub fn swap_leases(origin: OriginFor<T>, id: TaskId, other: TaskId) -> DispatchResult { diff --git a/substrate/frame/broker/src/tests.rs b/substrate/frame/broker/src/tests.rs index 984650aac08..ffb45e73547 100644 --- a/substrate/frame/broker/src/tests.rs +++ b/substrate/frame/broker/src/tests.rs @@ -1223,6 +1223,18 @@ fn leases_are_limited() { }); } +#[test] +fn remove_lease_works() { + TestExt::new().execute_with(|| { + Leases::<Test>::put( + BoundedVec::try_from(vec![LeaseRecordItem { task: 1u32, until: 10u32 }]).unwrap(), + ); + assert_noop!(Broker::do_remove_lease(2), Error::<Test>::LeaseNotFound); + assert_ok!(Broker::do_remove_lease(1)); + assert_noop!(Broker::do_remove_lease(1), Error::<Test>::LeaseNotFound); + }); +} + #[test] fn purchase_requires_valid_status_and_sale_info() { TestExt::new().execute_with(|| { diff --git a/substrate/frame/broker/src/weights.rs b/substrate/frame/broker/src/weights.rs index 87e58855166..64392da057f 100644 --- a/substrate/frame/broker/src/weights.rs +++ b/substrate/frame/broker/src/weights.rs @@ -18,31 +18,37 @@ //! Autogenerated weights for `pallet_broker` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-acd6uxux-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` +//! HOSTNAME: `2df7bb537484`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: -// target/production/substrate-node +// frame-omni-bencher +// v1 // benchmark // pallet -// --steps=50 -// --repeat=20 // --extrinsic=* +// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm +// --pallet=pallet_broker +// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2 +// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/broker/src/weights.rs // --wasm-execution=compiled +// --steps=50 +// --repeat=20 // --heap-pages=4096 -// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json -// --pallet=pallet_broker -// --chain=dev -// --header=./substrate/HEADER-APACHE2 -// --output=./substrate/frame/broker/src/weights.rs -// --template=./substrate/.maintain/frame-weight-template.hbs +// --template=substrate/.maintain/frame-weight-template.hbs +// --no-storage-info +// --no-min-squares +// --no-median-slopes +// --genesis-builder-policy=none +// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] #![allow(missing_docs)] +#[allow(dead_code)] use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; @@ -53,6 +59,7 @@ pub trait WeightInfo { fn reserve() -> Weight; fn unreserve() -> Weight; fn set_lease() -> Weight; + fn remove_lease() -> Weight; fn start_sales(n: u32, ) -> Weight; fn purchase() -> Weight; fn renew() -> Weight; @@ -93,18 +100,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_498_000 picoseconds. - Weight::from_parts(2_660_000, 0) + // Minimum execution time: 2_017_000 picoseconds. + Weight::from_parts(2_192_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Broker::Reservations` (r:1 w:1) /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(6011), added: 6506, mode: `MaxEncodedLen`) fn reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `5016` + // Measured: `4816` // Estimated: `7496` - // Minimum execution time: 23_090_000 picoseconds. - Weight::from_parts(23_664_000, 7496) + // Minimum execution time: 15_233_000 picoseconds. + Weight::from_parts(15_913_000, 7496) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -112,10 +119,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(6011), added: 6506, mode: `MaxEncodedLen`) fn unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `6218` + // Measured: `6018` // Estimated: `7496` - // Minimum execution time: 21_782_000 picoseconds. - Weight::from_parts(22_708_000, 7496) + // Minimum execution time: 14_470_000 picoseconds. + Weight::from_parts(14_666_000, 7496) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -123,10 +130,21 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) fn set_lease() -> Weight { // Proof Size summary in bytes: - // Measured: `239` + // Measured: `39` + // Estimated: `1526` + // Minimum execution time: 7_751_000 picoseconds. + Weight::from_parts(8_066_000, 1526) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Broker::Leases` (r:1 w:1) + /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) + fn remove_lease() -> Weight { + // Proof Size summary in bytes: + // Measured: `47` // Estimated: `1526` - // Minimum execution time: 14_966_000 picoseconds. - Weight::from_parts(15_592_000, 1526) + // Minimum execution time: 7_307_000 picoseconds. + Weight::from_parts(7_597_000, 1526) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -149,12 +167,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// The range of component `n` is `[0, 1000]`. fn start_sales(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6330` + // Measured: `6134` // Estimated: `8499` - // Minimum execution time: 31_757_000 picoseconds. - Weight::from_parts(57_977_268, 8499) - // Standard Error: 576 - .saturating_add(Weight::from_parts(3_102, 0).saturating_mul(n.into())) + // Minimum execution time: 28_238_000 picoseconds. + Weight::from_parts(50_117_438, 8499) + // Standard Error: 477 + .saturating_add(Weight::from_parts(2_668, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(16_u64)) } @@ -166,10 +184,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `470` + // Measured: `274` // Estimated: `1542` - // Minimum execution time: 40_469_000 picoseconds. - Weight::from_parts(41_360_000, 1542) + // Minimum execution time: 37_190_000 picoseconds. + Weight::from_parts(38_212_000, 1542) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -185,10 +203,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `588` + // Measured: `392` // Estimated: `4698` - // Minimum execution time: 60_724_000 picoseconds. - Weight::from_parts(63_445_000, 4698) + // Minimum execution time: 61_974_000 picoseconds. + Weight::from_parts(63_595_000, 4698) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -196,10 +214,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 23_734_000 picoseconds. - Weight::from_parts(25_080_000, 3551) + // Minimum execution time: 15_841_000 picoseconds. + Weight::from_parts(16_865_000, 3551) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -207,10 +225,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn partition() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 25_917_000 picoseconds. - Weight::from_parts(26_715_000, 3551) + // Minimum execution time: 17_493_000 picoseconds. + Weight::from_parts(18_105_000, 3551) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -218,10 +236,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn interlace() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 26_764_000 picoseconds. - Weight::from_parts(27_770_000, 3551) + // Minimum execution time: 18_314_000 picoseconds. + Weight::from_parts(18_957_000, 3551) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -235,10 +253,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn assign() -> Weight { // Proof Size summary in bytes: - // Measured: `741` + // Measured: `545` // Estimated: `4681` - // Minimum execution time: 37_617_000 picoseconds. - Weight::from_parts(39_333_000, 4681) + // Minimum execution time: 30_157_000 picoseconds. + Weight::from_parts(31_094_000, 4681) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -254,10 +272,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn pool() -> Weight { // Proof Size summary in bytes: - // Measured: `776` + // Measured: `580` // Estimated: `5996` - // Minimum execution time: 43_168_000 picoseconds. - Weight::from_parts(44_741_000, 5996) + // Minimum execution time: 36_356_000 picoseconds. + Weight::from_parts(37_866_000, 5996) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -270,12 +288,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// The range of component `m` is `[1, 3]`. fn claim_revenue(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `878` + // Measured: `682` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 75_317_000 picoseconds. - Weight::from_parts(76_792_860, 6196) - // Standard Error: 55_267 - .saturating_add(Weight::from_parts(1_878_133, 0).saturating_mul(m.into())) + // Minimum execution time: 70_609_000 picoseconds. + Weight::from_parts(71_711_714, 6196) + // Standard Error: 70_993 + .saturating_add(Weight::from_parts(2_058_402, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -287,8 +305,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 44_248_000 picoseconds. - Weight::from_parts(45_201_000, 3593) + // Minimum execution time: 45_375_000 picoseconds. + Weight::from_parts(45_964_000, 3593) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -298,10 +316,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn drop_region() -> Weight { // Proof Size summary in bytes: - // Measured: `604` + // Measured: `408` // Estimated: `3551` - // Minimum execution time: 39_853_000 picoseconds. - Weight::from_parts(44_136_000, 3551) + // Minimum execution time: 28_944_000 picoseconds. + Weight::from_parts(32_073_000, 3551) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -313,10 +331,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn drop_contribution() -> Weight { // Proof Size summary in bytes: - // Measured: `601` + // Measured: `405` // Estimated: `3533` - // Minimum execution time: 46_452_000 picoseconds. - Weight::from_parts(52_780_000, 3533) + // Minimum execution time: 39_820_000 picoseconds. + Weight::from_parts(42_933_000, 3533) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -330,10 +348,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn drop_history() -> Weight { // Proof Size summary in bytes: - // Measured: `1117` + // Measured: `818` // Estimated: `3593` - // Minimum execution time: 64_905_000 picoseconds. - Weight::from_parts(72_914_000, 3593) + // Minimum execution time: 50_850_000 picoseconds. + Weight::from_parts(53_954_000, 3593) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -343,30 +361,34 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) fn drop_renewal() -> Weight { // Proof Size summary in bytes: - // Measured: `661` + // Measured: `465` // Estimated: `4698` - // Minimum execution time: 38_831_000 picoseconds. - Weight::from_parts(41_420_000, 4698) + // Minimum execution time: 29_553_000 picoseconds. + Weight::from_parts(31_880_000, 4698) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// The range of component `n` is `[0, 1000]`. - fn request_core_count(_n: u32, ) -> Weight { + fn request_core_count(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_595_000 picoseconds. - Weight::from_parts(4_964_606, 0) + // Minimum execution time: 3_894_000 picoseconds. + Weight::from_parts(4_121_686, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(30, 0).saturating_mul(n.into())) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. - fn process_core_count(_n: u32, ) -> Weight { + fn process_core_count(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `404` + // Measured: `208` // Estimated: `1487` - // Minimum execution time: 8_640_000 picoseconds. - Weight::from_parts(9_153_332, 1487) + // Minimum execution time: 5_929_000 picoseconds. + Weight::from_parts(6_256_892, 1487) + // Standard Error: 13 + .saturating_add(Weight::from_parts(45, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -378,10 +400,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `667` + // Measured: `471` // Estimated: `3593` - // Minimum execution time: 40_570_000 picoseconds. - Weight::from_parts(41_402_000, 3593) + // Minimum execution time: 39_680_000 picoseconds. + Weight::from_parts(40_611_000, 3593) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -408,12 +430,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// The range of component `n` is `[0, 1000]`. fn rotate_sale(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `8548` + // Measured: `8126` // Estimated: `38070` - // Minimum execution time: 29_370_000 picoseconds. - Weight::from_parts(334_030_189, 38070) - // Standard Error: 6_912 - .saturating_add(Weight::from_parts(1_268_750, 0).saturating_mul(n.into())) + // Minimum execution time: 22_694_000 picoseconds. + Weight::from_parts(332_268_249, 38070) + // Standard Error: 7_033 + .saturating_add(Weight::from_parts(1_280_706, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(26_u64)) .saturating_add(T::DbWeight::get().writes(34_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) @@ -424,10 +446,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::InstaPoolHistory` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) fn process_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `180` + // Measured: `0` // Estimated: `3493` - // Minimum execution time: 9_005_000 picoseconds. - Weight::from_parts(9_392_000, 3493) + // Minimum execution time: 5_087_000 picoseconds. + Weight::from_parts(5_335_000, 3493) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -437,10 +459,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Workload` (`max_values`: None, `max_size`: Some(1212), added: 3687, mode: `MaxEncodedLen`) fn process_core_schedule() -> Weight { // Proof Size summary in bytes: - // Measured: `1423` + // Measured: `1223` // Estimated: `4681` - // Minimum execution time: 19_043_000 picoseconds. - Weight::from_parts(20_089_000, 4681) + // Minimum execution time: 12_425_000 picoseconds. + Weight::from_parts(12_645_000, 4681) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -448,7 +470,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 149_000 picoseconds. + // Minimum execution time: 150_000 picoseconds. Weight::from_parts(183_000, 0) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) @@ -457,8 +479,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_248_000 picoseconds. - Weight::from_parts(2_425_000, 0) + // Minimum execution time: 1_843_000 picoseconds. + Weight::from_parts(1_956_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Broker::RevenueInbox` (r:0 w:1) @@ -467,8 +489,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_413_000 picoseconds. - Weight::from_parts(2_640_000, 0) + // Minimum execution time: 2_003_000 picoseconds. + Weight::from_parts(2_112_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Broker::Status` (r:1 w:1) @@ -481,10 +503,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::RevenueInbox` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn do_tick_base() -> Weight { // Proof Size summary in bytes: - // Measured: `441` + // Measured: `245` // Estimated: `1516` - // Minimum execution time: 17_083_000 picoseconds. - Weight::from_parts(18_077_000, 1516) + // Minimum execution time: 10_788_000 picoseconds. + Weight::from_parts(11_114_000, 1516) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -498,10 +520,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn force_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `5253` + // Measured: `5073` // Estimated: `7496` - // Minimum execution time: 28_363_000 picoseconds. - Weight::from_parts(29_243_000, 7496) + // Minimum execution time: 27_620_000 picoseconds. + Weight::from_parts(28_574_000, 7496) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -509,10 +531,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) fn swap_leases() -> Weight { // Proof Size summary in bytes: - // Measured: `239` + // Measured: `39` // Estimated: `1526` - // Minimum execution time: 11_620_000 picoseconds. - Weight::from_parts(12_063_000, 1526) + // Minimum execution time: 4_592_000 picoseconds. + Weight::from_parts(4_827_000, 1526) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -532,10 +554,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn enable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `1121` + // Measured: `888` // Estimated: `4698` - // Minimum execution time: 85_270_000 picoseconds. - Weight::from_parts(90_457_000, 4698) + // Minimum execution time: 77_091_000 picoseconds. + Weight::from_parts(79_410_000, 4698) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -543,10 +565,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(101), added: 596, mode: `MaxEncodedLen`) fn disable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `578` + // Measured: `382` // Estimated: `1586` - // Minimum execution time: 22_479_000 picoseconds. - Weight::from_parts(23_687_000, 1586) + // Minimum execution time: 14_367_000 picoseconds. + Weight::from_parts(15_206_000, 1586) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -554,8 +576,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 245_000 picoseconds. - Weight::from_parts(290_000, 0) + // Minimum execution time: 232_000 picoseconds. + Weight::from_parts(257_000, 0) } } @@ -567,18 +589,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_498_000 picoseconds. - Weight::from_parts(2_660_000, 0) + // Minimum execution time: 2_017_000 picoseconds. + Weight::from_parts(2_192_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Broker::Reservations` (r:1 w:1) /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(6011), added: 6506, mode: `MaxEncodedLen`) fn reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `5016` + // Measured: `4816` // Estimated: `7496` - // Minimum execution time: 23_090_000 picoseconds. - Weight::from_parts(23_664_000, 7496) + // Minimum execution time: 15_233_000 picoseconds. + Weight::from_parts(15_913_000, 7496) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -586,10 +608,10 @@ impl WeightInfo for () { /// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(6011), added: 6506, mode: `MaxEncodedLen`) fn unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `6218` + // Measured: `6018` // Estimated: `7496` - // Minimum execution time: 21_782_000 picoseconds. - Weight::from_parts(22_708_000, 7496) + // Minimum execution time: 14_470_000 picoseconds. + Weight::from_parts(14_666_000, 7496) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -597,10 +619,21 @@ impl WeightInfo for () { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) fn set_lease() -> Weight { // Proof Size summary in bytes: - // Measured: `239` + // Measured: `39` // Estimated: `1526` - // Minimum execution time: 14_966_000 picoseconds. - Weight::from_parts(15_592_000, 1526) + // Minimum execution time: 7_751_000 picoseconds. + Weight::from_parts(8_066_000, 1526) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Broker::Leases` (r:1 w:1) + /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) + fn remove_lease() -> Weight { + // Proof Size summary in bytes: + // Measured: `47` + // Estimated: `1526` + // Minimum execution time: 7_307_000 picoseconds. + Weight::from_parts(7_597_000, 1526) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -623,12 +656,12 @@ impl WeightInfo for () { /// The range of component `n` is `[0, 1000]`. fn start_sales(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6330` + // Measured: `6134` // Estimated: `8499` - // Minimum execution time: 31_757_000 picoseconds. - Weight::from_parts(57_977_268, 8499) - // Standard Error: 576 - .saturating_add(Weight::from_parts(3_102, 0).saturating_mul(n.into())) + // Minimum execution time: 28_238_000 picoseconds. + Weight::from_parts(50_117_438, 8499) + // Standard Error: 477 + .saturating_add(Weight::from_parts(2_668, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(16_u64)) } @@ -640,10 +673,10 @@ impl WeightInfo for () { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `470` + // Measured: `274` // Estimated: `1542` - // Minimum execution time: 40_469_000 picoseconds. - Weight::from_parts(41_360_000, 1542) + // Minimum execution time: 37_190_000 picoseconds. + Weight::from_parts(38_212_000, 1542) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -659,10 +692,10 @@ impl WeightInfo for () { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `588` + // Measured: `392` // Estimated: `4698` - // Minimum execution time: 60_724_000 picoseconds. - Weight::from_parts(63_445_000, 4698) + // Minimum execution time: 61_974_000 picoseconds. + Weight::from_parts(63_595_000, 4698) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -670,10 +703,10 @@ impl WeightInfo for () { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 23_734_000 picoseconds. - Weight::from_parts(25_080_000, 3551) + // Minimum execution time: 15_841_000 picoseconds. + Weight::from_parts(16_865_000, 3551) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -681,10 +714,10 @@ impl WeightInfo for () { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn partition() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 25_917_000 picoseconds. - Weight::from_parts(26_715_000, 3551) + // Minimum execution time: 17_493_000 picoseconds. + Weight::from_parts(18_105_000, 3551) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -692,10 +725,10 @@ impl WeightInfo for () { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn interlace() -> Weight { // Proof Size summary in bytes: - // Measured: `496` + // Measured: `300` // Estimated: `3551` - // Minimum execution time: 26_764_000 picoseconds. - Weight::from_parts(27_770_000, 3551) + // Minimum execution time: 18_314_000 picoseconds. + Weight::from_parts(18_957_000, 3551) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -709,10 +742,10 @@ impl WeightInfo for () { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn assign() -> Weight { // Proof Size summary in bytes: - // Measured: `741` + // Measured: `545` // Estimated: `4681` - // Minimum execution time: 37_617_000 picoseconds. - Weight::from_parts(39_333_000, 4681) + // Minimum execution time: 30_157_000 picoseconds. + Weight::from_parts(31_094_000, 4681) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -728,10 +761,10 @@ impl WeightInfo for () { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn pool() -> Weight { // Proof Size summary in bytes: - // Measured: `776` + // Measured: `580` // Estimated: `5996` - // Minimum execution time: 43_168_000 picoseconds. - Weight::from_parts(44_741_000, 5996) + // Minimum execution time: 36_356_000 picoseconds. + Weight::from_parts(37_866_000, 5996) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -744,12 +777,12 @@ impl WeightInfo for () { /// The range of component `m` is `[1, 3]`. fn claim_revenue(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `878` + // Measured: `682` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 75_317_000 picoseconds. - Weight::from_parts(76_792_860, 6196) - // Standard Error: 55_267 - .saturating_add(Weight::from_parts(1_878_133, 0).saturating_mul(m.into())) + // Minimum execution time: 70_609_000 picoseconds. + Weight::from_parts(71_711_714, 6196) + // Standard Error: 70_993 + .saturating_add(Weight::from_parts(2_058_402, 0).saturating_mul(m.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(RocksDbWeight::get().writes(5_u64)) @@ -761,8 +794,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 44_248_000 picoseconds. - Weight::from_parts(45_201_000, 3593) + // Minimum execution time: 45_375_000 picoseconds. + Weight::from_parts(45_964_000, 3593) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -772,10 +805,10 @@ impl WeightInfo for () { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) fn drop_region() -> Weight { // Proof Size summary in bytes: - // Measured: `604` + // Measured: `408` // Estimated: `3551` - // Minimum execution time: 39_853_000 picoseconds. - Weight::from_parts(44_136_000, 3551) + // Minimum execution time: 28_944_000 picoseconds. + Weight::from_parts(32_073_000, 3551) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -787,10 +820,10 @@ impl WeightInfo for () { /// Proof: `Broker::InstaPoolContribution` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn drop_contribution() -> Weight { // Proof Size summary in bytes: - // Measured: `601` + // Measured: `405` // Estimated: `3533` - // Minimum execution time: 46_452_000 picoseconds. - Weight::from_parts(52_780_000, 3533) + // Minimum execution time: 39_820_000 picoseconds. + Weight::from_parts(42_933_000, 3533) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -804,10 +837,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn drop_history() -> Weight { // Proof Size summary in bytes: - // Measured: `1117` + // Measured: `818` // Estimated: `3593` - // Minimum execution time: 64_905_000 picoseconds. - Weight::from_parts(72_914_000, 3593) + // Minimum execution time: 50_850_000 picoseconds. + Weight::from_parts(53_954_000, 3593) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -817,30 +850,34 @@ impl WeightInfo for () { /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) fn drop_renewal() -> Weight { // Proof Size summary in bytes: - // Measured: `661` + // Measured: `465` // Estimated: `4698` - // Minimum execution time: 38_831_000 picoseconds. - Weight::from_parts(41_420_000, 4698) + // Minimum execution time: 29_553_000 picoseconds. + Weight::from_parts(31_880_000, 4698) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// The range of component `n` is `[0, 1000]`. - fn request_core_count(_n: u32, ) -> Weight { + fn request_core_count(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_595_000 picoseconds. - Weight::from_parts(4_964_606, 0) + // Minimum execution time: 3_894_000 picoseconds. + Weight::from_parts(4_121_686, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(30, 0).saturating_mul(n.into())) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. - fn process_core_count(_n: u32, ) -> Weight { + fn process_core_count(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `404` + // Measured: `208` // Estimated: `1487` - // Minimum execution time: 8_640_000 picoseconds. - Weight::from_parts(9_153_332, 1487) + // Minimum execution time: 5_929_000 picoseconds. + Weight::from_parts(6_256_892, 1487) + // Standard Error: 13 + .saturating_add(Weight::from_parts(45, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -852,10 +889,10 @@ impl WeightInfo for () { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `667` + // Measured: `471` // Estimated: `3593` - // Minimum execution time: 40_570_000 picoseconds. - Weight::from_parts(41_402_000, 3593) + // Minimum execution time: 39_680_000 picoseconds. + Weight::from_parts(40_611_000, 3593) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -882,12 +919,12 @@ impl WeightInfo for () { /// The range of component `n` is `[0, 1000]`. fn rotate_sale(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `8548` + // Measured: `8126` // Estimated: `38070` - // Minimum execution time: 29_370_000 picoseconds. - Weight::from_parts(334_030_189, 38070) - // Standard Error: 6_912 - .saturating_add(Weight::from_parts(1_268_750, 0).saturating_mul(n.into())) + // Minimum execution time: 22_694_000 picoseconds. + Weight::from_parts(332_268_249, 38070) + // Standard Error: 7_033 + .saturating_add(Weight::from_parts(1_280_706, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(26_u64)) .saturating_add(RocksDbWeight::get().writes(34_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into()))) @@ -898,10 +935,10 @@ impl WeightInfo for () { /// Proof: `Broker::InstaPoolHistory` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) fn process_pool() -> Weight { // Proof Size summary in bytes: - // Measured: `180` + // Measured: `0` // Estimated: `3493` - // Minimum execution time: 9_005_000 picoseconds. - Weight::from_parts(9_392_000, 3493) + // Minimum execution time: 5_087_000 picoseconds. + Weight::from_parts(5_335_000, 3493) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -911,10 +948,10 @@ impl WeightInfo for () { /// Proof: `Broker::Workload` (`max_values`: None, `max_size`: Some(1212), added: 3687, mode: `MaxEncodedLen`) fn process_core_schedule() -> Weight { // Proof Size summary in bytes: - // Measured: `1423` + // Measured: `1223` // Estimated: `4681` - // Minimum execution time: 19_043_000 picoseconds. - Weight::from_parts(20_089_000, 4681) + // Minimum execution time: 12_425_000 picoseconds. + Weight::from_parts(12_645_000, 4681) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -922,7 +959,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 149_000 picoseconds. + // Minimum execution time: 150_000 picoseconds. Weight::from_parts(183_000, 0) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) @@ -931,8 +968,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_248_000 picoseconds. - Weight::from_parts(2_425_000, 0) + // Minimum execution time: 1_843_000 picoseconds. + Weight::from_parts(1_956_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Broker::RevenueInbox` (r:0 w:1) @@ -941,8 +978,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_413_000 picoseconds. - Weight::from_parts(2_640_000, 0) + // Minimum execution time: 2_003_000 picoseconds. + Weight::from_parts(2_112_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Broker::Status` (r:1 w:1) @@ -955,10 +992,10 @@ impl WeightInfo for () { /// Proof: `Broker::RevenueInbox` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn do_tick_base() -> Weight { // Proof Size summary in bytes: - // Measured: `441` + // Measured: `245` // Estimated: `1516` - // Minimum execution time: 17_083_000 picoseconds. - Weight::from_parts(18_077_000, 1516) + // Minimum execution time: 10_788_000 picoseconds. + Weight::from_parts(11_114_000, 1516) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -972,10 +1009,10 @@ impl WeightInfo for () { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn force_reserve() -> Weight { // Proof Size summary in bytes: - // Measured: `5253` + // Measured: `5073` // Estimated: `7496` - // Minimum execution time: 28_363_000 picoseconds. - Weight::from_parts(29_243_000, 7496) + // Minimum execution time: 27_620_000 picoseconds. + Weight::from_parts(28_574_000, 7496) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -983,10 +1020,10 @@ impl WeightInfo for () { /// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`) fn swap_leases() -> Weight { // Proof Size summary in bytes: - // Measured: `239` + // Measured: `39` // Estimated: `1526` - // Minimum execution time: 11_620_000 picoseconds. - Weight::from_parts(12_063_000, 1526) + // Minimum execution time: 4_592_000 picoseconds. + Weight::from_parts(4_827_000, 1526) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1006,10 +1043,10 @@ impl WeightInfo for () { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn enable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `1121` + // Measured: `888` // Estimated: `4698` - // Minimum execution time: 85_270_000 picoseconds. - Weight::from_parts(90_457_000, 4698) + // Minimum execution time: 77_091_000 picoseconds. + Weight::from_parts(79_410_000, 4698) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1017,10 +1054,10 @@ impl WeightInfo for () { /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(101), added: 596, mode: `MaxEncodedLen`) fn disable_auto_renew() -> Weight { // Proof Size summary in bytes: - // Measured: `578` + // Measured: `382` // Estimated: `1586` - // Minimum execution time: 22_479_000 picoseconds. - Weight::from_parts(23_687_000, 1586) + // Minimum execution time: 14_367_000 picoseconds. + Weight::from_parts(15_206_000, 1586) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1028,7 +1065,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 245_000 picoseconds. - Weight::from_parts(290_000, 0) + // Minimum execution time: 232_000 picoseconds. + Weight::from_parts(257_000, 0) } } -- GitLab