From 5b0ffb9c054d92c54252e145d17594a6bb04f8ca Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 21 Sep 2023 20:08:20 +0200 Subject: [PATCH] Fix inbound benchmark and regenerate it. --- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 5 ++++ .../src/weights/snowbridge_inbound_queue.rs | 30 +++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index ed45ee8804451..1df729da8eeae 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -53,6 +53,8 @@ use snowbridge_inbound_queue::BenchmarkHelper; use snowbridge_beacon_primitives::CompactExecutionHeader; #[cfg(feature = "runtime-benchmarks")] use sp_core::H256; +#[cfg(feature = "runtime-benchmarks")] +use crate::xcm_config::benchmark_helper::DoNothingRouter; use frame_support::{ construct_runtime, @@ -605,7 +607,10 @@ impl snowbridge_inbound_queue::Config for Runtime { type Verifier = snowbridge_ethereum_beacon_client::Pallet; type Token = Balances; type Reward = Reward; + #[cfg(not(feature = "runtime-benchmarks"))] type XcmSender = XcmRouter; + #[cfg(feature = "runtime-benchmarks")] + type XcmSender = DoNothingRouter; type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo; type GatewayAddress = GatewayAddress; #[cfg(feature = "runtime-benchmarks")] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs index 23d224a0150a1..2c8cfe39aac6d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs @@ -1,10 +1,11 @@ + //! Autogenerated weights for `snowbridge_inbound_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `macbook pro m1`, CPU: `m1-arm64` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024 // Executed Command: // target/release/polkadot-parachain @@ -13,14 +14,13 @@ // --chain=bridge-hub-rococo-dev // --pallet=snowbridge_inbound_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --steps // 50 // --repeat // 20 // --output -// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs +// ./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,20 +33,20 @@ use core::marker::PhantomData; /// Weight functions for `snowbridge_inbound_queue`. pub struct WeightInfo(PhantomData); impl snowbridge_inbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - /// Storage: EthereumInboundQueue Nonce (r:1 w:1) - /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `EthereumInboundQueue::PalletOperatingMode` (r:1 w:0) + /// Proof: `EthereumInboundQueue::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `EthereumInboundQueue::Nonce` (r:1 w:1) + /// Proof: `EthereumInboundQueue::Nonce` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: // Measured: `457` // Estimated: `3601` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) + // Minimum execution time: 76_000_000 picoseconds. + Weight::from_parts(77_000_000, 0) .saturating_add(Weight::from_parts(0, 3601)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2))