From adccdd500bdb0b48734338fb5156ecf9b3ee69e8 Mon Sep 17 00:00:00 2001
From: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Date: Wed, 26 Oct 2022 23:08:30 +0200
Subject: [PATCH] Update `pallet-multisig` benches (#12558)

* Typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig

* remove functions

* ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
---
 substrate/frame/multisig/src/lib.rs           |   2 -
 substrate/frame/multisig/src/weights.rs       | 249 ++++++++----------
 .../frame/transaction-payment/src/lib.rs      |   2 +-
 substrate/frame/utility/src/lib.rs            |   2 +-
 4 files changed, 110 insertions(+), 145 deletions(-)

diff --git a/substrate/frame/multisig/src/lib.rs b/substrate/frame/multisig/src/lib.rs
index 34d9124f9b6..ae4efb76335 100644
--- a/substrate/frame/multisig/src/lib.rs
+++ b/substrate/frame/multisig/src/lib.rs
@@ -370,7 +370,6 @@ pub mod pallet {
 			let z = call.using_encoded(|d| d.len()) as u32;
 
 			T::WeightInfo::as_multi_create(s, z)
-			.max(T::WeightInfo::as_multi_create_store(s, z))
 			.max(T::WeightInfo::as_multi_approve(s, z))
 			.max(T::WeightInfo::as_multi_complete(s, z))
 			.saturating_add(*max_weight)
@@ -434,7 +433,6 @@ pub mod pallet {
 
 			T::WeightInfo::approve_as_multi_create(s)
 				.max(T::WeightInfo::approve_as_multi_approve(s))
-				.max(T::WeightInfo::approve_as_multi_complete(s))
 				.saturating_add(*max_weight)
 		})]
 		pub fn approve_as_multi(
diff --git a/substrate/frame/multisig/src/weights.rs b/substrate/frame/multisig/src/weights.rs
index d8d57677540..de403b4d249 100644
--- a/substrate/frame/multisig/src/weights.rs
+++ b/substrate/frame/multisig/src/weights.rs
@@ -7,7 +7,7 @@
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-// http://www.apache.org/licenses/LICENSE-2.0
+// 	http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,22 +18,26 @@
 //! Autogenerated weights for pallet_multisig
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2022-10-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
 //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
 
 // Executed Command:
-// ./target/production/substrate
+// /home/benchbot/cargo_target_dir/production/substrate
 // benchmark
 // pallet
-// --chain=dev
 // --steps=50
 // --repeat=20
-// --pallet=pallet_multisig
 // --extrinsic=*
 // --execution=wasm
 // --wasm-execution=compiled
-// --template=./.maintain/frame-weight-template.hbs
+// --heap-pages=4096
+// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json
+// --pallet=pallet_multisig
+// --chain=dev
+// --header=./HEADER-APACHE2
 // --output=./frame/multisig/src/weights.rs
+// --template=./.maintain/frame-weight-template.hbs
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
@@ -46,213 +50,176 @@ use sp_std::marker::PhantomData;
 pub trait WeightInfo {
 	fn as_multi_threshold_1(z: u32, ) -> Weight;
 	fn as_multi_create(s: u32, z: u32, ) -> Weight;
-	fn as_multi_create_store(s: u32, z: u32, ) -> Weight;
 	fn as_multi_approve(s: u32, z: u32, ) -> Weight;
-	fn as_multi_approve_store(s: u32, z: u32, ) -> Weight;
 	fn as_multi_complete(s: u32, z: u32, ) -> Weight;
 	fn approve_as_multi_create(s: u32, ) -> Weight;
 	fn approve_as_multi_approve(s: u32, ) -> Weight;
-	fn approve_as_multi_complete(s: u32, ) -> Weight;
 	fn cancel_as_multi(s: u32, ) -> Weight;
 }
 
 /// Weights for pallet_multisig using the Substrate node and recommended hardware.
 pub struct SubstrateWeight<T>(PhantomData<T>);
 impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
-	fn as_multi_threshold_1(_z: u32, ) -> Weight {
-		Weight::from_ref_time(17_537_000 as u64)
+	/// The range of component `z` is `[0, 10000]`.
+	fn as_multi_threshold_1(z: u32, ) -> Weight {
+		// Minimum execution time: 20_283 nanoseconds.
+		Weight::from_ref_time(20_861_089 as u64)
+			// Standard Error: 5
+			.saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
 	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_create(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(36_535_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
+		// Minimum execution time: 52_699 nanoseconds.
+		Weight::from_ref_time(40_874_603 as u64)
+			// Standard Error: 546
+			.saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64))
+			// Standard Error: 5
+			.saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64))
 			.saturating_add(T::DbWeight::get().reads(2 as u64))
 			.saturating_add(T::DbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
-	fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(39_918_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(T::DbWeight::get().reads(3 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
+	/// The range of component `s` is `[3, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_approve(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(25_524_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
+		// Minimum execution time: 39_843 nanoseconds.
+		Weight::from_ref_time(28_912_325 as u64)
+			// Standard Error: 734
+			.saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64))
+			// Standard Error: 7
+			.saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64))
 			.saturating_add(T::DbWeight::get().reads(1 as u64))
 			.saturating_add(T::DbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(39_923_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
 	// Storage: System Account (r:1 w:1)
+	/// The range of component `s` is `[2, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_complete(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(45_877_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(T::DbWeight::get().reads(3 as u64))
-			.saturating_add(T::DbWeight::get().writes(3 as u64))
+		// Minimum execution time: 54_980 nanoseconds.
+		Weight::from_ref_time(42_087_213 as u64)
+			// Standard Error: 786
+			.saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64))
+			// Standard Error: 7
+			.saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64))
+			.saturating_add(T::DbWeight::get().reads(2 as u64))
+			.saturating_add(T::DbWeight::get().writes(2 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
 	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
 	fn approve_as_multi_create(s: u32, ) -> Weight {
-		Weight::from_ref_time(34_309_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
+		// Minimum execution time: 37_802 nanoseconds.
+		Weight::from_ref_time(39_933_623 as u64)
+			// Standard Error: 1_059
+			.saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64))
 			.saturating_add(T::DbWeight::get().reads(2 as u64))
 			.saturating_add(T::DbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
 	fn approve_as_multi_approve(s: u32, ) -> Weight {
-		Weight::from_ref_time(22_848_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
+		// Minimum execution time: 25_738 nanoseconds.
+		Weight::from_ref_time(27_676_766 as u64)
+			// Standard Error: 710
+			.saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64))
 			.saturating_add(T::DbWeight::get().reads(1 as u64))
 			.saturating_add(T::DbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	// Storage: System Account (r:1 w:1)
-	fn approve_as_multi_complete(s: u32, ) -> Weight {
-		Weight::from_ref_time(63_239_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(3 as u64))
-			.saturating_add(T::DbWeight::get().writes(3 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
+	/// The range of component `s` is `[2, 100]`.
 	fn cancel_as_multi(s: u32, ) -> Weight {
-		Weight::from_ref_time(51_254_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
+		// Minimum execution time: 36_591 nanoseconds.
+		Weight::from_ref_time(38_707_543 as u64)
+			// Standard Error: 881
+			.saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64))
+			.saturating_add(T::DbWeight::get().reads(1 as u64))
+			.saturating_add(T::DbWeight::get().writes(1 as u64))
 	}
 }
 
 // For backwards compatibility and tests
 impl WeightInfo for () {
-	fn as_multi_threshold_1(_z: u32, ) -> Weight {
-		Weight::from_ref_time(17_537_000 as u64)
+	/// The range of component `z` is `[0, 10000]`.
+	fn as_multi_threshold_1(z: u32, ) -> Weight {
+		// Minimum execution time: 20_283 nanoseconds.
+		Weight::from_ref_time(20_861_089 as u64)
+			// Standard Error: 5
+			.saturating_add(Weight::from_ref_time(583 as u64).saturating_mul(z as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
 	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_create(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(36_535_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(99_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
+		// Minimum execution time: 52_699 nanoseconds.
+		Weight::from_ref_time(40_874_603 as u64)
+			// Standard Error: 546
+			.saturating_add(Weight::from_ref_time(131_727 as u64).saturating_mul(s as u64))
+			// Standard Error: 5
+			.saturating_add(Weight::from_ref_time(1_537 as u64).saturating_mul(z as u64))
 			.saturating_add(RocksDbWeight::get().reads(2 as u64))
 			.saturating_add(RocksDbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
-	fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(39_918_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(95_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(RocksDbWeight::get().reads(3 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
+	/// The range of component `s` is `[3, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_approve(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(25_524_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(94_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(z as u64))
+		// Minimum execution time: 39_843 nanoseconds.
+		Weight::from_ref_time(28_912_325 as u64)
+			// Standard Error: 734
+			.saturating_add(Weight::from_ref_time(125_761 as u64).saturating_mul(s as u64))
+			// Standard Error: 7
+			.saturating_add(Weight::from_ref_time(1_542 as u64).saturating_mul(z as u64))
 			.saturating_add(RocksDbWeight::get().reads(1 as u64))
 			.saturating_add(RocksDbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(39_923_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(91_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
 	// Storage: System Account (r:1 w:1)
+	/// The range of component `s` is `[2, 100]`.
+	/// The range of component `z` is `[0, 10000]`.
 	fn as_multi_complete(s: u32, z: u32, ) -> Weight {
-		Weight::from_ref_time(45_877_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(146_000 as u64).saturating_mul(s as u64))
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(z as u64))
-			.saturating_add(RocksDbWeight::get().reads(3 as u64))
-			.saturating_add(RocksDbWeight::get().writes(3 as u64))
+		// Minimum execution time: 54_980 nanoseconds.
+		Weight::from_ref_time(42_087_213 as u64)
+			// Standard Error: 786
+			.saturating_add(Weight::from_ref_time(153_935 as u64).saturating_mul(s as u64))
+			// Standard Error: 7
+			.saturating_add(Weight::from_ref_time(1_545 as u64).saturating_mul(z as u64))
+			.saturating_add(RocksDbWeight::get().reads(2 as u64))
+			.saturating_add(RocksDbWeight::get().writes(2 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
 	// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
 	fn approve_as_multi_create(s: u32, ) -> Weight {
-		Weight::from_ref_time(34_309_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
+		// Minimum execution time: 37_802 nanoseconds.
+		Weight::from_ref_time(39_933_623 as u64)
+			// Standard Error: 1_059
+			.saturating_add(Weight::from_ref_time(121_891 as u64).saturating_mul(s as u64))
 			.saturating_add(RocksDbWeight::get().reads(2 as u64))
 			.saturating_add(RocksDbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:0)
+	/// The range of component `s` is `[2, 100]`.
 	fn approve_as_multi_approve(s: u32, ) -> Weight {
-		Weight::from_ref_time(22_848_000 as u64)
-			// Standard Error: 0
-			.saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(s as u64))
+		// Minimum execution time: 25_738 nanoseconds.
+		Weight::from_ref_time(27_676_766 as u64)
+			// Standard Error: 710
+			.saturating_add(Weight::from_ref_time(125_733 as u64).saturating_mul(s as u64))
 			.saturating_add(RocksDbWeight::get().reads(1 as u64))
 			.saturating_add(RocksDbWeight::get().writes(1 as u64))
 	}
 	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
-	// Storage: System Account (r:1 w:1)
-	fn approve_as_multi_complete(s: u32, ) -> Weight {
-		Weight::from_ref_time(63_239_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(161_000 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(3 as u64))
-			.saturating_add(RocksDbWeight::get().writes(3 as u64))
-	}
-	// Storage: Multisig Multisigs (r:1 w:1)
-	// Storage: Multisig Calls (r:1 w:1)
+	/// The range of component `s` is `[2, 100]`.
 	fn cancel_as_multi(s: u32, ) -> Weight {
-		Weight::from_ref_time(51_254_000 as u64)
-			// Standard Error: 1_000
-			.saturating_add(Weight::from_ref_time(118_000 as u64).saturating_mul(s as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
+		// Minimum execution time: 36_591 nanoseconds.
+		Weight::from_ref_time(38_707_543 as u64)
+			// Standard Error: 881
+			.saturating_add(Weight::from_ref_time(126_198 as u64).saturating_mul(s as u64))
+			.saturating_add(RocksDbWeight::get().reads(1 as u64))
+			.saturating_add(RocksDbWeight::get().writes(1 as u64))
 	}
 }
diff --git a/substrate/frame/transaction-payment/src/lib.rs b/substrate/frame/transaction-payment/src/lib.rs
index 5027db41ec0..ce747fa6bd8 100644
--- a/substrate/frame/transaction-payment/src/lib.rs
+++ b/substrate/frame/transaction-payment/src/lib.rs
@@ -658,7 +658,7 @@ where
 		Self(fee)
 	}
 
-	/// Returns the tip as being choosen by the transaction sender.
+	/// Returns the tip as being chosen by the transaction sender.
 	pub fn tip(&self) -> BalanceOf<T> {
 		self.0
 	}
diff --git a/substrate/frame/utility/src/lib.rs b/substrate/frame/utility/src/lib.rs
index 9ae89097a9b..544add1da68 100644
--- a/substrate/frame/utility/src/lib.rs
+++ b/substrate/frame/utility/src/lib.rs
@@ -124,7 +124,7 @@ pub mod pallet {
 	// Align the call size to 1KB. As we are currently compiling the runtime for native/wasm
 	// the `size_of` of the `Call` can be different. To ensure that this don't leads to
 	// mismatches between native/wasm or to different metadata for the same runtime, we
-	// algin the call size. The value is choosen big enough to hopefully never reach it.
+	// algin the call size. The value is chosen big enough to hopefully never reach it.
 	const CALL_ALIGN: u32 = 1024;
 
 	#[pallet::extra_constants]
-- 
GitLab