Skip to content

Commit

Permalink
finally regen weights
Browse files Browse the repository at this point in the history
  • Loading branch information
f-gate committed Dec 20, 2023
1 parent 957809d commit 9fe98ce
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 180 deletions.
7 changes: 6 additions & 1 deletion pallets/briefs/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ mod benchmarks {
let (eoa, currency_id) = ForeignOwnedAccount::get_supported_currency_eoa_combo();
let brief_owners = get_max_brief_owners::<T>(currency_id);
let caller = create_account_id::<T>("caller", 1, currency_id);
assert_ok!(T::RMultiCurrency::deposit(
CurrencyId::Native,
&caller,
1_000_000_000_000_000u128.saturated_into()
));
let applicant = create_account_id::<T>("applicant", 1, currency_id);
let budget = 10_000u32.into();
let initial_contribution = 5_000u32.into();
Expand Down Expand Up @@ -182,7 +187,7 @@ fn get_brief_owners<T: Config>(mut n: u32, currency: CurrencyId) -> BoundedBrief
}

fn get_max_brief_owners<T: Config>(currency_id: CurrencyId) -> BoundedBriefOwners<T> {
let max_brief_owners: u32 = <T as Config>::MaxBriefOwners::get();
let max_brief_owners: u32 = <T as Config>::MaxBriefOwners::get() - 1;
get_brief_owners::<T>(max_brief_owners, currency_id)
}

