Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor on_container_author_noted hook to take a Vec #787

Merged
merged 14 commits into from
Jan 13, 2025
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
//! 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: `[]`
//! DATE: 2024-12-31, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P`
//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
Expand All @@ -35,10 +35,10 @@
// *
// --chain=dev
// --steps
// 50
// 16
// --repeat
// 20
// --template=./benchmarking/frame-weight-pallet-template.hbs
// 1
// --template=benchmarking/frame-weight-runtime-template.hbs
// --json-file
// raw.json
// --output
Expand All @@ -57,7 +57,7 @@ impl<T: frame_system::Config> 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(402), added: 897, 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)
Expand All @@ -66,18 +66,20 @@ impl<T: frame_system::Config> 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(418), added: 913, 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_342_000 picoseconds.
Weight::from_parts(9_569_000, 1878)
// Standard Error: 153_815
.saturating_add(Weight::from_parts(23_597_807, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
// Measured: `493 + x * (73 ±0)`
// Estimated: `1978 + x * (2539 ±0)`
// Minimum execution time: 33_846_000 picoseconds.
Weight::from_parts(33_846_000, 1978)
// Standard Error: 625_509
.saturating_add(Weight::from_parts(15_540_280, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(6_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(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(x.into()))
}
Expand All @@ -87,8 +89,8 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_776_000 picoseconds.
Weight::from_parts(6_057_000, 0)
// Minimum execution time: 8_981_000 picoseconds.
Weight::from_parts(8_981_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
Expand All @@ -97,8 +99,8 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_542_000 picoseconds.
Weight::from_parts(5_844_000, 0)
// Minimum execution time: 7_217_000 picoseconds.
Weight::from_parts(7_217_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `InflationRewards::ChainsToReward` (r:1 w:1)
Expand All @@ -113,12 +115,15 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
/// Storage: `XcmCoreBuyer::PendingBlocks` (r:0 w:1)
/// Proof: `XcmCoreBuyer::PendingBlocks` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
fn on_container_author_noted() -> Weight {
/// The range of component `x` is `[1, 50]`.
fn on_container_authors_noted(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `881`
// Estimated: `11402`
// Minimum execution time: 92_792_000 picoseconds.
Weight::from_parts(99_983_000, 11402)
// Minimum execution time: 88_108_000 picoseconds.
Weight::from_parts(75_276_590, 11402)
// Standard Error: 100_345
.saturating_add(Weight::from_parts(10_364_699, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

//! Autogenerated weights for pallet_services_payment
//!
//! 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-31, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
Expand All @@ -35,9 +35,9 @@
// *
// --chain=dev
// --steps
// 50
// 16
// --repeat
// 20
// 1
// --template=benchmarking/frame-weight-runtime-template.hbs
// --json-file
// raw.json
Expand All @@ -60,8 +60,8 @@ impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateW
// Proof Size summary in bytes:
// Measured: `155`
// Estimated: `6196`
// Minimum execution time: 53_086_000 picoseconds.
Weight::from_parts(54_180_000, 6196)
// Minimum execution time: 45_354_000 picoseconds.
Weight::from_parts(45_354_000, 6196)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
Expand All @@ -71,8 +71,8 @@ impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateW
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_086_000 picoseconds.
Weight::from_parts(7_333_000, 0)
// Minimum execution time: 7_015_000 picoseconds.
Weight::from_parts(7_015_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ServicesPayment::GivenFreeCredits` (r:0 w:1)
Expand All @@ -81,48 +81,52 @@ impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateW
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_939_000 picoseconds.
Weight::from_parts(4_078_000, 0)
// Minimum execution time: 5_107_000 picoseconds.
Weight::from_parts(5_107_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Registrar::ParaManager` (r:1 w:0)
/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn set_refund_address() -> Weight {
// Proof Size summary in bytes:
// Measured: `220`
// Estimated: `3685`
// Minimum execution time: 14_761_000 picoseconds.
Weight::from_parts(15_240_000, 3685)
// Estimated: `3517`
// Minimum execution time: 12_791_000 picoseconds.
Weight::from_parts(12_791_000, 3517)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Registrar::ParaManager` (r:1 w:0)
/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn set_max_core_price() -> Weight {
// Proof Size summary in bytes:
// Measured: `220`
// Estimated: `3685`
// Minimum execution time: 14_214_000 picoseconds.
Weight::from_parts(14_668_000, 3685)
// Estimated: `3517`
// Minimum execution time: 12_048_000 picoseconds.
Weight::from_parts(12_048_000, 3517)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:0)
/// Storage: `ServicesPayment::BlockProductionCredits` (r:50 w:0)
/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Storage: `System::Account` (r:50 w:50)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn on_container_author_noted() -> Weight {
/// The range of component `n` is `[1, 50]`.
fn on_container_authors_noted(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `258`
// Estimated: `3593`
// Minimum execution time: 23_426_000 picoseconds.
Weight::from_parts(23_939_000, 3593)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
// Measured: `300 + n * (132 ±0)`
// Estimated: `990 + n * (2603 ±0)`
// Minimum execution time: 21_332_000 picoseconds.
Weight::from_parts(15_946_576, 990)
// Standard Error: 231_642
.saturating_add(Weight::from_parts(13_850_779, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:0)
/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
Expand All @@ -134,8 +138,8 @@ impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateW
// Proof Size summary in bytes:
// Measured: `315`
// Estimated: `3593`
// Minimum execution time: 41_000_000 picoseconds.
Weight::from_parts(41_728_000, 3593)
// Minimum execution time: 36_963_000 picoseconds.
Weight::from_parts(36_963_000, 3593)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -145,8 +149,8 @@ impl<T: frame_system::Config> pallet_services_payment::WeightInfo for SubstrateW
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_380_000 picoseconds.
Weight::from_parts(4_574_000, 0)
// Minimum execution time: 6_105_000 picoseconds.
Weight::from_parts(6_105_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
//! 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: `[]`
//! DATE: 2024-12-31, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P`
//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("flashbox_dev"), DB CACHE: 1024

// Executed Command:
Expand All @@ -35,10 +35,10 @@
// *
// --chain=flashbox_dev
// --steps
// 50
// 16
// --repeat
// 20
// --template=./benchmarking/frame-weight-pallet-template.hbs
// 1
// --template=benchmarking/frame-weight-runtime-template.hbs
// --json-file
// raw.json
// --output
Expand All @@ -57,7 +57,7 @@ impl<T: frame_system::Config> 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)
Expand All @@ -66,18 +66,20 @@ impl<T: frame_system::Config> 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`)
/// 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))
// Measured: `493 + x * (73 ±0)`
// Estimated: `2303 + x * (2539 ±0)`
// Minimum execution time: 35_210_000 picoseconds.
Weight::from_parts(35_210_000, 2303)
// Standard Error: 578_844
.saturating_add(Weight::from_parts(15_963_687, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(6_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(2_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(x.into()))
}
Expand All @@ -87,8 +89,8 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_026_000 picoseconds.
Weight::from_parts(6_250_000, 0)
// Minimum execution time: 8_925_000 picoseconds.
Weight::from_parts(8_925_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
Expand All @@ -97,8 +99,8 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_454_000 picoseconds.
Weight::from_parts(5_660_000, 0)
// Minimum execution time: 6_219_000 picoseconds.
Weight::from_parts(6_219_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `InflationRewards::ChainsToReward` (r:1 w:1)
Expand All @@ -109,12 +111,15 @@ impl<T: frame_system::Config> pallet_author_noting::WeightInfo for SubstrateWeig
/// 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 {
/// The range of component `x` is `[1, 50]`.
fn on_container_authors_noted(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `647`
// Estimated: `7887`
// Minimum execution time: 51_807_000 picoseconds.
Weight::from_parts(53_926_000, 7887)
// Minimum execution time: 48_350_000 picoseconds.
Weight::from_parts(43_578_419, 7887)
// Standard Error: 101_708
.saturating_add(Weight::from_parts(9_347_641, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
Expand Down
Loading
Loading