Update benchmarking macros (#3934)

Current benchmarking macro returns a closure with the captured
benchmarked code.
This can cause issues when the benchmarked code has complex lifetime
requirements.

This PR updates the existing macro by injecting the recording parameter
and invoking the start / stop method around the benchmarked block
instead of returning a closure

One other added benefit is that you can write this kind of code now as
well:

```rust
let v;
#[block]
{ v = func.call(); }
dbg!(v); // or assert something on v
```


[Weights compare
link](https://weights.tasty.limo/compare?unit=weight&ignore_errors=true&threshold=10&method=asymptotic&repo=polkadot-sdk&old=pg/fix-weights&new=pg/bench_update&path_pattern=substrate/frame/**/src/weights.rs,polkadot/runtime/*/src/weights/**/*.rs,polkadot/bridges/modules/*/src/weights.rs,cumulus/**/weights/*.rs,cumulus/**/weights/xcm/*.rs,cumulus/**/src/weights.rs)

---------

Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
PG Herveou
2024-04-10 08:44:46 +02:00
committed by GitHub
parent ddb53c87f5
commit d38f6e6728
65 changed files with 11402 additions and 10551 deletions
+141 -136
View File
@@ -18,30 +18,27 @@
//! Autogenerated weights for `pallet_nomination_pools`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-03-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-p5qp1txx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-anb7yjbi-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
// Executed Command:
// target/production/substrate-node
// target/production/substrate-node
// ./target/production/substrate-node
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_nomination_pools
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_nomination_pools
// --chain=dev
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_nomination_pools
// --chain=dev
// --output=./substrate/frame/nomination-pools/src/weights.rs
// --header=./substrate/HEADER-APACHE2
// --output=./substrate/frame/nomination-pools/src/weights.rs
// --output=./substrate/frame/nomination-pools/src/weights.rs
// --template=./substrate/.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -117,8 +114,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `3425`
// Estimated: `8877`
// Minimum execution time: 182_643_000 picoseconds.
Weight::from_parts(186_106_000, 8877)
// Minimum execution time: 201_783_000 picoseconds.
Weight::from_parts(206_014_000, 8877)
.saturating_add(T::DbWeight::get().reads(20_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
@@ -150,8 +147,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `3435`
// Estimated: `8877`
// Minimum execution time: 181_464_000 picoseconds.
Weight::from_parts(184_672_000, 8877)
// Minimum execution time: 204_124_000 picoseconds.
Weight::from_parts(207_910_000, 8877)
.saturating_add(T::DbWeight::get().reads(17_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
@@ -185,8 +182,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `3500`
// Estimated: `8877`
// Minimum execution time: 216_182_000 picoseconds.
Weight::from_parts(218_448_000, 8877)
// Minimum execution time: 240_342_000 picoseconds.
Weight::from_parts(245_735_000, 8877)
.saturating_add(T::DbWeight::get().reads(18_u64))
.saturating_add(T::DbWeight::get().writes(14_u64))
}
@@ -206,8 +203,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1172`
// Estimated: `3719`
// Minimum execution time: 73_830_000 picoseconds.
Weight::from_parts(75_271_000, 3719)
// Minimum execution time: 81_054_000 picoseconds.
Weight::from_parts(83_324_000, 3719)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -247,8 +244,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `3622`
// Estimated: `27847`
// Minimum execution time: 166_099_000 picoseconds.
Weight::from_parts(170_355_000, 27847)
// Minimum execution time: 188_835_000 picoseconds.
Weight::from_parts(192_565_000, 27847)
.saturating_add(T::DbWeight::get().reads(20_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
@@ -264,17 +261,19 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1817`
// Measured: `1848`
// Estimated: `4764`
// Minimum execution time: 64_787_000 picoseconds.
Weight::from_parts(67_920_914, 4764)
// Standard Error: 1_482
.saturating_add(Weight::from_parts(43_264, 0).saturating_mul(s.into()))
// Minimum execution time: 73_556_000 picoseconds.
Weight::from_parts(76_075_881, 4764)
// Standard Error: 1_419
.saturating_add(Weight::from_parts(54_476, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(8_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
@@ -296,6 +295,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
@@ -305,12 +306,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2207`
// Measured: `2238`
// Estimated: `27847`
// Minimum execution time: 124_990_000 picoseconds.
Weight::from_parts(129_041_398, 27847)
// Standard Error: 2_335
.saturating_add(Weight::from_parts(67_889, 0).saturating_mul(s.into()))
// Minimum execution time: 144_177_000 picoseconds.
Weight::from_parts(148_686_524, 27847)
// Standard Error: 2_475
.saturating_add(Weight::from_parts(77_460, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(12_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
@@ -338,12 +339,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
@@ -365,10 +366,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2525`
// Estimated: `27847`
// Minimum execution time: 221_955_000 picoseconds.
Weight::from_parts(230_244_437, 27847)
// Standard Error: 4_059
.saturating_add(Weight::from_parts(7_522, 0).saturating_mul(s.into()))
// Minimum execution time: 255_957_000 picoseconds.
Weight::from_parts(264_206_788, 27847)
// Standard Error: 4_229
.saturating_add(Weight::from_parts(3_064, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(24_u64))
.saturating_add(T::DbWeight::get().writes(20_u64))
}
@@ -396,6 +397,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:2 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:2 w:1)
@@ -412,17 +415,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:0 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `1169`
// Measured: `1284`
// Estimated: `8538`
// Minimum execution time: 165_358_000 picoseconds.
Weight::from_parts(169_683_000, 8538)
.saturating_add(T::DbWeight::get().reads(23_u64))
// Minimum execution time: 193_527_000 picoseconds.
Weight::from_parts(197_140_000, 8538)
.saturating_add(T::DbWeight::get().reads(24_u64))
.saturating_add(T::DbWeight::get().writes(17_u64))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
@@ -460,10 +461,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1976`
// Estimated: `4556 + n * (2520 ±0)`
// Minimum execution time: 74_483_000 picoseconds.
Weight::from_parts(76_611_288, 4556)
// Standard Error: 9_013
.saturating_add(Weight::from_parts(1_475_128, 0).saturating_mul(n.into()))
// Minimum execution time: 86_054_000 picoseconds.
Weight::from_parts(88_743_932, 4556)
// Standard Error: 12_699
.saturating_add(Weight::from_parts(1_829_097, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(5_u64))
@@ -479,8 +480,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1434`
// Estimated: `4556`
// Minimum execution time: 32_598_000 picoseconds.
Weight::from_parts(33_350_000, 4556)
// Minimum execution time: 34_544_000 picoseconds.
Weight::from_parts(35_910_000, 4556)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -495,10 +496,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3735`
// Minimum execution time: 13_705_000 picoseconds.
Weight::from_parts(14_594_211, 3735)
// Standard Error: 141
.saturating_add(Weight::from_parts(2_119, 0).saturating_mul(n.into()))
// Minimum execution time: 14_111_000 picoseconds.
Weight::from_parts(15_204_218, 3735)
// Standard Error: 226
.saturating_add(Weight::from_parts(1_291, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -518,8 +519,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_222_000 picoseconds.
Weight::from_parts(4_527_000, 0)
// Minimum execution time: 4_524_000 picoseconds.
Weight::from_parts(4_882_000, 0)
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
@@ -528,8 +529,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_106_000 picoseconds.
Weight::from_parts(17_365_000, 3719)
// Minimum execution time: 17_975_000 picoseconds.
Weight::from_parts(18_549_000, 3719)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -559,8 +560,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2143`
// Estimated: `4556`
// Minimum execution time: 71_301_000 picoseconds.
Weight::from_parts(73_626_000, 4556)
// Minimum execution time: 81_574_000 picoseconds.
Weight::from_parts(83_519_000, 4556)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
@@ -576,8 +577,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `804`
// Estimated: `3719`
// Minimum execution time: 32_363_000 picoseconds.
Weight::from_parts(33_400_000, 3719)
// Minimum execution time: 35_015_000 picoseconds.
Weight::from_parts(36_159_000, 3719)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -589,8 +590,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `572`
// Estimated: `3719`
// Minimum execution time: 16_686_000 picoseconds.
Weight::from_parts(17_294_000, 3719)
// Minimum execution time: 17_775_000 picoseconds.
Weight::from_parts(18_358_000, 3719)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -600,8 +601,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_417_000 picoseconds.
Weight::from_parts(17_028_000, 3719)
// Minimum execution time: 16_997_000 picoseconds.
Weight::from_parts(18_041_000, 3719)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -611,8 +612,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_350_000 picoseconds.
Weight::from_parts(16_905_000, 3719)
// Minimum execution time: 17_000_000 picoseconds.
Weight::from_parts(17_807_000, 3719)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -624,8 +625,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `542`
// Estimated: `3702`
// Minimum execution time: 14_081_000 picoseconds.
Weight::from_parts(14_608_000, 3702)
// Minimum execution time: 14_803_000 picoseconds.
Weight::from_parts(15_401_000, 3702)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -641,8 +642,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `1002`
// Estimated: `3719`
// Minimum execution time: 62_178_000 picoseconds.
Weight::from_parts(64_039_000, 3719)
// Minimum execution time: 69_759_000 picoseconds.
Weight::from_parts(71_985_000, 3719)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -658,8 +659,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `901`
// Estimated: `4764`
// Minimum execution time: 64_880_000 picoseconds.
Weight::from_parts(66_541_000, 4764)
// Minimum execution time: 73_829_000 picoseconds.
Weight::from_parts(75_966_000, 4764)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -703,8 +704,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `3425`
// Estimated: `8877`
// Minimum execution time: 182_643_000 picoseconds.
Weight::from_parts(186_106_000, 8877)
// Minimum execution time: 201_783_000 picoseconds.
Weight::from_parts(206_014_000, 8877)
.saturating_add(RocksDbWeight::get().reads(20_u64))
.saturating_add(RocksDbWeight::get().writes(13_u64))
}
@@ -736,8 +737,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `3435`
// Estimated: `8877`
// Minimum execution time: 181_464_000 picoseconds.
Weight::from_parts(184_672_000, 8877)
// Minimum execution time: 204_124_000 picoseconds.
Weight::from_parts(207_910_000, 8877)
.saturating_add(RocksDbWeight::get().reads(17_u64))
.saturating_add(RocksDbWeight::get().writes(13_u64))
}
@@ -771,8 +772,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `3500`
// Estimated: `8877`
// Minimum execution time: 216_182_000 picoseconds.
Weight::from_parts(218_448_000, 8877)
// Minimum execution time: 240_342_000 picoseconds.
Weight::from_parts(245_735_000, 8877)
.saturating_add(RocksDbWeight::get().reads(18_u64))
.saturating_add(RocksDbWeight::get().writes(14_u64))
}
@@ -792,8 +793,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1172`
// Estimated: `3719`
// Minimum execution time: 73_830_000 picoseconds.
Weight::from_parts(75_271_000, 3719)
// Minimum execution time: 81_054_000 picoseconds.
Weight::from_parts(83_324_000, 3719)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -833,8 +834,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `3622`
// Estimated: `27847`
// Minimum execution time: 166_099_000 picoseconds.
Weight::from_parts(170_355_000, 27847)
// Minimum execution time: 188_835_000 picoseconds.
Weight::from_parts(192_565_000, 27847)
.saturating_add(RocksDbWeight::get().reads(20_u64))
.saturating_add(RocksDbWeight::get().writes(13_u64))
}
@@ -850,17 +851,19 @@ impl WeightInfo for () {
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:1 w:0)
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 100]`.
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1817`
// Measured: `1848`
// Estimated: `4764`
// Minimum execution time: 64_787_000 picoseconds.
Weight::from_parts(67_920_914, 4764)
// Standard Error: 1_482
.saturating_add(Weight::from_parts(43_264, 0).saturating_mul(s.into()))
// Minimum execution time: 73_556_000 picoseconds.
Weight::from_parts(76_075_881, 4764)
// Standard Error: 1_419
.saturating_add(Weight::from_parts(54_476, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(8_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
@@ -882,6 +885,8 @@ impl WeightInfo for () {
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:0)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
@@ -891,12 +896,12 @@ impl WeightInfo for () {
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2207`
// Measured: `2238`
// Estimated: `27847`
// Minimum execution time: 124_990_000 picoseconds.
Weight::from_parts(129_041_398, 27847)
// Standard Error: 2_335
.saturating_add(Weight::from_parts(67_889, 0).saturating_mul(s.into()))
// Minimum execution time: 144_177_000 picoseconds.
Weight::from_parts(148_686_524, 27847)
// Standard Error: 2_475
.saturating_add(Weight::from_parts(77_460, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(12_u64))
.saturating_add(RocksDbWeight::get().writes(9_u64))
}
@@ -924,12 +929,12 @@ impl WeightInfo for () {
/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `Staking::Nominators` (r:1 w:0)
/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::TotalValueLocked` (r:1 w:1)
/// Proof: `NominationPools::TotalValueLocked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForPoolMembers` (r:1 w:1)
/// Proof: `NominationPools::CounterForPoolMembers` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::ReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::ReversePoolIdLookup` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::CounterForReversePoolIdLookup` (r:1 w:1)
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::RewardPools` (r:1 w:1)
@@ -951,10 +956,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2525`
// Estimated: `27847`
// Minimum execution time: 221_955_000 picoseconds.
Weight::from_parts(230_244_437, 27847)
// Standard Error: 4_059
.saturating_add(Weight::from_parts(7_522, 0).saturating_mul(s.into()))
// Minimum execution time: 255_957_000 picoseconds.
Weight::from_parts(264_206_788, 27847)
// Standard Error: 4_229
.saturating_add(Weight::from_parts(3_064, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(24_u64))
.saturating_add(RocksDbWeight::get().writes(20_u64))
}
@@ -982,6 +987,8 @@ impl WeightInfo for () {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Staking::Bonded` (r:1 w:1)
/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:1 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Locks` (r:2 w:1)
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
/// Storage: `Balances::Freezes` (r:2 w:1)
@@ -998,17 +1005,15 @@ impl WeightInfo for () {
/// Proof: `NominationPools::CounterForReversePoolIdLookup` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
/// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`)
/// Storage: `Staking::Ledger` (r:0 w:1)
/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
/// Storage: `Staking::Payee` (r:0 w:1)
/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `1169`
// Measured: `1284`
// Estimated: `8538`
// Minimum execution time: 165_358_000 picoseconds.
Weight::from_parts(169_683_000, 8538)
.saturating_add(RocksDbWeight::get().reads(23_u64))
// Minimum execution time: 193_527_000 picoseconds.
Weight::from_parts(197_140_000, 8538)
.saturating_add(RocksDbWeight::get().reads(24_u64))
.saturating_add(RocksDbWeight::get().writes(17_u64))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:0)
@@ -1046,10 +1051,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1976`
// Estimated: `4556 + n * (2520 ±0)`
// Minimum execution time: 74_483_000 picoseconds.
Weight::from_parts(76_611_288, 4556)
// Standard Error: 9_013
.saturating_add(Weight::from_parts(1_475_128, 0).saturating_mul(n.into()))
// Minimum execution time: 86_054_000 picoseconds.
Weight::from_parts(88_743_932, 4556)
// Standard Error: 12_699
.saturating_add(Weight::from_parts(1_829_097, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(15_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(RocksDbWeight::get().writes(5_u64))
@@ -1065,8 +1070,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1434`
// Estimated: `4556`
// Minimum execution time: 32_598_000 picoseconds.
Weight::from_parts(33_350_000, 4556)
// Minimum execution time: 34_544_000 picoseconds.
Weight::from_parts(35_910_000, 4556)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1081,10 +1086,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3735`
// Minimum execution time: 13_705_000 picoseconds.
Weight::from_parts(14_594_211, 3735)
// Standard Error: 141
.saturating_add(Weight::from_parts(2_119, 0).saturating_mul(n.into()))
// Minimum execution time: 14_111_000 picoseconds.
Weight::from_parts(15_204_218, 3735)
// Standard Error: 226
.saturating_add(Weight::from_parts(1_291, 0).saturating_mul(n.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1104,8 +1109,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_222_000 picoseconds.
Weight::from_parts(4_527_000, 0)
// Minimum execution time: 4_524_000 picoseconds.
Weight::from_parts(4_882_000, 0)
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: `NominationPools::BondedPools` (r:1 w:1)
@@ -1114,8 +1119,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_106_000 picoseconds.
Weight::from_parts(17_365_000, 3719)
// Minimum execution time: 17_975_000 picoseconds.
Weight::from_parts(18_549_000, 3719)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1145,8 +1150,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2143`
// Estimated: `4556`
// Minimum execution time: 71_301_000 picoseconds.
Weight::from_parts(73_626_000, 4556)
// Minimum execution time: 81_574_000 picoseconds.
Weight::from_parts(83_519_000, 4556)
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
@@ -1162,8 +1167,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `804`
// Estimated: `3719`
// Minimum execution time: 32_363_000 picoseconds.
Weight::from_parts(33_400_000, 3719)
// Minimum execution time: 35_015_000 picoseconds.
Weight::from_parts(36_159_000, 3719)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1175,8 +1180,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `572`
// Estimated: `3719`
// Minimum execution time: 16_686_000 picoseconds.
Weight::from_parts(17_294_000, 3719)
// Minimum execution time: 17_775_000 picoseconds.
Weight::from_parts(18_358_000, 3719)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1186,8 +1191,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_417_000 picoseconds.
Weight::from_parts(17_028_000, 3719)
// Minimum execution time: 16_997_000 picoseconds.
Weight::from_parts(18_041_000, 3719)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1197,8 +1202,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `532`
// Estimated: `3719`
// Minimum execution time: 16_350_000 picoseconds.
Weight::from_parts(16_905_000, 3719)
// Minimum execution time: 17_000_000 picoseconds.
Weight::from_parts(17_807_000, 3719)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1210,8 +1215,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `542`
// Estimated: `3702`
// Minimum execution time: 14_081_000 picoseconds.
Weight::from_parts(14_608_000, 3702)
// Minimum execution time: 14_803_000 picoseconds.
Weight::from_parts(15_401_000, 3702)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -1227,8 +1232,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1002`
// Estimated: `3719`
// Minimum execution time: 62_178_000 picoseconds.
Weight::from_parts(64_039_000, 3719)
// Minimum execution time: 69_759_000 picoseconds.
Weight::from_parts(71_985_000, 3719)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -1244,8 +1249,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `901`
// Estimated: `4764`
// Minimum execution time: 64_880_000 picoseconds.
Weight::from_parts(66_541_000, 4764)
// Minimum execution time: 73_829_000 picoseconds.
Weight::from_parts(75_966_000, 4764)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}