Expand Down
96 changes: 50 additions & 46 deletions pallets/briefs/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
//! Autogenerated weights for `pallet_briefs`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-12-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-12-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `user`, CPU: `12th Gen Intel(R) Core(TM) i9-12900H`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("imbue-dev")`, DB CACHE: `1024`
// Executed Command:
// ./target/debug/imbue
// ./target/release/imbue
// benchmark
// pallet
// --chain=imbue-dev
Expand All @@ -32,47 +32,49 @@ use crate::WeightInfoT;
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfoT for WeightInfo<T> {
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `Deposits::TicketId` (r:1 w:1)
/// Proof: `Deposits::TicketId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `OrmlTokens::Accounts` (r:1 w:1)
/// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::CounterForBriefs` (r:1 w:1)
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:0 w:1)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
fn create_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Measured: `1042`
// Estimated: `6114`
// Minimum execution time: 1_508_486_000 picoseconds.
Weight::from_parts(1_537_968_000, 6114)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
// Minimum execution time: 122_948_000 picoseconds.
Weight::from_parts(140_489_000, 6114)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:0)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
fn contribute_to_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `2153`
// Measured: `2122`
// Estimated: `6114`
// Minimum execution time: 874_794_000 picoseconds.
Weight::from_parts(883_738_000, 6114)
// Minimum execution time: 66_724_000 picoseconds.
Weight::from_parts(75_703_000, 6114)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:1 w:2)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueFellowship::Roles` (r:1 w:0)
Expand All @@ -86,22 +88,22 @@ impl<T: frame_system::Config> WeightInfoT for WeightInfo<T> {
/// Storage: `ImbueBriefs::CounterForBriefs` (r:1 w:1)
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ImbueProposals::Projects` (r:0 w:1)
/// Proof: `ImbueProposals::Projects` (`max_values`: None, `max_size`: Some(36350), added: 38825, mode: `MaxEncodedLen`)
/// Proof: `ImbueProposals::Projects` (`max_values`: None, `max_size`: Some(36455), added: 38930, mode: `MaxEncodedLen`)
/// Storage: `ImbueProposals::IndividualVoteStore` (r:0 w:1)
/// Proof: `ImbueProposals::IndividualVoteStore` (`max_values`: None, `max_size`: Some(16571), added: 19046, mode: `MaxEncodedLen`)
fn commence_work() -> Weight {
// Proof Size summary in bytes:
// Measured: `2641`
// Measured: `2610`
// Estimated: `8799`
// Minimum execution time: 3_922_748_000 picoseconds.
Weight::from_parts(4_133_787_000, 8799)
// Minimum execution time: 276_193_000 picoseconds.
Weight::from_parts(282_041_000, 8799)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(13_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:1 w:1)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
Expand All @@ -110,10 +112,10 @@ impl<T: frame_system::Config> WeightInfoT for WeightInfo<T> {
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn cancel_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `2387`
// Measured: `2356`
// Estimated: `6114`
// Minimum execution time: 1_621_533_000 picoseconds.
Weight::from_parts(1_637_811_000, 6114)
// Minimum execution time: 117_915_000 picoseconds.
Weight::from_parts(126_700_000, 6114)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand All @@ -122,47 +124,49 @@ impl<T: frame_system::Config> WeightInfoT for WeightInfo<T> {
// For backwards compatibility and tests.
impl WeightInfoT for () {
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `Deposits::TicketId` (r:1 w:1)
/// Proof: `Deposits::TicketId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `OrmlTokens::Accounts` (r:1 w:1)
/// Proof: `OrmlTokens::Accounts` (`max_values`: None, `max_size`: Some(106), added: 2581, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::CounterForBriefs` (r:1 w:1)
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:0 w:1)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
fn create_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `368`
// Measured: `1042`
// Estimated: `6114`
// Minimum execution time: 1_508_486_000 picoseconds.
Weight::from_parts(1_537_968_000, 6114)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
// Minimum execution time: 122_948_000 picoseconds.
Weight::from_parts(140_489_000, 6114)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:0)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
fn contribute_to_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `2153`
// Measured: `2122`
// Estimated: `6114`
// Minimum execution time: 874_794_000 picoseconds.
Weight::from_parts(883_738_000, 6114)
// Minimum execution time: 66_724_000 picoseconds.
Weight::from_parts(75_703_000, 6114)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
/// Proof: `ImbueBriefs::BriefContributions` (`max_values`: None, `max_size`: Some(2649), added: 5124, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:1 w:2)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueFellowship::Roles` (r:1 w:0)
Expand All @@ -176,22 +180,22 @@ impl WeightInfoT for () {
/// Storage: `ImbueBriefs::CounterForBriefs` (r:1 w:1)
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ImbueProposals::Projects` (r:0 w:1)
/// Proof: `ImbueProposals::Projects` (`max_values`: None, `max_size`: Some(36350), added: 38825, mode: `MaxEncodedLen`)
/// Proof: `ImbueProposals::Projects` (`max_values`: None, `max_size`: Some(36455), added: 38930, mode: `MaxEncodedLen`)
/// Storage: `ImbueProposals::IndividualVoteStore` (r:0 w:1)
/// Proof: `ImbueProposals::IndividualVoteStore` (`max_values`: None, `max_size`: Some(16571), added: 19046, mode: `MaxEncodedLen`)
fn commence_work() -> Weight {
// Proof Size summary in bytes:
// Measured: `2641`
// Measured: `2610`
// Estimated: `8799`
// Minimum execution time: 3_922_748_000 picoseconds.
Weight::from_parts(4_133_787_000, 8799)
// Minimum execution time: 276_193_000 picoseconds.
Weight::from_parts(282_041_000, 8799)
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(13_u64))
}
/// Storage: `ImbueBriefs::Briefs` (r:1 w:1)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1725), added: 4200, mode: `MaxEncodedLen`)
/// Proof: `ImbueBriefs::Briefs` (`max_values`: None, `max_size`: Some(1830), added: 4305, mode: `MaxEncodedLen`)
/// Storage: `Deposits::CurrentDeposits` (r:1 w:1)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`)
/// Proof: `Deposits::CurrentDeposits` (`max_values`: None, `max_size`: Some(66), added: 2541, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ImbueBriefs::BriefContributions` (r:1 w:1)
Expand All @@ -200,10 +204,10 @@ impl WeightInfoT for () {
/// Proof: `ImbueBriefs::CounterForBriefs` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn cancel_brief() -> Weight {
// Proof Size summary in bytes:
// Measured: `2387`
// Measured: `2356`
// Estimated: `6114`
// Minimum execution time: 1_621_533_000 picoseconds.
Weight::from_parts(1_637_811_000, 6114)
// Minimum execution time: 117_915_000 picoseconds.
Weight::from_parts(126_700_000, 6114)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
Expand Down
Loading

0 comments on commit 9fe98ce

Please sign in to comment.