diff --git a/pallets/author-noting/src/benchmarks.rs b/pallets/author-noting/src/benchmarks.rs index 27fb88e7f..b4d352c47 100644 --- a/pallets/author-noting/src/benchmarks.rs +++ b/pallets/author-noting/src/benchmarks.rs @@ -56,12 +56,14 @@ mod test_sproof { benchmarks! { set_latest_author_data { // Depend on the number of parachains registered - let x in 0..100; + let x in 1..100; let mut container_chains = vec![]; let data = if TypeId::of::<<::RelayOrPara as RelayOrPara>::InherentArg>() == TypeId::of::() { + // RELAY MODE let mut sproof_builder = test_sproof::ParaHeaderSproofBuilder::default(); + // Must start at 0 in Relay mode (why?) for para_id in 0..x { let para_id = para_id.into(); container_chains.push(para_id); @@ -92,8 +94,10 @@ benchmarks! { *(Box::new(arg) as Box).downcast().unwrap() } else if TypeId::of::<<::RelayOrPara as RelayOrPara>::InherentArg>() == TypeId::of::<()>() { + // PARA MODE - for para_id in 0..x { + // Must start at 1 in Para mode (why?) + for para_id in 1..x { let slot: crate::InherentType = 13u64.into(); let header = sp_runtime::generic::Header:: { parent_hash: Default::default(), diff --git a/pallets/author-noting/src/weights.rs b/pallets/author-noting/src/weights.rs index 21db73c32..622e79b16 100644 --- a/pallets/author-noting/src/weights.rs +++ b/pallets/author-noting/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_author_noting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 -//! DATE: 2024-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -86,16 +86,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `PooledStaking::Pools` (`max_values`: None, `max_size`: Some(113), added: 2588, mode: `MaxEncodedLen`) /// Storage: `XcmCoreBuyer::PendingBlocks` (r:0 w:100) /// Proof: `XcmCoreBuyer::PendingBlocks` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_latest_author_data(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1008 + x * (208 ±0)` + // Measured: `1015 + x * (208 ±0)` // Estimated: `8799 + x * (2603 ±0)` - // Minimum execution time: 8_650_000 picoseconds. - Weight::from_parts(8_895_000, 8799) - // Standard Error: 187_287 - .saturating_add(Weight::from_parts(41_591_545, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(11_u64)) + // Minimum execution time: 122_225_000 picoseconds. + Weight::from_parts(123_639_000, 8799) + // Standard Error: 128_105 + .saturating_add(Weight::from_parts(36_913_982, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) @@ -107,8 +107,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_684_000 picoseconds. - Weight::from_parts(6_177_000, 0) + // Minimum execution time: 5_776_000 picoseconds. + Weight::from_parts(6_057_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -117,8 +117,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_468_000 picoseconds. - Weight::from_parts(5_887_000, 0) + // Minimum execution time: 5_542_000 picoseconds. + Weight::from_parts(5_844_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) @@ -137,8 +137,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `881` // Estimated: `11402` - // Minimum execution time: 92_961_000 picoseconds. - Weight::from_parts(94_977_000, 11402) + // Minimum execution time: 92_792_000 picoseconds. + Weight::from_parts(99_983_000, 11402) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -170,16 +170,16 @@ impl WeightInfo for () { /// Proof: `PooledStaking::Pools` (`max_values`: None, `max_size`: Some(113), added: 2588, mode: `MaxEncodedLen`) /// Storage: `XcmCoreBuyer::PendingBlocks` (r:0 w:100) /// Proof: `XcmCoreBuyer::PendingBlocks` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_latest_author_data(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1008 + x * (208 ±0)` + // Measured: `1015 + x * (208 ±0)` // Estimated: `8799 + x * (2603 ±0)` - // Minimum execution time: 8_650_000 picoseconds. - Weight::from_parts(8_895_000, 8799) - // Standard Error: 187_287 - .saturating_add(Weight::from_parts(41_591_545, 0).saturating_mul(x.into())) - .saturating_add(RocksDbWeight::get().reads(11_u64)) + // Minimum execution time: 122_225_000 picoseconds. + Weight::from_parts(123_639_000, 8799) + // Standard Error: 128_105 + .saturating_add(Weight::from_parts(36_913_982, 0).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(x.into()))) @@ -191,8 +191,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_684_000 picoseconds. - Weight::from_parts(6_177_000, 0) + // Minimum execution time: 5_776_000 picoseconds. + Weight::from_parts(6_057_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -201,8 +201,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_468_000 picoseconds. - Weight::from_parts(5_887_000, 0) + // Minimum execution time: 5_542_000 picoseconds. + Weight::from_parts(5_844_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) @@ -221,8 +221,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `881` // Estimated: `11402` - // Minimum execution time: 92_961_000 picoseconds. - Weight::from_parts(94_977_000, 11402) + // Minimum execution time: 92_792_000 picoseconds. + Weight::from_parts(99_983_000, 11402) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } diff --git a/runtime/dancebox/src/weights/pallet_author_noting.rs b/runtime/dancebox/src/weights/pallet_author_noting.rs index 86f7ec432..db3cd8aa2 100644 --- a/runtime/dancebox/src/weights/pallet_author_noting.rs +++ b/runtime/dancebox/src/weights/pallet_author_noting.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_author_noting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 -//! DATE: 2024-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -78,16 +78,16 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig /// Proof: `PooledStaking::Pools` (`max_values`: None, `max_size`: Some(113), added: 2588, mode: `MaxEncodedLen`) /// Storage: `XcmCoreBuyer::PendingBlocks` (r:0 w:100) /// Proof: `XcmCoreBuyer::PendingBlocks` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_latest_author_data(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1008 + x * (208 ±0)` + // Measured: `1015 + x * (208 ±0)` // Estimated: `8799 + x * (2603 ±0)` - // Minimum execution time: 8_650_000 picoseconds. - Weight::from_parts(8_895_000, 8799) - // Standard Error: 187_287 - .saturating_add(Weight::from_parts(41_591_545, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(11_u64)) + // Minimum execution time: 122_225_000 picoseconds. + Weight::from_parts(123_639_000, 8799) + // Standard Error: 128_105 + .saturating_add(Weight::from_parts(36_913_982, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) @@ -99,8 +99,8 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_684_000 picoseconds. - Weight::from_parts(6_177_000, 0) + // Minimum execution time: 5_776_000 picoseconds. + Weight::from_parts(6_057_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -109,8 +109,8 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_468_000 picoseconds. - Weight::from_parts(5_887_000, 0) + // Minimum execution time: 5_542_000 picoseconds. + Weight::from_parts(5_844_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) @@ -129,8 +129,8 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `881` // Estimated: `11402` - // Minimum execution time: 92_961_000 picoseconds. - Weight::from_parts(94_977_000, 11402) + // Minimum execution time: 92_792_000 picoseconds. + Weight::from_parts(99_983_000, 11402) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } diff --git a/runtime/flashbox/src/weights/pallet_author_noting.rs b/runtime/flashbox/src/weights/pallet_author_noting.rs index 6990ab2dc..48aeadfc4 100644 --- a/runtime/flashbox/src/weights/pallet_author_noting.rs +++ b/runtime/flashbox/src/weights/pallet_author_noting.rs @@ -17,10 +17,10 @@ //! Autogenerated weights for pallet_author_noting //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("flashbox_dev"), DB CACHE: 1024 // Executed Command: @@ -38,7 +38,7 @@ // 50 // --repeat // 20 -// --template=benchmarking/frame-weight-runtime-template.hbs +// --template=./benchmarking/frame-weight-pallet-template.hbs // --json-file // raw.json // --output @@ -57,7 +57,7 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig /// Storage: `AuthorNoting::DidSetContainerAuthorData` (r:1 w:1) /// Proof: `AuthorNoting::DidSetContainerAuthorData` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `Registrar::RegisteredParaIds` (r:1 w:0) - /// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Digest` (r:1 w:0) @@ -66,20 +66,28 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig /// Proof: `CollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `AuthorNoting::LatestAuthor` (r:100 w:100) /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 100]`. + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:100 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:101 w:101) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 100]`. fn set_latest_author_data(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `393 + x * (73 ±0)` - // Estimated: `1878 + x * (2539 ±0)` - // Minimum execution time: 9_515_000 picoseconds. - Weight::from_parts(9_708_000, 1878) - // Standard Error: 152_038 - .saturating_add(Weight::from_parts(23_061_887, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2539).saturating_mul(x.into())) + // Measured: `854 + x * (208 ±0)` + // Estimated: `7887 + x * (2603 ±0)` + // Minimum execution time: 83_801_000 picoseconds. + Weight::from_parts(85_905_000, 7887) + // Standard Error: 173_939 + .saturating_add(Weight::from_parts(38_237_286, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(x.into())) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) @@ -87,8 +95,8 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_380_000 picoseconds. - Weight::from_parts(7_628_000, 0) + // Minimum execution time: 6_026_000 picoseconds. + Weight::from_parts(6_250_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -97,8 +105,25 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_055_000 picoseconds. - Weight::from_parts(7_251_000, 0) + // Minimum execution time: 5_454_000 picoseconds. + Weight::from_parts(5_660_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + fn on_container_author_noted() -> Weight { + // Proof Size summary in bytes: + // Measured: `647` + // Estimated: `7887` + // Minimum execution time: 51_807_000 picoseconds. + Weight::from_parts(53_926_000, 7887) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } } \ No newline at end of file diff --git a/solo-chains/runtime/dancelight/src/weights/pallet_author_noting.rs b/solo-chains/runtime/dancelight/src/weights/pallet_author_noting.rs index d0fdda9ed..423ebcf90 100644 --- a/solo-chains/runtime/dancelight/src/weights/pallet_author_noting.rs +++ b/solo-chains/runtime/dancelight/src/weights/pallet_author_noting.rs @@ -17,10 +17,10 @@ //! Autogenerated weights for pallet_author_noting //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-09-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dancelight-dev"), DB CACHE: 1024 // Executed Command: @@ -42,7 +42,7 @@ // --json-file // raw.json // --output -// tmp/starlight_weights/pallet_author_noting.rs +// tmp/dancelight_weights/pallet_author_noting.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -66,19 +66,28 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig /// Proof: `TanssiCollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `AuthorNoting::LatestAuthor` (r:99 w:99) /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(418), added: 913, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:99 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TanssiInvulnerables::Invulnerables` (r:1 w:0) + /// Proof: `TanssiInvulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 100]`. fn set_latest_author_data(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `301 + x * (206 ±0)` - // Estimated: `6858 + x * (2561 ±0)` - // Minimum execution time: 8_841_000 picoseconds. - Weight::from_parts(8_961_000, 6858) - // Standard Error: 156_576 - .saturating_add(Weight::from_parts(21_144_399, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2561).saturating_mul(x.into())) + // Measured: `498 + x * (339 ±0)` + // Estimated: `7522 + x * (2687 ±3)` + // Minimum execution time: 7_505_000 picoseconds. + Weight::from_parts(7_854_000, 7522) + // Standard Error: 107_155 + .saturating_add(Weight::from_parts(34_593_494, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 2687).saturating_mul(x.into())) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) @@ -86,8 +95,8 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_461_000 picoseconds. - Weight::from_parts(8_735_000, 0) + // Minimum execution time: 5_830_000 picoseconds. + Weight::from_parts(6_151_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -96,8 +105,25 @@ impl pallet_author_noting::WeightInfo for SubstrateWeig // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_919_000 picoseconds. - Weight::from_parts(8_059_000, 0) + // Minimum execution time: 5_559_000 picoseconds. + Weight::from_parts(5_882_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(418), added: 913, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TanssiInvulnerables::Invulnerables` (r:1 w:0) + /// Proof: `TanssiInvulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + fn on_container_author_noted() -> Weight { + // Proof Size summary in bytes: + // Measured: `599` + // Estimated: `6196` + // Minimum execution time: 50_807_000 picoseconds. + Weight::from_parts(51_723_000, 6196) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } } \ No newline at end of file diff --git a/tmp/flashbox_weights/pallet_author_noting.rs b/tmp/flashbox_weights/pallet_author_noting.rs new file mode 100644 index 000000000..a28e5320d --- /dev/null +++ b/tmp/flashbox_weights/pallet_author_noting.rs @@ -0,0 +1,213 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_author_noting +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("flashbox_dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/tanssi-node +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_author_noting +// --extrinsic +// * +// --chain=flashbox_dev +// --steps +// 50 +// --repeat +// 20 +// --template=./benchmarking/frame-weight-pallet-template.hbs +// --json-file +// raw.json +// --output +// tmp/flashbox_weights/pallet_author_noting.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_author_noting. +pub trait WeightInfo { + fn set_latest_author_data(x: u32, ) -> Weight; + fn set_author() -> Weight; + fn kill_author_data() -> Weight; + fn on_container_author_noted() -> Weight; +} + +/// Weights for pallet_author_noting using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: `AuthorNoting::DidSetContainerAuthorData` (r:1 w:1) + /// Proof: `AuthorNoting::DidSetContainerAuthorData` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Registrar::RegisteredParaIds` (r:1 w:0) + /// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) + /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `CollatorAssignment::CollatorContainerChain` (r:1 w:0) + /// Proof: `CollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorNoting::LatestAuthor` (r:100 w:100) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:100 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:101 w:101) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 100]`. + fn set_latest_author_data(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `854 + x * (208 ±0)` + // Estimated: `7887 + x * (2603 ±0)` + // Minimum execution time: 83_801_000 picoseconds. + Weight::from_parts(85_905_000, 7887) + // Standard Error: 173_939 + .saturating_add(Weight::from_parts(38_237_286, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(x.into())) + } + /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + fn set_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_026_000 picoseconds. + Weight::from_parts(6_250_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + fn kill_author_data() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_454_000 picoseconds. + Weight::from_parts(5_660_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + fn on_container_author_noted() -> Weight { + // Proof Size summary in bytes: + // Measured: `647` + // Estimated: `7887` + // Minimum execution time: 51_807_000 picoseconds. + Weight::from_parts(53_926_000, 7887) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + /// Storage: `AuthorNoting::DidSetContainerAuthorData` (r:1 w:1) + /// Proof: `AuthorNoting::DidSetContainerAuthorData` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `Registrar::RegisteredParaIds` (r:1 w:0) + /// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) + /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `CollatorAssignment::CollatorContainerChain` (r:1 w:0) + /// Proof: `CollatorAssignment::CollatorContainerChain` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorNoting::LatestAuthor` (r:100 w:100) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:100 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:101 w:101) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 100]`. + fn set_latest_author_data(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `854 + x * (208 ±0)` + // Estimated: `7887 + x * (2603 ±0)` + // Minimum execution time: 83_801_000 picoseconds. + Weight::from_parts(85_905_000, 7887) + // Standard Error: 173_939 + .saturating_add(Weight::from_parts(38_237_286, 0).saturating_mul(x.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(x.into())) + } + /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + fn set_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_026_000 picoseconds. + Weight::from_parts(6_250_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) + /// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + fn kill_author_data() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_454_000 picoseconds. + Weight::from_parts(5_660_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `InflationRewards::ChainsToReward` (r:1 w:1) + /// Proof: `InflationRewards::ChainsToReward` (`max_values`: Some(1), `max_size`: Some(818), added: 1313, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(6402), added: 6897, mode: `MaxEncodedLen`) + /// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0) + /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + fn on_container_author_noted() -> Weight { + // Proof Size summary in bytes: + // Measured: `647` + // Estimated: `7887` + // Minimum execution time: 51_807_000 picoseconds. + Weight::from_parts(53_926_000, 7887) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } +}