diff --git a/docker/Dockerfile b/docker/Dockerfile index 70d51ae6f49312264a646b78d362b41f3103dde0..1ec17eb32138d4bf75d33da34eff401c65ebf18e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -71,7 +71,7 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \ # Run runtime benchmarks RUN if [ "$benchmarks" != 0 ]; then \ - build/duniter benchmark pallet --chain dev --execution=wasm --wasm-execution=compiled --pallet "*" --extrinsic "*" --steps 2 --repeat 1; \ + build/duniter benchmark pallet --chain dev --wasm-execution=compiled --pallet "*" --extrinsic "*" --steps 2 --repeat 1; \ fi # ------------------------------------------------------------------------------ diff --git a/pallets/authority-members/src/benchmarking.rs b/pallets/authority-members/src/benchmarking.rs index 893d89ba867bb56f5d9f209536f2df6fccb428e4..808ea5865cee6ab763bcdf1be40adcc66ff08051 100644 --- a/pallets/authority-members/src/benchmarking.rs +++ b/pallets/authority-members/src/benchmarking.rs @@ -17,70 +17,83 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; - -use frame_benchmarking::benchmarks; -use frame_system::RawOrigin; - use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} +use frame_benchmarking::v2::*; +use frame_system::RawOrigin; -benchmarks! { - where_clause { +#[benchmarks( where - T::MemberId: From<u32>, + <T as Config>::MemberId: From<u32>, +)] +mod benchmarks { + use super::*; + + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - go_offline { + + #[benchmark] + fn go_offline() { let id: T::MemberId = OnlineAuthorities::<T>::get()[0]; let caller: T::AccountId = Members::<T>::get(id).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - }: _<T::RuntimeOrigin>(caller_origin) - verify { - assert_has_event::<T>(Event::<T>::MemberGoOffline{member: id}.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller)); + + assert_has_event::<T>(Event::<T>::MemberGoOffline { member: id }.into()); } - go_online { + + #[benchmark] + fn go_online() { let id: T::MemberId = OnlineAuthorities::<T>::get()[0]; let caller: T::AccountId = Members::<T>::get(id).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); OnlineAuthorities::<T>::mutate(|ids| { ids.retain(|&x| x != id); }); OutgoingAuthorities::<T>::mutate(|ids| { ids.retain(|&x| x != id); }); - }: _<T::RuntimeOrigin>(caller_origin) - verify { - assert_has_event::<T>(Event::<T>::MemberGoOnline{member: id}.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller)); + + assert_has_event::<T>(Event::<T>::MemberGoOnline { member: id }.into()); } - set_session_keys { + + #[benchmark] + fn set_session_keys() { let id: T::MemberId = OnlineAuthorities::<T>::get()[0]; let caller: T::AccountId = Members::<T>::get(id).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let validator_id = T::ValidatorIdOf::convert(caller.clone()).unwrap(); - let session_keys: T::Keys = pallet_session::NextKeys::<T>::get(validator_id).unwrap(); - }: _<T::RuntimeOrigin>(caller_origin, session_keys) - remove_member { + let validator_id = T::ValidatorIdOf::convert(caller.clone()).unwrap(); + let session_keys: T::Keys = pallet_session::NextKeys::<T>::get(validator_id).unwrap(); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), session_keys); + } + + #[benchmark] + fn remove_member() { let id: T::MemberId = OnlineAuthorities::<T>::get()[0]; - let caller_origin = RawOrigin::Root.into(); - }: _<T::RuntimeOrigin>(caller_origin, id) - verify { - assert_has_event::<T>(Event::<T>::MemberRemoved{member: id}.into()); + + #[extrinsic_call] + _(RawOrigin::Root, id); + + assert_has_event::<T>(Event::<T>::MemberRemoved { member: id }.into()); } - remove_member_from_blacklist { + + #[benchmark] + fn remove_member_from_blacklist() { let id: T::MemberId = OnlineAuthorities::<T>::get()[0]; Blacklist::<T>::mutate(|blacklist| { blacklist.push(id); }); - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), id) - verify { - assert_has_event::<T>(Event::<T>::MemberRemovedFromBlacklist{member: id}.into()); + + #[extrinsic_call] + _(RawOrigin::Root, id); + + assert_has_event::<T>(Event::<T>::MemberRemovedFromBlacklist { member: id }.into()); } - impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(2), - crate::mock::Test - ); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(2), crate::mock::Test); } diff --git a/pallets/certification/src/benchmarking.rs b/pallets/certification/src/benchmarking.rs index 5aa67fdf40a170cd4d629e99ebdf6abbdb26c9d6..7fa0534d5afa95819aacb5b1d522a83d8f20fe4b 100644 --- a/pallets/certification/src/benchmarking.rs +++ b/pallets/certification/src/benchmarking.rs @@ -18,122 +18,160 @@ use super::*; -use frame_benchmarking::benchmarks; +use frame_benchmarking::v2::*; use frame_system::RawOrigin; use sp_runtime::traits::Zero; -#[cfg(test)] -use maplit::btreemap; - use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} +#[benchmarks( + where + T::IdtyIndex: From<u32>, +)] +mod benchmarks { + use super::*; -fn add_certs<T: Config>(i: u32, receiver: T::IdtyIndex) -> Result<(), &'static str> { - Pallet::<T>::remove_all_certs_received_by(RawOrigin::Root.into(), receiver)?; - for j in 1..i { - Pallet::<T>::do_add_cert_checked(j.into(), receiver, false)?; + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - assert!( - CertsByReceiver::<T>::get(receiver).len() as u32 == i - 1, - "Certs not added", - ); - Ok(()) -} -benchmarks! { - where_clause { - where - T::IdtyIndex: From<u32>, + fn add_certs<T: Config>(i: u32, receiver: T::IdtyIndex) -> Result<(), &'static str> { + Pallet::<T>::remove_all_certs_received_by(RawOrigin::Root.into(), receiver)?; + for j in 1..i { + Pallet::<T>::do_add_cert_checked(j.into(), receiver, false)?; + } + assert!( + CertsByReceiver::<T>::get(receiver).len() as u32 == i - 1, + "Certs not added", + ); + Ok(()) } - add_cert { + + #[benchmark] + fn add_cert() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); - let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); let receiver: T::IdtyIndex = 2.into(); Pallet::<T>::del_cert(RawOrigin::Root.into(), issuer, receiver)?; - let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; - let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get()); - }: _<T::RuntimeOrigin>(caller_origin, receiver) - verify { - assert_has_event::<T>(Event::<T>::CertAdded{ issuer, receiver }.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), receiver); + + assert_has_event::<T>(Event::<T>::CertAdded { issuer, receiver }.into()); + Ok(()) } - renew_cert { + #[benchmark] + fn renew_cert() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); - let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller: T::AccountId = T::IdtyAttr::owner_key(issuer).unwrap(); let receiver: T::IdtyIndex = 2.into(); Pallet::<T>::del_cert(RawOrigin::Root.into(), issuer, receiver)?; - let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; - let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get()); - Pallet::<T>::add_cert(caller_origin.clone(), receiver)?; - frame_system::pallet::Pallet::<T>::set_block_number(T::CertPeriod::get() + T::CertPeriod::get()); - }: _<T::RuntimeOrigin>(caller_origin, receiver) - verify { - assert_has_event::<T>(Event::<T>::CertAdded{ issuer, receiver }.into()); + Pallet::<T>::add_cert(RawOrigin::Signed(caller.clone()).into(), receiver)?; + frame_system::pallet::Pallet::<T>::set_block_number( + T::CertPeriod::get() + T::CertPeriod::get(), + ); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), receiver); + + assert_has_event::<T>(Event::<T>::CertAdded { issuer, receiver }.into()); + Ok(()) } - del_cert { + #[benchmark] + fn del_cert() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); let receiver: T::IdtyIndex = 2.into(); // try to add cert if missing, else ignore // this depends on initial data let _ = Pallet::<T>::do_add_cert_checked(issuer, receiver, false); - let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; - let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), issuer, receiver) - verify { - assert_has_event::<T>(Event::<T>::CertRemoved{ issuer, receiver, expiration: false }.into()); + + #[extrinsic_call] + _(RawOrigin::Root, issuer, receiver); + + assert_has_event::<T>( + Event::<T>::CertRemoved { + issuer, + receiver, + expiration: false, + } + .into(), + ); + Ok(()) } - remove_all_certs_received_by { + #[benchmark] + fn remove_all_certs_received_by(i: Linear<2, 1_000>) -> Result<(), BenchmarkError> { let receiver: T::IdtyIndex = 0.into(); - let i in 2..1000 => add_certs::<T>(i, receiver)?; - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), receiver) - verify { - assert!(CertsByReceiver::<T>::get(receiver).is_empty() ); + add_certs::<T>(i, receiver)?; + + #[extrinsic_call] + _(RawOrigin::Root, receiver); + + assert!(CertsByReceiver::<T>::get(receiver).is_empty()); + Ok(()) } - on_initialize { + #[benchmark] + fn on_initialize() { assert!(CertsRemovableOn::<T>::try_get(BlockNumberFor::<T>::zero()).is_err()); - }: {Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero());} - do_remove_cert_noop { - }: {Pallet::<T>::do_remove_cert(100.into(), 101.into(), Some(BlockNumberFor::<T>::zero()));} + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero()); + } + } + + #[benchmark] + fn do_remove_cert_noop() { + #[block] + { + Pallet::<T>::do_remove_cert(100.into(), 101.into(), Some(BlockNumberFor::<T>::zero())); + } + } - do_remove_cert { + #[benchmark] + fn do_remove_cert() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); let receiver: T::IdtyIndex = 0.into(); Pallet::<T>::do_remove_cert(issuer, receiver, None); Pallet::<T>::do_add_cert_checked(issuer, receiver, false)?; - let issuer_cert: u32 = StorageIdtyCertMeta::<T>::get(issuer).issued_count; - let receiver_cert: u32 = StorageIdtyCertMeta::<T>::get(receiver).received_count; let block_number = T::ValidityPeriod::get(); frame_system::pallet::Pallet::<T>::set_block_number(block_number); - }: {Pallet::<T>::do_remove_cert(issuer, receiver, Some(block_number));} - verify { - assert_has_event::<T>(Event::<T>::CertRemoved{ issuer, receiver, expiration: true }.into()); + + #[block] + { + Pallet::<T>::do_remove_cert(issuer, receiver, Some(block_number)); + } + + assert_has_event::<T>( + Event::<T>::CertRemoved { + issuer, + receiver, + expiration: true, + } + .into(), + ); + Ok(()) } impl_benchmark_test_suite!( Pallet, crate::mock::new_test_ext(crate::mock::DefaultCertificationConfig { - apply_cert_period_at_genesis: true, - certs_by_receiver: btreemap![ - 0 => btreemap![ + apply_cert_period_at_genesis: true, + certs_by_receiver: maplit::btreemap![ + 0 => maplit::btreemap![ 1 => Some(7), 2 => Some(9), ], - 1 => btreemap![ + 1 => maplit::btreemap![ 0 => Some(10), 2 => Some(3), ], - ] , + ], }), crate::mock::Test ); diff --git a/pallets/distance/src/benchmarking.rs b/pallets/distance/src/benchmarking.rs index 4b5fb9557650cbae9ec1dc1f758c6de36d3852ec..0e888c8264c180d1ee4f494675ad8a853b4180b6 100644 --- a/pallets/distance/src/benchmarking.rs +++ b/pallets/distance/src/benchmarking.rs @@ -19,7 +19,7 @@ use super::*; use codec::Encode; -use frame_benchmarking::benchmarks; +use frame_benchmarking::v2::*; use frame_support::traits::{Currency, OnFinalize}; use frame_system::pallet_prelude::BlockNumberFor; use frame_system::RawOrigin; @@ -29,92 +29,150 @@ use sp_runtime::Perbill; use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} - -fn populate_pool<T: Config>(i: u32) -> Result<(), &'static str> { - EvaluationPool0::<T>::mutate(|current_pool| -> Result<(), &'static str> { - for j in 0..i { - current_pool - .evaluations - .try_push((j, median::MedianAcc::new())) - .map_err(|_| Error::<T>::QueueFull)?; - } - Ok(()) - }) -} - -benchmarks! { - where_clause { +#[benchmarks( where - T: pallet_balances::Config, T::Balance: From<u64>, + T: pallet_balances::Config, + T::Balance: From<u64>, BlockNumberFor<T>: From<u32>, +)] +mod benchmarks { + use super::*; + + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - // request distance evaluation - request_distance_evaluation { + fn populate_pool<T: Config>(i: u32) -> Result<(), &'static str> { + EvaluationPool0::<T>::mutate(|current_pool| -> Result<(), &'static str> { + for j in 0..i { + current_pool + .evaluations + .try_push((j, median::MedianAcc::new())) + .map_err(|_| Error::<T>::QueueFull)?; + } + Ok(()) + }) + } + + #[benchmark] + fn request_distance_evaluation() { let idty = T::IdtyIndex::one(); - let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let _ = <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); - }: _<T::RuntimeOrigin>(caller_origin.clone()) - verify { - assert!(PendingEvaluationRequest::<T>::get(idty) == Some(caller.clone()), "Request not added"); - assert_has_event::<T>(Event::<T>::EvaluationRequested { idty_index: idty, who: caller }.into()); + let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty) + .unwrap() + .owner_key; + let _ = + <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone())); + + assert!( + PendingEvaluationRequest::<T>::get(idty) == Some(caller.clone()), + "Request not added" + ); + assert_has_event::<T>( + Event::<T>::EvaluationRequested { + idty_index: idty, + who: caller, + } + .into(), + ); } - // request distance evaluation for - request_distance_evaluation_for { + #[benchmark] + fn request_distance_evaluation_for() { let idty = T::IdtyIndex::one(); - let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let _ = <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); - let target = 2u32; + let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty) + .unwrap() + .owner_key; + <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); + let target: T::IdtyIndex = 2u32; // set target status since targeted distance evaluation only allowed for unvalidated - pallet_identity::Identities::<T>::mutate(target, - |idty_val| idty_val.as_mut().unwrap().status = pallet_identity::IdtyStatus::Unvalidated); - }: _<T::RuntimeOrigin>(caller_origin.clone(), target) - verify { - assert!(PendingEvaluationRequest::<T>::get(target) == Some(caller.clone()), "Request not added"); - assert_has_event::<T>(Event::<T>::EvaluationRequested { idty_index: target, who: caller }.into()); + pallet_identity::Identities::<T>::mutate(target, |idty_val| { + idty_val.as_mut().unwrap().status = pallet_identity::IdtyStatus::Unvalidated + }); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone()), target); + + assert!( + PendingEvaluationRequest::<T>::get(target) == Some(caller.clone()), + "Request not added" + ); + assert_has_event::<T>( + Event::<T>::EvaluationRequested { + idty_index: target, + who: caller, + } + .into(), + ); } - // update evaluation - update_evaluation { + #[benchmark] + fn update_evaluation(i: Linear<1, MAX_EVALUATIONS_PER_SESSION>) -> Result<(), BenchmarkError> { let digest_data = sp_consensus_babe::digests::PreDigest::SecondaryPlain( - sp_consensus_babe::digests::SecondaryPlainPreDigest { authority_index: 0u32, slot: Default::default() }); + sp_consensus_babe::digests::SecondaryPlainPreDigest { + authority_index: 0u32, + slot: Default::default(), + }, + ); // A BABE digest item is needed to check authorship let digest = sp_runtime::DigestItem::PreRuntime(*b"BABE", digest_data.encode()); - let _ = <frame_system::Pallet<T>>::deposit_log(digest); + <frame_system::Pallet<T>>::deposit_log(digest); + populate_pool::<T>(i)?; + + #[extrinsic_call] + _( + RawOrigin::None, + ComputationResult { + distances: vec![Perbill::one(); i as usize], + }, + ); + + Ok(()) + } + + #[benchmark] + fn force_update_evaluation( + i: Linear<1, MAX_EVALUATIONS_PER_SESSION>, + ) -> Result<(), BenchmarkError> { let idty = T::IdtyIndex::one(); - let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let i in 1 .. MAX_EVALUATIONS_PER_SESSION => populate_pool::<T>(i)?; - }: _<T::RuntimeOrigin>(RawOrigin::None.into(), ComputationResult{distances: vec![Perbill::one(); i as usize]}) - - // force update evaluation - force_update_evaluation { - let idty = T::IdtyIndex::one(); - let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let i in 1 .. MAX_EVALUATIONS_PER_SESSION => populate_pool::<T>(i)?; - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), caller.clone(), ComputationResult{distances: vec![Perbill::one(); i as usize]}) - - // force valid distance status - force_valid_distance_status { + let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty) + .unwrap() + .owner_key; + populate_pool::<T>(i)?; + + #[extrinsic_call] + _( + RawOrigin::Root, + caller, + ComputationResult { + distances: vec![Perbill::one(); i as usize], + }, + ); + + Ok(()) + } + + #[benchmark] + fn force_valid_distance_status() { let idty = T::IdtyIndex::one(); - let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty).unwrap().owner_key; - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), idty) - verify { + + #[extrinsic_call] + _(RawOrigin::Root, idty); + assert_has_event::<T>(Event::<T>::EvaluatedValid { idty_index: idty }.into()); } - // on finalize - on_finalize { + #[benchmark] + fn on_finalize() { DidUpdate::<T>::set(true); - }: { Pallet::<T>::on_finalize(Default::default()); } - verify { + + #[block] + { + Pallet::<T>::on_finalize(Default::default()); + } + assert!(!DidUpdate::<T>::get()); } diff --git a/pallets/duniter-account/src/benchmarking.rs b/pallets/duniter-account/src/benchmarking.rs index 27a839e1a714503c4c3f01dd940f1cec48576771..74835636c1c00dd0fdc1f6757976e2cce2a43360 100644 --- a/pallets/duniter-account/src/benchmarking.rs +++ b/pallets/duniter-account/src/benchmarking.rs @@ -18,73 +18,139 @@ use super::*; -use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_benchmarking::v2::*; use frame_support::sp_runtime::{traits::One, Saturating}; -use frame_support::traits::{Currency, Get}; +use frame_support::traits::Currency; +use frame_system::RawOrigin; use pallet_provide_randomness::OnFilledRandomness; use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} +#[benchmarks] +mod benchmarks { + use super::*; -fn create_pending_accounts<T: Config>( - i: u32, - is_balance: bool, - is_sufficient: bool, -) -> Result<(), &'static str> { - for _ in 0..i { - let caller: T::AccountId = whitelisted_caller(); - if is_balance { - let existential_deposit = T::ExistentialDeposit::get(); - let balance = existential_deposit.saturating_mul((200u32).into()); - let _ = <pallet_balances::Pallet<T> as Currency<T::AccountId>>::make_free_balance_be( - &caller, balance, - ); - } else { - assert!( - frame_system::Pallet::<T>::get(&caller).free - < T::NewAccountPrice::get() + T::ExistentialDeposit::get() - ); - } - if is_sufficient { - frame_system::Pallet::<T>::inc_sufficients(&caller); - } else { - assert!(frame_system::Pallet::<T>::sufficients(&caller) == 0); + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); + } + + fn create_pending_accounts<T: Config>( + i: u32, + is_balance: bool, + is_sufficient: bool, + ) -> Result<(), &'static str> { + for _ in 0..i { + let caller: T::AccountId = whitelisted_caller(); + if is_balance { + let existential_deposit = T::ExistentialDeposit::get(); + let balance = existential_deposit.saturating_mul((200u32).into()); + let _ = + <pallet_balances::Pallet<T> as Currency<T::AccountId>>::make_free_balance_be( + &caller, balance, + ); + } else { + assert!( + frame_system::Pallet::<T>::get(&caller).free + < T::NewAccountPrice::get() + T::ExistentialDeposit::get() + ); + } + if is_sufficient { + frame_system::Pallet::<T>::inc_sufficients(&caller); + } else { + assert!(frame_system::Pallet::<T>::sufficients(&caller) == 0); + } + PendingNewAccounts::<T>::insert(caller, ()); } - PendingNewAccounts::<T>::insert(caller, ()); + Ok(()) } - Ok(()) -} -benchmarks! { - unlink_identity { + #[benchmark] + fn unlink_identity() { let account = account("Alice", 1, 1); - let origin = frame_system::RawOrigin::Signed(account); - }: _<T::RuntimeOrigin>(origin.into()) - on_initialize_sufficient { - let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, false, true)?; - }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } - on_initialize_with_balance { - let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, true, false)?; - }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } - on_initialize_no_balance { - let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, false, false)?; - }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } - on_filled_randomness_pending { + + #[extrinsic_call] + _(RawOrigin::Signed(account)); + } + + #[benchmark] + fn on_initialize_sufficient( + i: Linear<0, { T::MaxNewAccountsPerBlock::get() }>, + ) -> Result<(), BenchmarkError> { + create_pending_accounts::<T>(i, false, true)?; + + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); + } + + Ok(()) + } + + #[benchmark] + fn on_initialize_with_balance( + i: Linear<0, { T::MaxNewAccountsPerBlock::get() }>, + ) -> Result<(), BenchmarkError> { + create_pending_accounts::<T>(i, true, false)?; + + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); + } + + Ok(()) + } + + #[benchmark] + fn on_initialize_no_balance( + i: Linear<0, { T::MaxNewAccountsPerBlock::get() }>, + ) -> Result<(), BenchmarkError> { + create_pending_accounts::<T>(i, false, false)?; + + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); + } + + Ok(()) + } + + #[benchmark] + fn on_filled_randomness_pending() { let caller: T::AccountId = whitelisted_caller(); let randomness = H256(T::AccountIdToSalt::convert(caller.clone())); - let request_id = pallet_provide_randomness::Pallet::<T>::force_request(pallet_provide_randomness::RandomnessType::RandomnessFromTwoEpochsAgo, randomness); + let request_id = pallet_provide_randomness::Pallet::<T>::force_request( + pallet_provide_randomness::RandomnessType::RandomnessFromTwoEpochsAgo, + randomness, + ); PendingRandomIdAssignments::<T>::insert(request_id, caller.clone()); - }: { Pallet::<T>::on_filled_randomness(request_id, randomness); } - verify { - assert_has_event::<T>(Event::<T>::RandomIdAssigned { who: caller, random_id: randomness }.into()); + + #[block] + { + Pallet::<T>::on_filled_randomness(request_id, randomness); + } + + assert_has_event::<T>( + Event::<T>::RandomIdAssigned { + who: caller, + random_id: randomness, + } + .into(), + ); } - on_filled_randomness_no_pending { + + #[benchmark] + fn on_filled_randomness_no_pending() { let caller: T::AccountId = whitelisted_caller(); let randomness = H256(T::AccountIdToSalt::convert(caller.clone())); - let request_id = pallet_provide_randomness::Pallet::<T>::force_request(pallet_provide_randomness::RandomnessType::RandomnessFromTwoEpochsAgo, randomness); + let request_id = pallet_provide_randomness::Pallet::<T>::force_request( + pallet_provide_randomness::RandomnessType::RandomnessFromTwoEpochsAgo, + randomness, + ); assert!(!PendingRandomIdAssignments::<T>::contains_key(request_id)); - }: { Pallet::<T>::on_filled_randomness(request_id, randomness); } + + #[block] + { + Pallet::<T>::on_filled_randomness(request_id, randomness); + } + } } diff --git a/pallets/identity/src/benchmarking.rs b/pallets/identity/src/benchmarking.rs index 0d4fe93e42ccc159f6b6c438857d078fb553a798..89db5ffe4cf602691632743a11a86e925baccd8e 100644 --- a/pallets/identity/src/benchmarking.rs +++ b/pallets/identity/src/benchmarking.rs @@ -20,7 +20,8 @@ use super::*; //use codec::Encode; use codec::Encode; -use frame_benchmarking::{account, benchmarks}; +use frame_benchmarking::account; +use frame_benchmarking::v2::*; use frame_support::traits::OnInitialize; use frame_system::pallet_prelude::BlockNumberFor; use frame_system::RawOrigin; @@ -30,128 +31,146 @@ use sp_runtime::{AccountId32, MultiSigner}; use crate::Pallet; -const SEED: u32 = 1; - -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} +#[benchmarks( + where + T::Signature: From<sp_core::sr25519::Signature>, + T::Signature: From<sp_core::sr25519::Signature>, + T::AccountId: From<AccountId32>, + T::IdtyIndex: From<u32>, +)] +mod benchmarks { + use super::*; -struct Account<T: Config> { - key: T::AccountId, - index: T::IdtyIndex, - origin: <T as frame_system::Config>::RuntimeOrigin, - // name: IdtyName, -} + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); + } -// Create and confirm one account using Alice authorized account. -// key, origin, name and index are returned. -// Alice next_creatable_identity_on is reinitialized at the end so several account can be -// created in a row. -fn create_one_identity<T: Config>(owner_key: T::AccountId) -> Result<Account<T>, &'static str> { - // get Alice account to create identity - let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::from(1u32)) - .unwrap() - .owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = - RawOrigin::Signed(caller.clone()).into(); - let owner_key_origin: <T as frame_system::Config>::RuntimeOrigin = - RawOrigin::Signed(owner_key.clone()).into(); - Pallet::<T>::create_identity(caller_origin.clone(), owner_key.clone())?; - let name = IdtyName("new_identity".into()); - Pallet::<T>::confirm_identity(owner_key_origin.clone(), name.clone())?; - let idty_index = IdentityIndexOf::<T>::get(&owner_key).unwrap(); - // make identity member - <Identities<T>>::mutate_exists(idty_index, |idty_val_opt| { - if let Some(ref mut idty_val) = idty_val_opt { - idty_val.status = IdtyStatus::Member; - } - }); - // Reset next_creatable_identity_on to add more identities with Alice - <Identities<T>>::mutate_exists(T::IdtyIndex::from(1u32), |idty_val_opt| { - if let Some(ref mut idty_val) = idty_val_opt { - idty_val.next_creatable_identity_on = BlockNumberFor::<T>::zero(); - } - }); - Ok(Account { - key: owner_key, - index: idty_index, - origin: owner_key_origin, - // name: name, - }) -} + struct Account<T: Config> { + key: T::AccountId, + index: T::IdtyIndex, + origin: <T as frame_system::Config>::RuntimeOrigin, + } -// Create a dummy identity bypassing all the checks. -fn create_dummy_identity<T: Config>(i: u32) -> Result<(), &'static str> { - let idty_index: T::IdtyIndex = i.into(); - let owner_key: T::AccountId = account("Bob", i, SEED); - let next_scheduled = BlockNumberFor::<T>::zero(); - let value = IdtyValue { - data: Default::default(), - next_creatable_identity_on: BlockNumberFor::<T>::zero(), - old_owner_key: None, - owner_key: owner_key.clone(), - next_scheduled, - status: IdtyStatus::Unvalidated, - }; - let name = i.to_le_bytes(); - let idty_name = IdtyName(name.into()); - <Identities<T>>::insert(idty_index, value); - IdentityChangeSchedule::<T>::append(next_scheduled, idty_index); - IdentityIndexOf::<T>::insert(owner_key.clone(), idty_index); - <IdentitiesNames<T>>::insert(idty_name.clone(), idty_index); - Ok(()) -} + // Create and confirm one account using Alice authorized account. + // key, origin, name and index are returned. + // Alice next_creatable_identity_on is reinitialized at the end so several account can be + // created in a row. + fn create_one_identity<T: Config>(owner_key: T::AccountId) -> Result<Account<T>, &'static str> { + // get Alice account to create identity + let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::from(1u32)) + .unwrap() + .owner_key; + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(caller.clone()).into(); + let owner_key_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(owner_key.clone()).into(); + Pallet::<T>::create_identity(caller_origin.clone(), owner_key.clone())?; + let name = IdtyName("new_identity".into()); + Pallet::<T>::confirm_identity(owner_key_origin.clone(), name.clone())?; + let idty_index = IdentityIndexOf::<T>::get(&owner_key).unwrap(); + // make identity member + <Identities<T>>::mutate_exists(idty_index, |idty_val_opt| { + if let Some(ref mut idty_val) = idty_val_opt { + idty_val.status = IdtyStatus::Member; + } + }); + // Reset next_creatable_identity_on to add more identities with Alice + <Identities<T>>::mutate_exists(T::IdtyIndex::from(1u32), |idty_val_opt| { + if let Some(ref mut idty_val) = idty_val_opt { + idty_val.next_creatable_identity_on = BlockNumberFor::<T>::zero(); + } + }); + Ok(Account { + key: owner_key, + index: idty_index, + origin: owner_key_origin, + // name: name, + }) + } -// Add `i` dummy identities. -fn create_identities<T: Config>(i: u32) -> Result<(), &'static str> { - let identities_count = Pallet::<T>::identities_count(); - for j in 0..i { - create_dummy_identity::<T>(j + identities_count + 1)?; + // Create a dummy identity bypassing all the checks. + fn create_dummy_identity<T: Config>(i: u32) -> Result<(), &'static str> { + let idty_index: T::IdtyIndex = i.into(); + let owner_key: T::AccountId = account("Bob", i, 1); + let next_scheduled = BlockNumberFor::<T>::zero(); + let value = IdtyValue { + data: Default::default(), + next_creatable_identity_on: BlockNumberFor::<T>::zero(), + old_owner_key: None, + owner_key: owner_key.clone(), + next_scheduled, + status: IdtyStatus::Unvalidated, + }; + let name = i.to_le_bytes(); + let idty_name = IdtyName(name.into()); + <Identities<T>>::insert(idty_index, value); + IdentityChangeSchedule::<T>::append(next_scheduled, idty_index); + IdentityIndexOf::<T>::insert(owner_key.clone(), idty_index); + <IdentitiesNames<T>>::insert(idty_name.clone(), idty_index); + Ok(()) } - assert!( - identities_count + i == Pallet::<T>::identities_count(), - "Identities not created" - ); - Ok(()) -} -benchmarks! { - where_clause { - where - T::Signature: From<sp_core::sr25519::Signature>, - T::Signature: From<sp_core::sr25519::Signature>, - T::AccountId: From<AccountId32>, - T::IdtyIndex: From<u32>, + // Add `i` dummy identities. + fn create_identities<T: Config>(i: u32) -> Result<(), &'static str> { + let identities_count = Pallet::<T>::identities_count(); + for j in 0..i { + create_dummy_identity::<T>(j + identities_count + 1)?; + } + assert!( + identities_count + i == Pallet::<T>::identities_count(), + "Identities not created" + ); + Ok(()) } - // create identity - create_identity { - let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key; // Alice - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let owner_key: T::AccountId = account("new_identity", 2, SEED); - }: _<T::RuntimeOrigin>(caller_origin.clone(), owner_key.clone()) - verify { + #[benchmark] + fn create_identity() { + let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key; // Alice + let owner_key: T::AccountId = account("new_identity", 2, 1); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), owner_key.clone()); + let idty_index = IdentityIndexOf::<T>::get(&owner_key); assert!(idty_index.is_some(), "Identity not added"); - assert_has_event::<T>(Event::<T>::IdtyCreated { idty_index: idty_index.unwrap(), owner_key }.into()); + assert_has_event::<T>( + Event::<T>::IdtyCreated { + idty_index: idty_index.unwrap(), + owner_key, + } + .into(), + ); } - // confirm identity - confirm_identity { - let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key; - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let owner_key: T::AccountId = account("new_identity", 2, SEED); - let owner_key_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(owner_key.clone()).into(); + #[benchmark] + fn confirm_identity() -> Result<(), BenchmarkError> { + let caller: T::AccountId = Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key; + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(caller.clone()).into(); + let owner_key: T::AccountId = account("new_identity", 2, 1); Pallet::<T>::create_identity(caller_origin.clone(), owner_key.clone())?; - }: _<T::RuntimeOrigin>(owner_key_origin.clone(), IdtyName("new_identity".into())) - verify { + + #[extrinsic_call] + _( + RawOrigin::Signed(owner_key.clone()), + IdtyName("new_identity".into()), + ); + let idty_index = IdentityIndexOf::<T>::get(&owner_key); - assert_has_event::<T>(Event::<T>::IdtyConfirmed { idty_index: idty_index.unwrap(), owner_key, name: IdtyName("new_identity".into()) }.into()); + assert_has_event::<T>( + Event::<T>::IdtyConfirmed { + idty_index: idty_index.unwrap(), + owner_key, + name: IdtyName("new_identity".into()), + } + .into(), + ); + Ok(()) } - // change owner key - change_owner_key { - let old_key: T::AccountId = account("new_identity", 2, SEED); + #[benchmark] + fn change_owner_key() -> Result<(), BenchmarkError> { + let old_key: T::AccountId = account("new_identity", 2, 1); let account: Account<T> = create_one_identity(old_key.clone())?; // Change key a first time to add an old-old key @@ -164,12 +183,14 @@ benchmarks! { let message = (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode(); let caller_public = sr25519_generate(0.into(), None); let caller: T::AccountId = MultiSigner::Sr25519(caller_public).into_account().into(); - let signature = sr25519_sign(0.into(), &caller_public, &message).unwrap().into(); + let signature = sr25519_sign(0.into(), &caller_public, &message) + .unwrap() + .into(); Pallet::<T>::change_owner_key(account.origin.clone(), caller.clone(), signature)?; // Change key a second time to benchmark // The sufficients for the old_old key will drop to 0 during benchmark - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller_origin = RawOrigin::Signed(caller.clone()); let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let new_key_payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, @@ -179,17 +200,33 @@ benchmarks! { let message = (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode(); let caller_public = sr25519_generate(0.into(), None); let caller: T::AccountId = MultiSigner::Sr25519(caller_public).into_account().into(); - let signature = sr25519_sign(0.into(), &caller_public, &message).unwrap().into(); - <frame_system::Pallet<T>>::set_block_number(<frame_system::Pallet<T>>::block_number() + T::ChangeOwnerKeyPeriod::get()); - }: _<T::RuntimeOrigin>(caller_origin.clone(), caller.clone(), signature) - verify { - assert_has_event::<T>(Event::<T>::IdtyChangedOwnerKey { idty_index: account.index, new_owner_key: caller.clone() }.into()); - assert!(IdentityIndexOf::<T>::get(&caller).unwrap() == account.index, "Owner key not changed"); + let signature = sr25519_sign(0.into(), &caller_public, &message) + .unwrap() + .into(); + <frame_system::Pallet<T>>::set_block_number( + <frame_system::Pallet<T>>::block_number() + T::ChangeOwnerKeyPeriod::get(), + ); + + #[extrinsic_call] + _(caller_origin, caller.clone(), signature); + + assert_has_event::<T>( + Event::<T>::IdtyChangedOwnerKey { + idty_index: account.index, + new_owner_key: caller.clone(), + } + .into(), + ); + assert!( + IdentityIndexOf::<T>::get(&caller).unwrap() == account.index, + "Owner key not changed" + ); + Ok(()) } - // revoke identity - revoke_identity { - let old_key: T::AccountId = account("new_identity", 2, SEED); + #[benchmark] + fn revoke_identity() -> Result<(), BenchmarkError> { + let old_key: T::AccountId = account("new_identity", 2, 1); let account: Account<T> = create_one_identity(old_key.clone())?; // Change key @@ -203,7 +240,9 @@ benchmarks! { let message = (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode(); let caller_public = sr25519_generate(0.into(), None); let caller: T::AccountId = MultiSigner::Sr25519(caller_public).into_account().into(); - let signature = sr25519_sign(0.into(), &caller_public, &message).unwrap().into(); + let signature = sr25519_sign(0.into(), &caller_public, &message) + .unwrap() + .into(); Pallet::<T>::change_owner_key(account.origin.clone(), caller.clone(), signature)?; let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); @@ -212,147 +251,252 @@ benchmarks! { idty_index: account.index, }; let message = (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode(); - let signature = sr25519_sign(0.into(), &caller_public, &message).unwrap().into(); - }: _<T::RuntimeOrigin>(account.origin, account.index, caller.clone(), signature) - verify { - assert_has_event::<T>(Event::<T>::IdtyRevoked { idty_index: account.index, reason: RevocationReason::User }.into()); - // revocation does not mean deletion anymore - // assert!(IdentityIndexOf::<T>::get(&account.key).is_none(), "Identity not revoked"); + let signature = sr25519_sign(0.into(), &caller_public, &message) + .unwrap() + .into(); + + #[extrinsic_call] + _( + RawOrigin::Signed(account.key), + account.index, + caller.clone(), + signature, + ); + + assert_has_event::<T>( + Event::<T>::IdtyRevoked { + idty_index: account.index, + reason: RevocationReason::User, + } + .into(), + ); + Ok(()) } - // The complexity depends on the number of identities to prune - prune_item_identities_names { + #[benchmark] + fn prune_item_identities_names(i: Linear<2, 1_000>) -> Result<(), BenchmarkError> { + // The complexity depends on the number of identities to prune // Populate identities let identities_count = Pallet::<T>::identities_count(); - let i in 1 .. 1000 => create_identities::<T>(i)?; + create_identities::<T>(i)?; let mut names = Vec::<IdtyName>::new(); for k in 1..i { let name: IdtyName = IdtyName((k + identities_count).to_le_bytes().into()); - assert!(IdentitiesNames::<T>::contains_key(&name), "Name not existing"); + assert!( + IdentitiesNames::<T>::contains_key(&name), + "Name not existing" + ); names.push(name); } - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), names.clone()) - verify { + + #[extrinsic_call] + _(RawOrigin::Root, names.clone()); + for name in names { assert!(!IdentitiesNames::<T>::contains_key(&name), "Name existing"); } + Ok(()) } - // fix sufficients identity - fix_sufficients { - let new_identity: T::AccountId = account("Bob", 2, SEED); + #[benchmark] + fn fix_sufficients() -> Result<(), BenchmarkError> { + let new_identity: T::AccountId = account("Bob", 2, 1); let account: Account<T> = create_one_identity(new_identity)?; let sufficient = frame_system::Pallet::<T>::sufficients(&account.key); - }: _<T::RuntimeOrigin>(RawOrigin::Root.into(), account.key.clone(), true) - verify { - assert!(sufficient < frame_system::Pallet::<T>::sufficients(&account.key), "Sufficient not incremented"); + + #[extrinsic_call] + _(RawOrigin::Root, account.key.clone(), true); + + assert!( + sufficient < frame_system::Pallet::<T>::sufficients(&account.key), + "Sufficient not incremented" + ); + Ok(()) } - // link account - link_account { - let alice_origin = RawOrigin::Signed(Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key); + #[benchmark] + fn link_account() -> Result<(), BenchmarkError> { + let alice_origin = + RawOrigin::Signed(Identities::<T>::get(T::IdtyIndex::one()).unwrap().owner_key); let bob_public = sr25519_generate(0.into(), None); let bob: T::AccountId = MultiSigner::Sr25519(bob_public).into_account().into(); frame_system::Pallet::<T>::inc_providers(&bob); let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let payload = ( - LINK_IDTY_PAYLOAD_PREFIX, genesis_hash, T::IdtyIndex::one(), bob.clone(), - ).encode(); - let signature = sr25519_sign(0.into(), &bob_public, &payload).unwrap().into(); - }: _<T::RuntimeOrigin>(alice_origin.into(), bob, signature) + LINK_IDTY_PAYLOAD_PREFIX, + genesis_hash, + T::IdtyIndex::one(), + bob.clone(), + ) + .encode(); + let signature = sr25519_sign(0.into(), &bob_public, &payload) + .unwrap() + .into(); - // Base weight of an empty initialize - on_initialize { - }: {Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero());} + #[extrinsic_call] + _(alice_origin, bob, signature); - // --- do revoke identity - do_revoke_identity_noop { + Ok(()) + } + + #[benchmark] + fn on_initialize() { + // Base weight of an empty initialize + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero()); + } + } + + #[benchmark] + fn do_revoke_identity_noop() { let idty_index: T::IdtyIndex = 0u32.into(); assert!(Identities::<T>::get(idty_index).is_none()); - }: {Pallet::<T>::do_revoke_identity(idty_index, RevocationReason::Root);} - do_revoke_identity { + + #[block] + { + Pallet::<T>::do_revoke_identity(idty_index, RevocationReason::Root); + } + } + + #[benchmark] + fn do_revoke_identity() { let idty_index: T::IdtyIndex = 1u32.into(); - let new_identity: T::AccountId = account("Bob", 2, SEED); + let new_identity: T::AccountId = account("Bob", 2, 1); assert!(Identities::<T>::get(idty_index).is_some()); - Identities::<T>::mutate( idty_index, |id| { + Identities::<T>::mutate(idty_index, |id| { if let Some(id) = id { id.old_owner_key = Some((new_identity, BlockNumberFor::<T>::zero())); } }); - assert!(Identities::<T>::get(idty_index).unwrap().old_owner_key.is_some()); - }: {Pallet::<T>::do_revoke_identity(idty_index, RevocationReason::Root);} - verify { - assert_has_event::<T>(Event::<T>::IdtyRevoked { idty_index, reason: RevocationReason::Root }.into()); + assert!(Identities::<T>::get(idty_index) + .unwrap() + .old_owner_key + .is_some()); + + #[block] + { + Pallet::<T>::do_revoke_identity(idty_index, RevocationReason::Root); + } + + assert_has_event::<T>( + Event::<T>::IdtyRevoked { + idty_index, + reason: RevocationReason::Root, + } + .into(), + ); } - // --- do remove identity - do_remove_identity_noop { + #[benchmark] + fn do_remove_identity_noop() { let idty_index: T::IdtyIndex = 0u32.into(); assert!(Identities::<T>::get(idty_index).is_none()); - }: {Pallet::<T>::do_remove_identity(idty_index, RemovalReason::Revoked);} - do_remove_identity { + + #[block] + { + Pallet::<T>::do_remove_identity(idty_index, RemovalReason::Revoked); + } + } + + #[benchmark] + fn do_remove_identity() { let idty_index: T::IdtyIndex = 1u32.into(); - let new_identity: T::AccountId = account("Bob", 2, SEED); + let new_identity: T::AccountId = account("Bob", 2, 1); assert!(Identities::<T>::get(idty_index).is_some()); - Identities::<T>::mutate( idty_index, |id| { + Identities::<T>::mutate(idty_index, |id| { if let Some(id) = id { id.old_owner_key = Some((new_identity, BlockNumberFor::<T>::zero())); } }); - assert!(Identities::<T>::get(idty_index).unwrap().old_owner_key.is_some()); - }: {Pallet::<T>::do_remove_identity(idty_index, RemovalReason::Revoked);} - verify { - assert_has_event::<T>(Event::<T>::IdtyRemoved { idty_index, reason: RemovalReason::Revoked }.into()); + assert!(Identities::<T>::get(idty_index) + .unwrap() + .old_owner_key + .is_some()); + + #[block] + { + Pallet::<T>::do_remove_identity(idty_index, RemovalReason::Revoked); + } + + assert_has_event::<T>( + Event::<T>::IdtyRemoved { + idty_index, + reason: RemovalReason::Revoked, + } + .into(), + ); } - // --- prune identities - prune_identities_noop { + #[benchmark] + fn prune_identities_noop() { assert!(IdentityChangeSchedule::<T>::try_get(BlockNumberFor::<T>::zero()).is_err()); - }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} - prune_identities_none { + #[block] + { + Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero()); + } + } + + #[benchmark] + fn prune_identities_none() { let idty_index: T::IdtyIndex = 100u32.into(); IdentityChangeSchedule::<T>::append(BlockNumberFor::<T>::zero(), idty_index); assert!(IdentityChangeSchedule::<T>::try_get(BlockNumberFor::<T>::zero()).is_ok()); assert!(<Identities<T>>::try_get(idty_index).is_err()); - }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} - prune_identities_err { + #[block] + { + Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero()); + } + } + + #[benchmark] + fn prune_identities_err() -> Result<(), BenchmarkError> { let idty_index: T::IdtyIndex = 100u32.into(); create_dummy_identity::<T>(100u32)?; IdentityChangeSchedule::<T>::append(BlockNumberFor::<T>::zero(), idty_index); - }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} + + #[block] + { + Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero()); + } + + Ok(()) + } impl_benchmark_test_suite!( Pallet, // Create genesis identity Alice to test benchmark in mock - crate::mock::new_test_ext(crate::mock::IdentityConfig{ identities: vec![ - GenesisIdty { - index: 1, - name: IdtyName::from("Alice"), - value: IdtyValue { - data: (), - next_creatable_identity_on: 0, - old_owner_key: None, - owner_key: account("Alice", 1, SEED), - next_scheduled: 0, - status: crate::IdtyStatus::Member, + crate::mock::new_test_ext(crate::mock::IdentityConfig { + identities: vec![ + crate::GenesisIdty { + index: 1, + name: crate::IdtyName::from("Alice"), + value: crate::IdtyValue { + data: (), + next_creatable_identity_on: 0, + old_owner_key: None, + owner_key: frame_benchmarking::account("Alice", 1, 1), + next_scheduled: 0, + status: crate::IdtyStatus::Member, + }, }, - }, - GenesisIdty { - index: 2, - name: IdtyName::from("Bob"), - value: IdtyValue { - data: (), - next_creatable_identity_on: 0, - old_owner_key: None, - owner_key: account("Bob", 1, SEED), - next_scheduled: 0, - status: crate::IdtyStatus::Unconfirmed, + crate::GenesisIdty { + index: 2, + name: crate::IdtyName::from("Bob"), + value: crate::IdtyValue { + data: (), + next_creatable_identity_on: 0, + old_owner_key: None, + owner_key: frame_benchmarking::account("Bob", 1, 1), + next_scheduled: 0, + status: crate::IdtyStatus::Unconfirmed, + }, }, - }, - ]}), + ] + }), crate::mock::Test, ); } diff --git a/pallets/membership/src/benchmarking.rs b/pallets/membership/src/benchmarking.rs index a3475c7d031209aa5f8b2820e0e5a4536e139e88..0f2be6c80895b9548bc523acd5b1720e92b01fd7 100644 --- a/pallets/membership/src/benchmarking.rs +++ b/pallets/membership/src/benchmarking.rs @@ -18,58 +18,66 @@ use super::*; -use frame_benchmarking::benchmarks; +use frame_benchmarking::v2::*; use frame_system::pallet_prelude::BlockNumberFor; -#[cfg(test)] -use maplit::btreemap; - use crate::Pallet; -// fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { -// frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -// } - -benchmarks! { - where_clause { +#[benchmarks( where T::IdtyId: From<u32>, BlockNumberFor<T>: From<u32>, - } +)] +mod benchmarks { + use super::*; // TODO membership add and renewal should be included to distance on_new_session as worst case scenario - // Base weight of an empty initialize - on_initialize { - }: {Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero());} + #[benchmark] + fn on_initialize() { + // Base weight of an empty initialize + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero()); + } + } - expire_memberships { - let i in 0..3; // Limited by the number of validators + #[benchmark] + fn expire_memberships(i: Linear<0, 3>) { + // Limited by the number of validators // Arbitrarily high, to be in the worst case of wot instance, // this will overcount the weight in hooks see https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/167 - let block_number: BlockNumberFor::<T> = 10_000_000.into(); + let block_number: BlockNumberFor<T> = 10_000_000.into(); frame_system::pallet::Pallet::<T>::set_block_number(block_number); let mut idties: Vec<T::IdtyId> = Vec::new(); - for j in 1..i+1 { + for j in 1..i + 1 { let j: T::IdtyId = j.into(); Membership::<T>::insert(j, MembershipData::<BlockNumberFor<T>>::default()); idties.push(j); } MembershipsExpireOn::<T>::insert(block_number, idties); - assert_eq!(MembershipsExpireOn::<T>::get(block_number).len(), i as usize); - }: {Pallet::<T>::expire_memberships(block_number);} - verify { + assert_eq!( + MembershipsExpireOn::<T>::get(block_number).len(), + i as usize + ); + + #[block] + { + Pallet::<T>::expire_memberships(block_number); + } + assert_eq!(MembershipsExpireOn::<T>::get(block_number).len(), 0_usize); } impl_benchmark_test_suite!( Pallet, crate::mock::new_test_ext(crate::mock::MembershipConfig { - memberships: btreemap![ - 3 => MembershipData { - expire_on: 3, - }, - ],}), + memberships: maplit::btreemap![ + 3 => crate::MembershipData { + expire_on: 3, + }, + ], + }), crate::mock::Test ); } diff --git a/pallets/oneshot-account/src/benchmarking.rs b/pallets/oneshot-account/src/benchmarking.rs index dcc72ff2ef144d8b1474d61aded1734d33a796f3..cf79d049413a018a17f12aa4561b09d383988259 100644 --- a/pallets/oneshot-account/src/benchmarking.rs +++ b/pallets/oneshot-account/src/benchmarking.rs @@ -18,7 +18,8 @@ use super::*; -use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_benchmarking::v2::*; +use frame_benchmarking::{account, whitelisted_caller}; use frame_support::pallet_prelude::IsType; use frame_support::traits::Get; use frame_system::RawOrigin; @@ -26,90 +27,99 @@ use pallet_balances::Pallet as Balances; use crate::Pallet; -const SEED: u32 = 0; - -benchmarks! { - where_clause { +#[benchmarks( where T: pallet_balances::Config, T::Balance: From<u64>, <T::Currency as Currency<T::AccountId>>::Balance: IsType<T::Balance>+From<T::Balance> - } - create_oneshot_account { +)] +mod benchmarks { + use super::*; + + #[benchmark] + fn create_oneshot_account() { let existential_deposit = T::ExistentialDeposit::get(); let caller = whitelisted_caller(); - - // Give some multiple of the existential deposit let balance = existential_deposit.saturating_mul((2).into()); let _ = T::Currency::make_free_balance_be(&caller, balance.into()); - - let recipient: T::AccountId = account("recipient", 0, SEED); + let recipient: T::AccountId = account("recipient", 0, 1); let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone()); let transfer_amount = existential_deposit; - }: _(RawOrigin::Signed(caller.clone()), recipient_lookup, transfer_amount.into()) - verify { + + #[extrinsic_call] + _( + RawOrigin::Signed(caller.clone()), + recipient_lookup, + transfer_amount.into(), + ); + assert_eq!(Balances::<T>::free_balance(&caller), transfer_amount); - assert_eq!(OneshotAccounts::<T>::get(&recipient), Some(transfer_amount.into())); + assert_eq!( + OneshotAccounts::<T>::get(&recipient), + Some(transfer_amount.into()) + ); } - consume_oneshot_account { + + #[benchmark] + fn consume_oneshot_account() { let existential_deposit = T::ExistentialDeposit::get(); let caller: T::AccountId = whitelisted_caller(); - - // Give some multiple of the existential deposit let balance = existential_deposit.saturating_mul((2).into()); OneshotAccounts::<T>::insert( caller.clone(), - Into::<<T::Currency as Currency<T::AccountId>>::Balance>::into(balance) + Into::<<T::Currency as Currency<T::AccountId>>::Balance>::into(balance), ); - // Deposit into a normal account is more expensive than into a oneshot account // so we create the recipient account with an existential deposit. - let recipient: T::AccountId = account("recipient", 0, SEED); + let recipient: T::AccountId = account("recipient", 0, 1); let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone()); let _ = T::Currency::make_free_balance_be(&recipient, existential_deposit.into()); - }: _( - RawOrigin::Signed(caller.clone()), - BlockNumberFor::<T>::zero(), - Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient_lookup) - ) - verify { + + #[extrinsic_call] + _( + RawOrigin::Signed(caller.clone()), + BlockNumberFor::<T>::zero(), + Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient_lookup), + ); + assert_eq!(OneshotAccounts::<T>::get(&caller), None); assert_eq!( Balances::<T>::free_balance(&recipient), existential_deposit.saturating_mul((3).into()) ); } - consume_oneshot_account_with_remaining { + + #[benchmark] + fn consume_oneshot_account_with_remaining() { let existential_deposit = T::ExistentialDeposit::get(); let caller: T::AccountId = whitelisted_caller(); - - // Give some multiple of the existential deposit let balance = existential_deposit.saturating_mul((2).into()); OneshotAccounts::<T>::insert( caller.clone(), - Into::<<T::Currency as Currency<T::AccountId>>::Balance>::into(balance) + Into::<<T::Currency as Currency<T::AccountId>>::Balance>::into(balance), ); - // Deposit into a normal account is more expensive than into a oneshot account // so we create the recipient accounts with an existential deposits. - let recipient1: T::AccountId = account("recipient1", 0, SEED); + let recipient1: T::AccountId = account("recipient1", 0, 1); let recipient1_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient1.clone()); let _ = T::Currency::make_free_balance_be(&recipient1, existential_deposit.into()); - let recipient2: T::AccountId = account("recipient2", 1, SEED); + let recipient2: T::AccountId = account("recipient2", 1, 1); let recipient2_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient2.clone()); let _ = T::Currency::make_free_balance_be(&recipient2, existential_deposit.into()); - }: _( - RawOrigin::Signed(caller.clone()), - BlockNumberFor::<T>::zero(), - Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient1_lookup), - Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient2_lookup), - existential_deposit.into() - ) - verify { + + #[extrinsic_call] + _( + RawOrigin::Signed(caller.clone()), + BlockNumberFor::<T>::zero(), + Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient1_lookup), + Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient2_lookup), + existential_deposit.into(), + ); + assert_eq!(OneshotAccounts::<T>::get(&caller), None); assert_eq!( Balances::<T>::free_balance(&recipient1), @@ -121,9 +131,5 @@ benchmarks! { ); } - impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(), - crate::mock::Test - ); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); } diff --git a/pallets/provide-randomness/src/benchmarking.rs b/pallets/provide-randomness/src/benchmarking.rs index 56dfe1590f3fb824e454a8dda11fba9120bc6881..5f0ed8eedfa54ac9ea3905c9191f8df74bf157fc 100644 --- a/pallets/provide-randomness/src/benchmarking.rs +++ b/pallets/provide-randomness/src/benchmarking.rs @@ -18,7 +18,8 @@ use super::*; -use frame_benchmarking::{benchmarks, whitelisted_caller}; +use frame_benchmarking::v2::*; +use frame_benchmarking::whitelisted_caller; use frame_support::ensure; use frame_support::pallet_prelude::IsType; use frame_support::sp_runtime::{traits::One, Saturating}; @@ -29,49 +30,51 @@ use sp_core::H256; use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} +#[benchmarks( + where + T: pallet_balances::Config, + T::Balance: From<u64>, + <T::Currency as Currency<T::AccountId>>::Balance: IsType<T::Balance>, + BlockNumberFor<T>: From<u32>, +)] +mod benchmarks { + use super::*; -fn add_requests_next_block<T: Config>(i: u32) -> Result<(), &'static str> { - for _ in 0..i { - let salt: H256 = H256([0; 32]); - let request_id = RequestIdProvider::<T>::mutate(|next_request_id| { - core::mem::replace(next_request_id, next_request_id.saturating_add(1)) - }); - RequestsIds::<T>::insert(request_id, ()); - RequestsReadyAtNextBlock::<T>::append(Request { request_id, salt }); + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - Ok(()) -} -fn add_requests_next_epoch<T: Config>(i: u32) -> Result<(), &'static str> { - for _ in 0..i { - let salt: H256 = H256([0; 32]); - let request_id = RequestIdProvider::<T>::mutate(|next_request_id| { - core::mem::replace(next_request_id, next_request_id.saturating_add(1)) - }); - RequestsIds::<T>::insert(request_id, ()); - RequestsReadyAtEpoch::<T>::append( - T::GetCurrentEpochIndex::get(), - Request { request_id, salt }, - ); + fn add_requests_next_block<T: Config>(i: u32) -> Result<(), &'static str> { + for _ in 0..i { + let salt: H256 = H256([0; 32]); + let request_id = RequestIdProvider::<T>::mutate(|next_request_id| { + core::mem::replace(next_request_id, next_request_id.saturating_add(1)) + }); + RequestsIds::<T>::insert(request_id, ()); + RequestsReadyAtNextBlock::<T>::append(Request { request_id, salt }); + } + Ok(()) } - Ok(()) -} -benchmarks! { - where_clause { where - T: pallet_balances::Config, - T::Balance: From<u64>, - <T::Currency as Currency<T::AccountId>>::Balance: IsType<T::Balance>, - BlockNumberFor<T>: From<u32>, + fn add_requests_next_epoch<T: Config>(i: u32) -> Result<(), &'static str> { + for _ in 0..i { + let salt: H256 = H256([0; 32]); + let request_id = RequestIdProvider::<T>::mutate(|next_request_id| { + core::mem::replace(next_request_id, next_request_id.saturating_add(1)) + }); + RequestsIds::<T>::insert(request_id, ()); + RequestsReadyAtEpoch::<T>::append( + T::GetCurrentEpochIndex::get(), + Request { request_id, salt }, + ); + } + Ok(()) } - request { + + #[benchmark] + fn request() { // Get account let caller: T::AccountId = whitelisted_caller(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = - RawOrigin::Signed(caller.clone()).into(); // Provide deposit let existential_deposit = T::ExistentialDeposit::get(); @@ -81,36 +84,71 @@ benchmarks! { // Set randomness parameters let random = RandomnessType::RandomnessFromOneEpochAgo; let salt: H256 = H256([1; 32]); - }: _<T::RuntimeOrigin>(caller_origin.clone(), random, salt) - verify { + + #[extrinsic_call] + _(RawOrigin::Signed(caller), random, salt); + let request_id = RequestIdProvider::<T>::get() - 1; - assert_has_event::<T>(Event::RequestedRandomness { - request_id, salt, r#type: random }.into() ); + assert_has_event::<T>( + Event::RequestedRandomness { + request_id, + salt, + r#type: random, + } + .into(), + ); } - on_initialize { - let i in 1 .. T::MaxRequests::get() => add_requests_next_block::<T>(i)?; + + #[benchmark] + fn on_initialize(i: Linear<1, { T::MaxRequests::get() }>) -> Result<(), BenchmarkError> { + add_requests_next_block::<T>(i)?; ensure!(RequestsIds::<T>::count() == i, "List not filled properly."); - ensure!(RequestsReadyAtNextBlock::<T>::get().len() == i as usize, "List not filled properly."); + ensure!( + RequestsReadyAtNextBlock::<T>::get().len() == i as usize, + "List not filled properly." + ); let next_epoch_hook_in = NexEpochHookIn::<T>::mutate(|next_in| { core::mem::replace(next_in, next_in.saturating_sub(1)) }); ensure!(next_epoch_hook_in != 1, "Will be next epoch."); - }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } - verify { + + #[block] + { + Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); + } + ensure!(RequestsIds::<T>::count() == 0, "List not processed."); - ensure!(RequestsReadyAtNextBlock::<T>::get().is_empty(), "List not processed."); + ensure!( + RequestsReadyAtNextBlock::<T>::get().is_empty(), + "List not processed." + ); + Ok(()) } - on_initialize_epoch { - let i in 1 .. T::MaxRequests::get() => add_requests_next_epoch::<T>(i)?; - ensure!(RequestsReadyAtNextBlock::<T>::get().is_empty(), "List not filled properly."); + + #[benchmark] + fn on_initialize_epoch(i: Linear<1, { T::MaxRequests::get() }>) -> Result<(), BenchmarkError> { + add_requests_next_epoch::<T>(i)?; + ensure!( + RequestsReadyAtNextBlock::<T>::get().is_empty(), + "List not filled properly." + ); ensure!(RequestsIds::<T>::count() == i, "List not filled properly."); - ensure!(RequestsReadyAtEpoch::<T>::get(T::GetCurrentEpochIndex::get()).len() == i as usize, "List not filled properly."); - let next_epoch_hook_in = NexEpochHookIn::<T>::mutate(|next_in| { - core::mem::replace(next_in, 1) - }); - }: { Pallet::<T>::on_initialize(1.into()); } - verify { + ensure!( + RequestsReadyAtEpoch::<T>::get(T::GetCurrentEpochIndex::get()).len() == i as usize, + "List not filled properly." + ); + NexEpochHookIn::<T>::mutate(|next_in| core::mem::replace(next_in, 1)); + + #[block] + { + Pallet::<T>::on_initialize(1.into()); + } + ensure!(RequestsIds::<T>::count() == 0, "List not processed."); - ensure!(RequestsReadyAtEpoch::<T>::get(T::GetCurrentEpochIndex::get()).is_empty(), "List not processed properly."); + ensure!( + RequestsReadyAtEpoch::<T>::get(T::GetCurrentEpochIndex::get()).is_empty(), + "List not processed properly." + ); + Ok(()) } } diff --git a/pallets/quota/src/benchmarking.rs b/pallets/quota/src/benchmarking.rs index bae829e73049f7fac956680a33be754b9ee95779..834268d9c014194c61a16a092e1fcd15c0f53e65 100644 --- a/pallets/quota/src/benchmarking.rs +++ b/pallets/quota/src/benchmarking.rs @@ -17,21 +17,25 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; -use frame_benchmarking::{account, benchmarks}; +use frame_benchmarking::account; +use frame_benchmarking::v2::*; use sp_runtime::traits::One; fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } -benchmarks! { - where_clause { +#[benchmarks( where IdtyId<T>: From<u32>, BalanceOf<T>: From<u64>, T::AccountId: From<[u8; 32]>, - } - queue_refund { +)] +mod benchmarks { + use super::*; + + #[benchmark] + fn queue_refund() { let account: T::AccountId = account("Alice", 1, 1); let dummy_refund = Refund { account: account.clone(), @@ -44,15 +48,21 @@ benchmarks! { amount: 10u64.into(), }; // Complexity is bound to MAX_QUEUD_REFUNDS where an insertion is O(n-1) - for i in 0..MAX_QUEUED_REFUNDS-1 { + for _ in 0..MAX_QUEUED_REFUNDS - 1 { Pallet::<T>::queue_refund(dummy_refund.clone()) } - }: { Pallet::<T>::queue_refund(refund.clone()) } - verify { + + #[block] + { + Pallet::<T>::queue_refund(refund.clone()); + } + assert_eq!(RefundQueue::<T>::get().last(), Some(refund).as_ref()); assert_eq!(RefundQueue::<T>::get().len() as u32, MAX_QUEUED_REFUNDS); } - spend_quota { + + #[benchmark] + fn spend_quota() { let idty_id: IdtyId<T> = 1u32.into(); let amount = 2u64; let quota_amount = 10u64; @@ -63,15 +73,23 @@ benchmarks! { amount: quota_amount.into(), }, ); - }: { Pallet::<T>::spend_quota(idty_id, amount.into()) } - verify { - let quota_growth = sp_runtime::Perbill::from_rational( - BlockNumberFor::<T>::one(), - T::ReloadRate::get(), - ).mul_floor(T::MaxQuota::get()); - assert_eq!(IdtyQuota::<T>::get(idty_id).unwrap().amount, quota_growth +quota_amount.into() - amount.into()); + + #[block] + { + Pallet::<T>::spend_quota(idty_id, amount.into()); + } + + let quota_growth = + sp_runtime::Perbill::from_rational(BlockNumberFor::<T>::one(), T::ReloadRate::get()) + .mul_floor(T::MaxQuota::get()); + assert_eq!( + IdtyQuota::<T>::get(idty_id).unwrap().amount, + quota_growth + quota_amount.into() - amount.into() + ); } - try_refund { + + #[benchmark] + fn try_refund() { let account: T::AccountId = account("Alice", 1, 1); let idty_id: IdtyId<T> = 1u32.into(); IdtyQuota::<T>::insert( @@ -81,9 +99,7 @@ benchmarks! { amount: 10u64.into(), }, ); - let _ = CurrencyOf::<T>:: make_free_balance_be( - &T::RefundAccount::get(),u32::MAX.into(), - ); + let _ = CurrencyOf::<T>::make_free_balance_be(&T::RefundAccount::get(), u32::MAX.into()); // The worst-case scenario is when the refund fails // and can only be triggered if the account is dead, // in this case by having no balance in the account. @@ -92,15 +108,19 @@ benchmarks! { identity: 1u32.into(), amount: 10u64.into(), }; - }: { Pallet::<T>::try_refund(refund) } - verify { - assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into()); + + #[block] + { + Pallet::<T>::try_refund(refund); + } + + assert_has_event::<T>(Event::<T>::RefundFailed(account).into()); } - do_refund { + + #[benchmark] + fn do_refund() { let account: T::AccountId = account("Alice", 1, 1); - let _ = CurrencyOf::<T>:: make_free_balance_be( - &T::RefundAccount::get(),u32::MAX.into(), - ); + let _ = CurrencyOf::<T>::make_free_balance_be(&T::RefundAccount::get(), u32::MAX.into()); // The worst-case scenario is when the refund fails // and can only be triggered if the account is dead, // in this case by having no balance in the account. @@ -109,19 +129,30 @@ benchmarks! { identity: 1u32.into(), amount: 10u64.into(), }; - }: { Pallet::<T>::try_refund(refund) } - verify { - assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into()); + + #[block] + { + Pallet::<T>::try_refund(refund); + } + + assert_has_event::<T>(Event::<T>::RefundFailed(account).into()); } - // The base weight consumed on processing refund queue when empty. - on_process_refund_queue { + + #[benchmark] + fn on_process_refund_queue() { + // The base weight consumed on processing refund queue when empty. assert_eq!(RefundQueue::<T>::get().len() as u32, 0); - }: { Pallet::<T>::process_refund_queue(Weight::MAX) } - // The weight consumed on processing refund queue with one element. - // Can deduce the process_refund_queue overhead by subtracting try_refund weight. - #[pov_mode = Measured] - on_process_refund_queue_elements { - let i in 1..MAX_QUEUED_REFUNDS; + + #[block] + { + Pallet::<T>::process_refund_queue(Weight::MAX); + } + } + + #[benchmark] + fn on_process_refund_queue_elements(i: Linear<1, MAX_QUEUED_REFUNDS>) { + // The weight consumed on processing refund queue with one element. + // Can deduce the process_refund_queue overhead by subtracting try_refund weight. let account: T::AccountId = account("Alice", 1, 1); let idty_id: IdtyId<T> = 1u32.into(); IdtyQuota::<T>::insert( @@ -131,9 +162,7 @@ benchmarks! { amount: 10u64.into(), }, ); - let _ = CurrencyOf::<T>:: make_free_balance_be( - &T::RefundAccount::get(),u32::MAX.into(), - ); + let _ = CurrencyOf::<T>::make_free_balance_be(&T::RefundAccount::get(), u32::MAX.into()); // The worst-case scenario is when the refund fails // and can only be triggered if the account is dead, // in this case by having no balance in the account. @@ -146,10 +175,21 @@ benchmarks! { Pallet::<T>::queue_refund(refund.clone()); } assert_eq!(RefundQueue::<T>::get().len() as u32, i); - }: { Pallet::<T>::process_refund_queue(Weight::MAX) } - verify { + + #[block] + { + Pallet::<T>::process_refund_queue(Weight::MAX); + } + assert_eq!(RefundQueue::<T>::get().len() as u32, 0); - assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into()); + assert_has_event::<T>(Event::<T>::RefundFailed(account).into()); } - impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(crate::mock::QuotaConfig{identities: vec![1, 2]}), crate::mock::Test); + + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(crate::mock::QuotaConfig { + identities: vec![1, 2] + }), + crate::mock::Test + ); } diff --git a/pallets/smith-members/src/benchmarking.rs b/pallets/smith-members/src/benchmarking.rs index 62e0b8ddc7251e957b5edaddf1092a2a54c55e40..b3730a866f87cf3131a8c749122e1e6e939ab71a 100644 --- a/pallets/smith-members/src/benchmarking.rs +++ b/pallets/smith-members/src/benchmarking.rs @@ -18,83 +18,88 @@ use super::*; -use frame_benchmarking::benchmarks; +use frame_benchmarking::v2::*; use frame_system::RawOrigin; use sp_runtime::traits::Convert; -#[cfg(test)] -use maplit::btreemap; - use crate::Pallet; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} - -benchmarks! { - where_clause { +#[benchmarks( where T::IdtyIndex: From<u32> +)] +mod benchmarks { + use super::*; + + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - invite_smith { + + #[benchmark] + fn invite_smith() { let issuer: T::IdtyIndex = 1.into(); let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); Pallet::<T>::on_smith_goes_online(1.into()); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); let receiver: T::IdtyIndex = 4.into(); - }: _<T::RuntimeOrigin>(caller_origin, receiver) - verify { - assert_has_event::<T>(Event::<T>::InvitationSent{ - receiver, - issuer, - }.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), receiver); + + assert_has_event::<T>(Event::<T>::InvitationSent { receiver, issuer }.into()); } - accept_invitation { - // Worst case preparation + + #[benchmark] + fn accept_invitation() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); Pallet::<T>::on_smith_goes_online(1.into()); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(caller.clone()).into(); let receiver: T::IdtyIndex = 4.into(); Pallet::<T>::invite_smith(caller_origin, receiver)?; - // test let issuer: T::IdtyIndex = 4.into(); let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - }: _<T::RuntimeOrigin>(caller_origin) - verify { - assert_has_event::<T>(Event::<T>::InvitationAccepted{ - idty_index: receiver, - }.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller)); + + assert_has_event::<T>( + Event::<T>::InvitationAccepted { + idty_index: receiver, + } + .into(), + ); + Ok(()) } - certify_smith { - // Worst case preparation + + #[benchmark] + fn certify_smith() -> Result<(), BenchmarkError> { let issuer: T::IdtyIndex = 1.into(); let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); Pallet::<T>::on_smith_goes_online(1.into()); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(caller.clone()).into(); let receiver: T::IdtyIndex = 4.into(); Pallet::<T>::invite_smith(caller_origin, receiver)?; let issuer: T::IdtyIndex = receiver; let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); + let caller_origin: <T as frame_system::Config>::RuntimeOrigin = + RawOrigin::Signed(caller.clone()).into(); Pallet::<T>::accept_invitation(caller_origin)?; - // test let issuer: T::IdtyIndex = 1.into(); let caller: T::AccountId = T::OwnerKeyOf::convert(issuer).unwrap(); - let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - }: _<T::RuntimeOrigin>(caller_origin, receiver) - verify { - assert_has_event::<T>(Event::<T>::SmithCertAdded{ - receiver, - issuer, - }.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), receiver); + + assert_has_event::<T>(Event::<T>::SmithCertAdded { receiver, issuer }.into()); + Ok(()) } impl_benchmark_test_suite!( Pallet, - crate::mock::new_test_ext(GenesisConfig { - initial_smiths: btreemap![ + crate::mock::new_test_ext(crate::GenesisConfig { + initial_smiths: maplit::btreemap![ 1 => (false, vec![2, 3]), 2 => (false, vec![1, 3]), 3 => (false, vec![1, 2]), diff --git a/pallets/universal-dividend/src/benchmarking.rs b/pallets/universal-dividend/src/benchmarking.rs index 5786d2ee0930ddf30ce14f5766aa412c77ecce82..8614441b3a2025c50ef9518a95d5e71f7f471723 100644 --- a/pallets/universal-dividend/src/benchmarking.rs +++ b/pallets/universal-dividend/src/benchmarking.rs @@ -19,9 +19,10 @@ use super::*; use core::num::NonZeroU16; -use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_benchmarking::v2::*; +use frame_benchmarking::{account, whitelisted_caller}; use frame_support::pallet_prelude::IsType; -use frame_support::traits::Get; // OnTimestampSet +use frame_support::traits::Get; use frame_support::traits::StoredMap; use frame_system::RawOrigin; use pallet_balances::Pallet as Balances; @@ -31,88 +32,139 @@ use sp_runtime::traits::Convert; use crate::Pallet; const ED_MULTIPLIER: u32 = 10; -const SEED: u32 = 0; -fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { - frame_system::Pallet::<T>::assert_has_event(generic_event.into()); -} - -benchmarks! { - - // Benchmark `transfer_ud` extrinsic with the worst possible conditions: - // * Transfer will kill the sender account. - // * Transfer will create the recipient account. - where_clause { +#[benchmarks( where T: pallet_balances::Config, T::Balance: From<u64>, <T::Currency as Currency<T::AccountId>>::Balance: IsType<T::Balance> +)] +mod benchmarks { + use super::*; + + fn assert_has_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) { + frame_system::Pallet::<T>::assert_has_event(generic_event.into()); } - claim_uds { - let i in 1..T::MaxPastReeval::get(); - let caller: T::AccountId = T::AccountIdOf::convert(1).unwrap(); + + #[benchmark] + fn claim_uds(i: Linear<1, { T::MaxPastReeval::get() }>) -> Result<(), BenchmarkError> { + // Benchmark `transfer_ud` extrinsic with the worst possible conditions: + // * Transfer will kill the sender account. + // * Transfer will create the recipient account. + let caller: T::AccountId = T::AccountIdOf::convert(1).unwrap(); CurrentUdIndex::<T>::put(2054u16); - T::MembersStorage::insert(&caller, FirstEligibleUd(Some(NonZeroU16::new(CurrentUdIndex::<T>::get() - i as u16).unwrap())))?; + T::MembersStorage::insert( + &caller, + FirstEligibleUd(Some( + NonZeroU16::new(CurrentUdIndex::<T>::get() - i as u16).unwrap(), + )), + )?; let (_, uds_total) = compute_claim_uds::compute_claim_uds( CurrentUdIndex::<T>::get(), CurrentUdIndex::<T>::get() - i as u16, PastReevals::<T>::get().into_iter(), ); - }: _(RawOrigin::Signed(caller.clone())) - verify { - assert_has_event::<T>(Event::<T>::UdsClaimed {count: i as u16, total: uds_total, who: caller}.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone())); + + assert_has_event::<T>( + Event::<T>::UdsClaimed { + count: i as u16, + total: uds_total, + who: caller, + } + .into(), + ); + Ok(()) } - transfer_ud { + + #[benchmark] + fn transfer_ud() { let existential_deposit = T::ExistentialDeposit::get(); let caller = whitelisted_caller(); - - // Give some multiple of the existential deposit let balance = existential_deposit.saturating_mul(ED_MULTIPLIER.into()); let _ = T::Currency::make_free_balance_be(&caller, balance.into()); + // Transfer `e - 1` existential deposits + 1 unit, which guarantees to create one account and reap this user. + let recipient: T::AccountId = account("recipient", 0, 1); + let recipient_lookup: <T::Lookup as StaticLookup>::Source = + T::Lookup::unlookup(recipient.clone()); + let transfer_amount = + existential_deposit.saturating_mul((ED_MULTIPLIER - 1).into()) + 1u32.into(); + let transfer_amount_ud = + transfer_amount.saturating_mul(1_000.into()) / Pallet::<T>::current_ud().into(); + + #[extrinsic_call] + _( + RawOrigin::Signed(caller.clone()), + recipient_lookup, + transfer_amount_ud.into(), + ); - // Transfer `e - 1` existential deposits + 1 unit, which guarantees to create one account, - // and reap this user. - let recipient: T::AccountId = account("recipient", 0, SEED); - let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone()); - let transfer_amount = existential_deposit.saturating_mul((ED_MULTIPLIER - 1).into()) + 1u32.into(); - let transfer_amount_ud = transfer_amount.saturating_mul(1_000.into()) / Pallet::<T>::current_ud().into(); - }: _(RawOrigin::Signed(caller.clone()), recipient_lookup, transfer_amount_ud.into()) - verify { assert_eq!(Balances::<T>::free_balance(&caller), Zero::zero()); assert_eq!(Balances::<T>::free_balance(&recipient), transfer_amount); } - // Benchmark `transfer_ud_keep_alive` with the worst possible condition: - // * The recipient account is created. - transfer_ud_keep_alive { + #[benchmark] + fn transfer_ud_keep_alive() { + // Benchmark `transfer_ud_keep_alive` with the worst possible condition: + // * The recipient account is created. let caller = whitelisted_caller(); - let recipient: T::AccountId = account("recipient", 0, SEED); - let recipient_lookup: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(recipient.clone()); - + let recipient: T::AccountId = account("recipient", 0, 1); + let recipient_lookup: <T::Lookup as StaticLookup>::Source = + T::Lookup::unlookup(recipient.clone()); // Give the sender account max funds, thus a transfer will not kill account. - let _ = T::Currency::make_free_balance_be(&caller, <T::Currency as Currency<T::AccountId>>::Balance::max_value()); + let _ = T::Currency::make_free_balance_be( + &caller, + <T::Currency as Currency<T::AccountId>>::Balance::max_value(), + ); let existential_deposit = T::ExistentialDeposit::get(); let transfer_amount = existential_deposit.saturating_mul(ED_MULTIPLIER.into()); - let transfer_amount_ud = transfer_amount.saturating_mul(1_000.into()) / Pallet::<T>::current_ud().into(); - }: _(RawOrigin::Signed(caller.clone()), recipient_lookup, transfer_amount_ud.into()) - verify { + let transfer_amount_ud = + transfer_amount.saturating_mul(1_000.into()) / Pallet::<T>::current_ud().into(); + + #[extrinsic_call] + _( + RawOrigin::Signed(caller.clone()), + recipient_lookup, + transfer_amount_ud.into(), + ); + assert!(!Balances::<T>::free_balance(&caller).is_zero()); assert_eq!(Balances::<T>::free_balance(&recipient), transfer_amount); } - on_removed_member { - let i in 0..T::MaxPastReeval::get(); - let caller: T::AccountId = T::AccountIdOf::convert(1).unwrap(); + + #[benchmark] + fn on_removed_member(i: Linear<1, { T::MaxPastReeval::get() }>) -> Result<(), BenchmarkError> { + let caller: T::AccountId = T::AccountIdOf::convert(1).unwrap(); CurrentUdIndex::<T>::put(2054u16); - T::MembersStorage::insert(&caller, FirstEligibleUd(Some(NonZeroU16::new(CurrentUdIndex::<T>::get() - i as u16).unwrap())))?; + T::MembersStorage::insert( + &caller, + FirstEligibleUd(Some( + NonZeroU16::new(CurrentUdIndex::<T>::get() - i as u16).unwrap(), + )), + )?; let (_, uds_total) = compute_claim_uds::compute_claim_uds( CurrentUdIndex::<T>::get(), CurrentUdIndex::<T>::get() - i as u16, PastReevals::<T>::get().into_iter(), ); - }: {Pallet::<T>::on_removed_member(CurrentUdIndex::<T>::get() - i as u16, &caller);} - verify { + + #[block] + { + Pallet::<T>::on_removed_member(CurrentUdIndex::<T>::get() - i as u16, &caller); + } + if i != 0 { - assert_has_event::<T>(Event::<T>::UdsAutoPaid {count: i as u16, total: uds_total, who: caller}.into()); + assert_has_event::<T>( + Event::<T>::UdsAutoPaid { + count: i as u16, + total: uds_total, + who: caller, + } + .into(), + ); } + Ok(()) } impl_benchmark_test_suite!( diff --git a/pallets/upgrade-origin/src/benchmarking.rs b/pallets/upgrade-origin/src/benchmarking.rs index 78a92c9206a694fb872dca143fac465a2acb260f..33821436d4bf96c90e6b9602e5e731c093d2ce70 100644 --- a/pallets/upgrade-origin/src/benchmarking.rs +++ b/pallets/upgrade-origin/src/benchmarking.rs @@ -19,12 +19,19 @@ use super::*; use crate::Pallet; -use frame_benchmarking::benchmarks; +use frame_benchmarking::v2::*; use frame_support::traits::Get; -benchmarks! { - dispatch_as_root { +#[benchmarks] +mod benchmarks { + use super::*; + + #[benchmark] + fn dispatch_as_root() { let call = Box::new(frame_system::Call::remark { remark: vec![] }.into()); let origin: T::WorstCaseOriginType = T::WorstCaseOrigin::get(); - }: dispatch_as_root (origin, call) + + #[extrinsic_call] + _(origin, call); + } } diff --git a/runtime/common/src/weights/block_weights.rs b/runtime/common/src/weights/block_weights.rs index 13709dc5312da322f51bd462dfe46782ec33c15b..31be5328e881c2c35d63a2d4d0c0b73e68c9e2ed 100644 --- a/runtime/common/src/weights/block_weights.rs +++ b/runtime/common/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24 (Y/M/D) +//! DATE: 2024-02-01 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Ğdev Local Testnet` @@ -26,17 +26,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 127_953, 157_199 - /// Average: 136_253 - /// Median: 134_999 - /// Std-Dev: 4551.46 + /// Min, Max: 133_128, 145_756 + /// Average: 136_550 + /// Median: 136_185 + /// Std-Dev: 2177.92 /// /// Percentiles nanoseconds: - /// 99th: 155_010 - /// 95th: 145_334 - /// 75th: 136_845 + /// 99th: 145_229 + /// 95th: 140_465 + /// 75th: 137_410 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(136_253), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(136_550), 0); } #[cfg(test)] diff --git a/runtime/common/src/weights/extrinsic_weights.rs b/runtime/common/src/weights/extrinsic_weights.rs index cbb74a08903acddc76e2c01f0a228f16aa21f9eb..53c2b67dcb805f9ce98a836c720204ad852bbd8c 100644 --- a/runtime/common/src/weights/extrinsic_weights.rs +++ b/runtime/common/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24 (Y/M/D) +//! DATE: 2024-02-01 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Ğdev Local Testnet` @@ -26,17 +26,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 70_783, 71_184 - /// Average: 70_943 - /// Median: 70_929 - /// Std-Dev: 83.18 + /// Min, Max: 73_174, 77_400 + /// Average: 73_958 + /// Median: 73_677 + /// Std-Dev: 862.17 /// /// Percentiles nanoseconds: - /// 99th: 71_160 - /// 95th: 71_090 - /// 75th: 70_988 + /// 99th: 77_230 + /// 95th: 76_489 + /// 75th: 73_953 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(70_943), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(73_958), 0); } #[cfg(test)] diff --git a/runtime/common/src/weights/frame_benchmarking_baseline.rs b/runtime/common/src/weights/frame_benchmarking_baseline.rs index 1c6d684c8295c5c760a01500bc7199391c032f54..c501a4f508754eadb50e4f5866ba7bae02ef7535 100644 --- a/runtime/common/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/common/src/weights/frame_benchmarking_baseline.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `frame_benchmarking::baseline` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -52,8 +52,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 346_000 picoseconds. - Weight::from_parts(459_000, 0) + // Minimum execution time: 130_000 picoseconds. + Weight::from_parts(171_615, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -61,8 +61,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 664_000 picoseconds. - Weight::from_parts(855_500, 0) + // Minimum execution time: 128_000 picoseconds. + Weight::from_parts(177_669, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -70,8 +70,8 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 656_000 picoseconds. - Weight::from_parts(808_500, 0) + // Minimum execution time: 130_000 picoseconds. + Weight::from_parts(176_183, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -79,16 +79,16 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 392_000 picoseconds. - Weight::from_parts(772_500, 0) + // Minimum execution time: 129_000 picoseconds. + Weight::from_parts(161_880, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 26_700_103_000 picoseconds. - Weight::from_parts(30_137_103_000, 0) + // Minimum execution time: 21_266_711_000 picoseconds. + Weight::from_parts(21_991_308_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -96,10 +96,10 @@ impl<T: frame_system::Config> frame_benchmarking::baseline::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 397_000 picoseconds. - Weight::from_parts(458_500, 0) + // Minimum execution time: 175_000 picoseconds. + Weight::from_parts(27_676_023, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 76_937 - .saturating_add(Weight::from_parts(51_487_440, 0).saturating_mul(i.into())) + // Standard Error: 26_153 + .saturating_add(Weight::from_parts(31_821_362, 0).saturating_mul(i.into())) } } diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index ca4024d06cc5466649a7e3898f7be5726bb482c2..30d855cff092a5fe6624e97bee1b433c5e04497a 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -52,22 +52,22 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_973_000 picoseconds. - Weight::from_parts(4_641_500, 0) + // Minimum execution time: 1_528_000 picoseconds. + Weight::from_parts(1_665_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 48 - .saturating_add(Weight::from_parts(462, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(253, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_566_000 picoseconds. - Weight::from_parts(18_023_500, 0) + // Minimum execution time: 4_235_000 picoseconds. + Weight::from_parts(4_565_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 145 - .saturating_add(Weight::from_parts(1_760, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_049, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -77,8 +77,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 8_515_000 picoseconds. - Weight::from_parts(10_663_000, 0) + // Minimum execution time: 2_795_000 picoseconds. + Weight::from_parts(3_066_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -91,8 +91,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 77_630_689_000 picoseconds. - Weight::from_parts(78_881_053_000, 0) + // Minimum execution time: 79_136_663_000 picoseconds. + Weight::from_parts(81_003_653_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -104,11 +104,11 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_293_000 picoseconds. - Weight::from_parts(5_218_500, 0) + // Minimum execution time: 1_633_000 picoseconds. + Weight::from_parts(1_746_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 61_139 - .saturating_add(Weight::from_parts(1_380_876, 0).saturating_mul(i.into())) + // Standard Error: 1_179 + .saturating_add(Weight::from_parts(648_839, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -118,11 +118,11 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_015_000 picoseconds. - Weight::from_parts(4_990_500, 0) + // Minimum execution time: 1_535_000 picoseconds. + Weight::from_parts(1_627_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_147 - .saturating_add(Weight::from_parts(841_068, 0).saturating_mul(i.into())) + // Standard Error: 717 + .saturating_add(Weight::from_parts(480_435, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -130,13 +130,13 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `39 + p * (69 ±0)` - // Estimated: `39 + p * (70 ±0)` - // Minimum execution time: 6_924_000 picoseconds. - Weight::from_parts(8_369_000, 0) - .saturating_add(Weight::from_parts(0, 39)) - // Standard Error: 16_662 - .saturating_add(Weight::from_parts(1_427_230, 0).saturating_mul(p.into())) + // Measured: `77 + p * (69 ±0)` + // Estimated: `76 + p * (70 ±0)` + // Minimum execution time: 2_998_000 picoseconds. + Weight::from_parts(3_049_000, 0) + .saturating_add(Weight::from_parts(0, 76)) + // Standard Error: 1_158 + .saturating_add(Weight::from_parts(941_913, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -147,8 +147,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_879_000 picoseconds. - Weight::from_parts(8_896_000, 0) + // Minimum execution time: 9_113_000 picoseconds. + Weight::from_parts(11_661_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -162,8 +162,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `22` // Estimated: `1518` - // Minimum execution time: 81_052_498_000 picoseconds. - Weight::from_parts(81_887_122_000, 0) + // Minimum execution time: 83_738_913_000 picoseconds. + Weight::from_parts(84_450_056_000, 0) .saturating_add(Weight::from_parts(0, 1518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_authority_members.rs b/runtime/common/src/weights/pallet_authority_members.rs index 59950c97fe545430c5ba2b4e9cf90d88bd774516..d4423be5d733f2380d1a221a19b8088606754663 100644 --- a/runtime/common/src/weights/pallet_authority_members.rs +++ b/runtime/common/src/weights/pallet_authority_members.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_authority_members` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -61,11 +61,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { // Proof Size summary in bytes: - // Measured: `717` - // Estimated: `4182` - // Minimum execution time: 45_399_000 picoseconds. - Weight::from_parts(49_182_000, 0) - .saturating_add(Weight::from_parts(0, 4182)) + // Measured: `750` + // Estimated: `4215` + // Minimum execution time: 18_548_000 picoseconds. + Weight::from_parts(19_374_000, 0) + .saturating_add(Weight::from_parts(0, 4215)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -87,11 +87,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { // Proof Size summary in bytes: - // Measured: `1108` - // Estimated: `4573` - // Minimum execution time: 59_314_000 picoseconds. - Weight::from_parts(76_647_000, 0) - .saturating_add(Weight::from_parts(0, 4573)) + // Measured: `1141` + // Estimated: `4606` + // Minimum execution time: 25_057_000 picoseconds. + Weight::from_parts(25_913_000, 0) + .saturating_add(Weight::from_parts(0, 4606)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -109,11 +109,11 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_session_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `1512` - // Estimated: `12402` - // Minimum execution time: 67_522_000 picoseconds. - Weight::from_parts(102_647_000, 0) - .saturating_add(Weight::from_parts(0, 12402)) + // Measured: `1545` + // Estimated: `12435` + // Minimum execution time: 33_144_000 picoseconds. + Weight::from_parts(34_639_000, 0) + .saturating_add(Weight::from_parts(0, 12435)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -135,8 +135,8 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `750` // Estimated: `4215` - // Minimum execution time: 76_516_000 picoseconds. - Weight::from_parts(81_201_000, 0) + // Minimum execution time: 33_125_000 picoseconds. + Weight::from_parts(34_313_000, 0) .saturating_add(Weight::from_parts(0, 4215)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(10)) @@ -147,8 +147,8 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `199` // Estimated: `1684` - // Minimum execution time: 29_964_000 picoseconds. - Weight::from_parts(39_785_000, 0) + // Minimum execution time: 7_048_000 picoseconds. + Weight::from_parts(7_443_000, 0) .saturating_add(Weight::from_parts(0, 1684)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index 20d538cb43ee05c8867ab184ee12da71e13ec608..b499ffc10abd8b25403f4bf6a3756a1d09395ff2 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -53,50 +53,36 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3591` - // Minimum execution time: 103_052_000 picoseconds. - Weight::from_parts(104_632_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `64` + // Estimated: `6192` + // Minimum execution time: 44_010_000 picoseconds. + Weight::from_parts(45_055_000, 0) + .saturating_add(Weight::from_parts(0, 6192)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 133_263_000 picoseconds. - Weight::from_parts(136_924_000, 0) + // Minimum execution time: 30_200_000 picoseconds. + Weight::from_parts(31_759_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) - fn force_transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `64` - // Estimated: `6192` - // Minimum execution time: 105_518_000 picoseconds. - Weight::from_parts(226_206_000, 0) - .saturating_add(Weight::from_parts(0, 6192)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - } /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 9_693_000 picoseconds. - Weight::from_parts(10_211_000, 0) + // Minimum execution time: 10_187_000 picoseconds. + Weight::from_parts(10_730_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,12 +93,26 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 14_040_000 picoseconds. - Weight::from_parts(14_480_000, 0) + // Minimum execution time: 14_390_000 picoseconds. + Weight::from_parts(15_179_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `128` + // Estimated: `8793` + // Minimum execution time: 47_611_000 picoseconds. + Weight::from_parts(49_359_000, 0) + .saturating_add(Weight::from_parts(0, 8793)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// Storage: `Account::PendingNewAccounts` (r:0 w:1) @@ -121,8 +121,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 38_912_000 picoseconds. - Weight::from_parts(40_985_000, 0) + // Minimum execution time: 38_315_000 picoseconds. + Weight::from_parts(39_582_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -133,8 +133,8 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3591` - // Minimum execution time: 41_380_000 picoseconds. - Weight::from_parts(44_612_000, 0) + // Minimum execution time: 12_827_000 picoseconds. + Weight::from_parts(13_683_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_certification.rs b/runtime/common/src/weights/pallet_certification.rs index 948c3caf242de24ca4c98a8d2bc60c495f96db77..f81126e698e071d142d7494055df8ef07b7a1dec 100644 --- a/runtime/common/src/weights/pallet_certification.rs +++ b/runtime/common/src/weights/pallet_certification.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_certification` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -47,127 +47,127 @@ use core::marker::PhantomData; /// Weight functions for `pallet_certification`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_certification::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Identity Identities (r:2 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsRemovableOn (r:1 w:1) - /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:2 w:2) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:2 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsRemovableOn` (r:1 w:1) + /// Proof: `Certification::CertsRemovableOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) fn add_cert() -> Weight { // Proof Size summary in bytes: - // Measured: `923` - // Estimated: `6863` - // Minimum execution time: 65_778_000 picoseconds. - Weight::from_parts(72_978_000, 0) - .saturating_add(Weight::from_parts(0, 6863)) + // Measured: `956` + // Estimated: `6896` + // Minimum execution time: 31_624_000 picoseconds. + Weight::from_parts(32_983_000, 0) + .saturating_add(Weight::from_parts(0, 6896)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:1 w:1) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Identity Identities (r:2 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsRemovableOn (r:1 w:1) - /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:1 w:1) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:2 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsRemovableOn` (r:1 w:1) + /// Proof: `Certification::CertsRemovableOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) fn renew_cert() -> Weight { // Proof Size summary in bytes: - // Measured: `947` - // Estimated: `6887` - // Minimum execution time: 61_109_000 picoseconds. - Weight::from_parts(64_931_000, 0) - .saturating_add(Weight::from_parts(0, 6887)) + // Measured: `980` + // Estimated: `6920` + // Minimum execution time: 29_911_000 picoseconds. + Weight::from_parts(30_913_000, 0) + .saturating_add(Weight::from_parts(0, 6920)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:2 w:2) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn del_cert() -> Weight { // Proof Size summary in bytes: // Measured: `444` // Estimated: `6384` - // Minimum execution time: 35_139_000 picoseconds. - Weight::from_parts(37_463_000, 0) + // Minimum execution time: 16_849_000 picoseconds. + Weight::from_parts(17_614_000, 0) .saturating_add(Weight::from_parts(0, 6384)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:1000 w:1000) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:1000 w:1000) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:0) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[2, 1000]`. fn remove_all_certs_received_by(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `588 + i * (35 ±0)` - // Estimated: `4054 + i * (2511 ±0)` - // Minimum execution time: 44_709_000 picoseconds. - Weight::from_parts(15_690_704, 0) - .saturating_add(Weight::from_parts(0, 4054)) - // Standard Error: 20_451 - .saturating_add(Weight::from_parts(15_749_397, 0).saturating_mul(i.into())) + // Measured: `546 + i * (35 ±0)` + // Estimated: `4017 + i * (2511 ±0)` + // Minimum execution time: 24_429_000 picoseconds. + Weight::from_parts(24_862_000, 0) + .saturating_add(Weight::from_parts(0, 4017)) + // Standard Error: 23_193 + .saturating_add(Weight::from_parts(8_646_344, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2511).saturating_mul(i.into())) } - /// Storage: Certification CertsRemovableOn (r:1 w:0) - /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) + /// Storage: `Certification::CertsRemovableOn` (r:1 w:0) + /// Proof: `Certification::CertsRemovableOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_initialize() -> Weight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `3604` - // Minimum execution time: 4_352_000 picoseconds. - Weight::from_parts(7_580_000, 0) + // Minimum execution time: 2_557_000 picoseconds. + Weight::from_parts(2_705_000, 0) .saturating_add(Weight::from_parts(0, 3604)) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_cert_noop() -> Weight { // Proof Size summary in bytes: // Measured: `237` // Estimated: `3702` - // Minimum execution time: 7_868_000 picoseconds. - Weight::from_parts(11_220_000, 0) + // Minimum execution time: 3_464_000 picoseconds. + Weight::from_parts(3_660_000, 0) .saturating_add(Weight::from_parts(0, 3702)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:2 w:2) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:0) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_cert() -> Weight { // Proof Size summary in bytes: // Measured: `660` // Estimated: `6600` - // Minimum execution time: 33_665_000 picoseconds. - Weight::from_parts(38_208_000, 0) + // Minimum execution time: 19_079_000 picoseconds. + Weight::from_parts(19_886_000, 0) .saturating_add(Weight::from_parts(0, 6600)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_collective.rs b/runtime/common/src/weights/pallet_collective.rs index 3aa7a37d93334498accb833ddac343b79254a524..d89cb56ca4a06ccb9ca02b2b962b9cd6e382188a 100644 --- a/runtime/common/src/weights/pallet_collective.rs +++ b/runtime/common/src/weights/pallet_collective.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -60,21 +60,21 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 20]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + m * (671 ±0) + p * (3196 ±0)` - // Estimated: `1514 + m * (9624 ±90) + p * (1918 ±452)` - // Minimum execution time: 23_422_000 picoseconds. - Weight::from_parts(23_422_000, 0) - .saturating_add(Weight::from_parts(0, 1514)) - // Standard Error: 409_364 - .saturating_add(Weight::from_parts(1_681_286, 0).saturating_mul(m.into())) - // Standard Error: 2_046_823 - .saturating_add(Weight::from_parts(7_823_957, 0).saturating_mul(p.into())) + // Measured: `0 + m * (672 ±0) + p * (3191 ±0)` + // Estimated: `10019 + m * (416 ±5) + p * (4183 ±27)` + // Minimum execution time: 11_832_000 picoseconds. + Weight::from_parts(12_200_000, 0) + .saturating_add(Weight::from_parts(0, 10019)) + // Standard Error: 9_313 + .saturating_add(Weight::from_parts(709_507, 0).saturating_mul(m.into())) + // Standard Error: 46_037 + .saturating_add(Weight::from_parts(5_955_445, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 9624).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 1918).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 416).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4183).saturating_mul(p.into())) } /// Storage: `TechnicalCommittee::Members` (r:1 w:0) /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -82,15 +82,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `31 + m * (32 ±0)` - // Estimated: `1517 + m * (32 ±0)` - // Minimum execution time: 22_528_000 picoseconds. - Weight::from_parts(21_965_656, 0) - .saturating_add(Weight::from_parts(0, 1517)) - // Standard Error: 1_391 - .saturating_add(Weight::from_parts(1_492, 0).saturating_mul(b.into())) - // Standard Error: 14_365 - .saturating_add(Weight::from_parts(19_858, 0).saturating_mul(m.into())) + // Measured: `32 + m * (32 ±0)` + // Estimated: `1518 + m * (32 ±0)` + // Minimum execution time: 9_745_000 picoseconds. + Weight::from_parts(9_293_278, 0) + .saturating_add(Weight::from_parts(0, 1518)) + // Standard Error: 43 + .saturating_add(Weight::from_parts(1_471, 0).saturating_mul(b.into())) + // Standard Error: 447 + .saturating_add(Weight::from_parts(12_488, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -102,15 +102,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `31 + m * (32 ±0)` - // Estimated: `3497 + m * (32 ±0)` - // Minimum execution time: 26_296_000 picoseconds. - Weight::from_parts(24_449_661, 0) - .saturating_add(Weight::from_parts(0, 3497)) - // Standard Error: 1_225 - .saturating_add(Weight::from_parts(2_808, 0).saturating_mul(b.into())) - // Standard Error: 12_650 - .saturating_add(Weight::from_parts(49_722, 0).saturating_mul(m.into())) + // Measured: `32 + m * (32 ±0)` + // Estimated: `3498 + m * (32 ±0)` + // Minimum execution time: 11_537_000 picoseconds. + Weight::from_parts(11_014_910, 0) + .saturating_add(Weight::from_parts(0, 3498)) + // Standard Error: 54 + .saturating_add(Weight::from_parts(1_683, 0).saturating_mul(b.into())) + // Standard Error: 560 + .saturating_add(Weight::from_parts(21_867, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -127,21 +127,23 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 20]`. - fn propose_proposed(_b: u32, m: u32, p: u32, ) -> Weight { + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + m * (32 ±0) + p * (58 ±0)` - // Estimated: `3413 + m * (32 ±0) + p * (58 ±0)` - // Minimum execution time: 35_130_000 picoseconds. - Weight::from_parts(71_833_850, 0) - .saturating_add(Weight::from_parts(0, 3413)) - // Standard Error: 168_522 - .saturating_add(Weight::from_parts(30_556, 0).saturating_mul(m.into())) - // Standard Error: 869_222 - .saturating_add(Weight::from_parts(454_105, 0).saturating_mul(p.into())) + // Measured: `24 + m * (32 ±0) + p * (55 ±0)` + // Estimated: `3461 + m * (32 ±0) + p * (54 ±0)` + // Minimum execution time: 16_717_000 picoseconds. + Weight::from_parts(16_879_746, 0) + .saturating_add(Weight::from_parts(0, 3461)) + // Standard Error: 152 + .saturating_add(Weight::from_parts(2_098, 0).saturating_mul(b.into())) + // Standard Error: 1_589 + .saturating_add(Weight::from_parts(14_762, 0).saturating_mul(m.into())) + // Standard Error: 7_941 + .saturating_add(Weight::from_parts(246_947, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(p.into())) } /// Storage: `TechnicalCommittee::Members` (r:1 w:0) /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -150,11 +152,13 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `572 + m * (64 ±0)` - // Estimated: `4038 + m * (64 ±0)` - // Minimum execution time: 30_355_000 picoseconds. - Weight::from_parts(53_128_131, 0) - .saturating_add(Weight::from_parts(0, 4038)) + // Measured: `573 + m * (64 ±0)` + // Estimated: `4037 + m * (64 ±0)` + // Minimum execution time: 14_636_000 picoseconds. + Weight::from_parts(15_927_910, 0) + .saturating_add(Weight::from_parts(0, 4037)) + // Standard Error: 943 + .saturating_add(Weight::from_parts(36_464, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -171,13 +175,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `127 + m * (64 ±0) + p * (55 ±0)` - // Estimated: `3593 + m * (64 ±0) + p * (55 ±0)` - // Minimum execution time: 37_074_000 picoseconds. - Weight::from_parts(87_124_277, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 2_039_774 - .saturating_add(Weight::from_parts(170_868, 0).saturating_mul(p.into())) + // Measured: `117 + m * (64 ±0) + p * (55 ±0)` + // Estimated: `3591 + m * (64 ±0) + p * (55 ±0)` + // Minimum execution time: 18_409_000 picoseconds. + Weight::from_parts(17_372_489, 0) + .saturating_add(Weight::from_parts(0, 3591)) + // Standard Error: 823 + .saturating_add(Weight::from_parts(34_149, 0).saturating_mul(m.into())) + // Standard Error: 4_064 + .saturating_add(Weight::from_parts(246_981, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -196,20 +202,22 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `50 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` - // Estimated: `3516 + b * (1 ±0) + m * (64 ±0) + p * (79 ±0)` - // Minimum execution time: 51_993_000 picoseconds. - Weight::from_parts(48_872_547, 0) - .saturating_add(Weight::from_parts(0, 3516)) - // Standard Error: 88_708 - .saturating_add(Weight::from_parts(79_471, 0).saturating_mul(m.into())) - // Standard Error: 448_213 - .saturating_add(Weight::from_parts(1_142_776, 0).saturating_mul(p.into())) + // Measured: `62 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` + // Estimated: `3619 + b * (1 ±0) + m * (63 ±0) + p * (74 ±0)` + // Minimum execution time: 26_375_000 picoseconds. + Weight::from_parts(26_013_088, 0) + .saturating_add(Weight::from_parts(0, 3619)) + // Standard Error: 121 + .saturating_add(Weight::from_parts(1_894, 0).saturating_mul(b.into())) + // Standard Error: 1_286 + .saturating_add(Weight::from_parts(23_379, 0).saturating_mul(m.into())) + // Standard Error: 6_345 + .saturating_add(Weight::from_parts(329_186, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 74).saturating_mul(p.into())) } /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -225,15 +233,15 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `147 + m * (64 ±0) + p * (55 ±0)` - // Estimated: `3613 + m * (64 ±0) + p * (55 ±0)` - // Minimum execution time: 40_212_000 picoseconds. - Weight::from_parts(38_638_717, 0) - .saturating_add(Weight::from_parts(0, 3613)) - // Standard Error: 11_146 - .saturating_add(Weight::from_parts(18_281, 0).saturating_mul(m.into())) - // Standard Error: 56_317 - .saturating_add(Weight::from_parts(250_157, 0).saturating_mul(p.into())) + // Measured: `137 + m * (64 ±0) + p * (55 ±0)` + // Estimated: `3611 + m * (64 ±0) + p * (55 ±0)` + // Minimum execution time: 21_053_000 picoseconds. + Weight::from_parts(21_348_531, 0) + .saturating_add(Weight::from_parts(0, 3611)) + // Standard Error: 2_099 + .saturating_add(Weight::from_parts(21_807, 0).saturating_mul(m.into())) + // Standard Error: 10_367 + .saturating_add(Weight::from_parts(219_542, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -254,18 +262,22 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `70 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` - // Estimated: `3536 + b * (1 ±0) + m * (64 ±0) + p * (79 ±0)` - // Minimum execution time: 56_237_000 picoseconds. - Weight::from_parts(97_149_848, 0) - .saturating_add(Weight::from_parts(0, 3536)) - // Standard Error: 16_748 - .saturating_add(Weight::from_parts(1_216, 0).saturating_mul(b.into())) + // Measured: `82 + b * (1 ±0) + m * (64 ±0) + p * (78 ±0)` + // Estimated: `3639 + b * (1 ±0) + m * (63 ±0) + p * (74 ±0)` + // Minimum execution time: 28_469_000 picoseconds. + Weight::from_parts(26_789_880, 0) + .saturating_add(Weight::from_parts(0, 3639)) + // Standard Error: 190 + .saturating_add(Weight::from_parts(3_050, 0).saturating_mul(b.into())) + // Standard Error: 2_011 + .saturating_add(Weight::from_parts(21_001, 0).saturating_mul(m.into())) + // Standard Error: 9_920 + .saturating_add(Weight::from_parts(350_616, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 74).saturating_mul(p.into())) } /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -276,13 +288,13 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 20]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `187 + p * (32 ±0)` - // Estimated: `1673 + p * (32 ±0)` - // Minimum execution time: 24_197_000 picoseconds. - Weight::from_parts(25_080_789, 0) - .saturating_add(Weight::from_parts(0, 1673)) - // Standard Error: 115_740 - .saturating_add(Weight::from_parts(144_210, 0).saturating_mul(p.into())) + // Measured: `189 + p * (32 ±0)` + // Estimated: `1674 + p * (32 ±0)` + // Minimum execution time: 9_716_000 picoseconds. + Weight::from_parts(10_757_883, 0) + .saturating_add(Weight::from_parts(0, 1674)) + // Standard Error: 3_393 + .saturating_add(Weight::from_parts(166_952, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/common/src/weights/pallet_distance.rs b/runtime/common/src/weights/pallet_distance.rs index b930f67446dab73b5b335d4371a0e1606dfd529d..28dc21517874ae22f62b282ce49f406a8b298fe6 100644 --- a/runtime/common/src/weights/pallet_distance.rs +++ b/runtime/common/src/weights/pallet_distance.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_distance` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -47,59 +47,59 @@ use core::marker::PhantomData; /// Weight functions for `pallet_distance`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Distance PendingEvaluationRequest (r:1 w:1) - /// Proof Skipped: Distance PendingEvaluationRequest (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:1 w:0) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance EvaluationPool2 (r:1 w:1) - /// Proof Skipped: Distance EvaluationPool2 (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Distance::PendingEvaluationRequest` (r:1 w:1) + /// Proof: `Distance::PendingEvaluationRequest` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:0) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:1 w:0) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Distance::EvaluationPool2` (r:1 w:1) + /// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn request_distance_evaluation() -> Weight { // Proof Size summary in bytes: - // Measured: `1597` - // Estimated: `5062` - // Minimum execution time: 73_986_000 picoseconds. - Weight::from_parts(77_918_000, 0) - .saturating_add(Weight::from_parts(0, 5062)) + // Measured: `1630` + // Estimated: `5095` + // Minimum execution time: 41_969_000 picoseconds. + Weight::from_parts(43_400_000, 0) + .saturating_add(Weight::from_parts(0, 5095)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:2 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Distance PendingEvaluationRequest (r:1 w:1) - /// Proof Skipped: Distance PendingEvaluationRequest (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:1 w:0) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance EvaluationPool2 (r:1 w:1) - /// Proof Skipped: Distance EvaluationPool2 (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:2 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Distance::PendingEvaluationRequest` (r:1 w:1) + /// Proof: `Distance::PendingEvaluationRequest` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:0) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:1 w:0) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Distance::EvaluationPool2` (r:1 w:1) + /// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn request_distance_evaluation_for() -> Weight { // Proof Size summary in bytes: - // Measured: `1626` - // Estimated: `7566` - // Minimum execution time: 76_351_000 picoseconds. - Weight::from_parts(79_888_000, 0) - .saturating_add(Weight::from_parts(0, 7566)) + // Measured: `1659` + // Estimated: `7599` + // Minimum execution time: 43_531_000 picoseconds. + Weight::from_parts(45_254_000, 0) + .saturating_add(Weight::from_parts(0, 7599)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -118,13 +118,13 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[1, 600]`. fn update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `768 + i * (10 ±0)` - // Estimated: `2254 + i * (10 ±0)` - // Minimum execution time: 29_515_000 picoseconds. - Weight::from_parts(38_570_252, 0) - .saturating_add(Weight::from_parts(0, 2254)) - // Standard Error: 19_866 - .saturating_add(Weight::from_parts(169_747, 0).saturating_mul(i.into())) + // Measured: `773 + i * (10 ±0)` + // Estimated: `2257 + i * (10 ±0)` + // Minimum execution time: 14_166_000 picoseconds. + Weight::from_parts(16_443_873, 0) + .saturating_add(Weight::from_parts(0, 2257)) + // Standard Error: 657 + .saturating_add(Weight::from_parts(109_800, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into())) @@ -136,32 +136,32 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { /// The range of component `i` is `[1, 600]`. fn force_update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `606 + i * (10 ±0)` - // Estimated: `2092 + i * (10 ±0)` - // Minimum execution time: 15_384_000 picoseconds. - Weight::from_parts(16_168_381, 0) - .saturating_add(Weight::from_parts(0, 2092)) - // Standard Error: 11_822 - .saturating_add(Weight::from_parts(182_118, 0).saturating_mul(i.into())) + // Measured: `612 + i * (10 ±0)` + // Estimated: `2096 + i * (10 ±0)` + // Minimum execution time: 6_811_000 picoseconds. + Weight::from_parts(9_013_581, 0) + .saturating_add(Weight::from_parts(0, 2096)) + // Standard Error: 343 + .saturating_add(Weight::from_parts(105_311, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into())) } - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership MembershipsExpireOn (r:2 w:2) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Identity::Identities` (r:1 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:1) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::MembershipsExpireOn` (r:2 w:2) + /// Proof: `Membership::MembershipsExpireOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn force_valid_distance_status() -> Weight { // Proof Size summary in bytes: - // Measured: `576` - // Estimated: `6516` - // Minimum execution time: 62_190_000 picoseconds. - Weight::from_parts(64_633_000, 0) - .saturating_add(Weight::from_parts(0, 6516)) + // Measured: `609` + // Estimated: `6549` + // Minimum execution time: 23_659_000 picoseconds. + Weight::from_parts(24_829_000, 0) + .saturating_add(Weight::from_parts(0, 6549)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -171,8 +171,8 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `170` // Estimated: `1655` - // Minimum execution time: 8_402_000 picoseconds. - Weight::from_parts(9_335_000, 0) + // Minimum execution time: 2_792_000 picoseconds. + Weight::from_parts(2_947_000, 0) .saturating_add(Weight::from_parts(0, 1655)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_duniter_account.rs b/runtime/common/src/weights/pallet_duniter_account.rs index 797603e6655d168ef4d66eff1396b14bc32d27fb..b8f87e57fc49dd9b5d49b657a970715da880883c 100644 --- a/runtime/common/src/weights/pallet_duniter_account.rs +++ b/runtime/common/src/weights/pallet_duniter_account.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_duniter_account` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -53,8 +53,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` - // Minimum execution time: 10_296_000 picoseconds. - Weight::from_parts(15_289_000, 0) + // Minimum execution time: 3_514_000 picoseconds. + Weight::from_parts(3_785_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,16 +79,16 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< fn on_initialize_sufficient(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `42 + i * (309 ±0)` - // Estimated: `3816 + i * (309 ±0)` - // Minimum execution time: 10_313_000 picoseconds. - Weight::from_parts(10_674_000, 0) - .saturating_add(Weight::from_parts(0, 3816)) - // Standard Error: 2_538_302 - .saturating_add(Weight::from_parts(27_819_500, 0).saturating_mul(i.into())) + // Estimated: `3507 + i * (1908 ±0)` + // Minimum execution time: 2_240_000 picoseconds. + Weight::from_parts(2_528_281, 0) + .saturating_add(Weight::from_parts(0, 3507)) + // Standard Error: 15_367 + .saturating_add(Weight::from_parts(14_123_518, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(0, 1908).saturating_mul(i.into())) } /// Storage: `Account::PendingNewAccounts` (r:1 w:1) /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -111,17 +111,17 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< /// The range of component `i` is `[0, 1]`. fn on_initialize_with_balance(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `42 + i * (309 ±0)` - // Estimated: `3816 + i * (309 ±0)` - // Minimum execution time: 6_629_000 picoseconds. - Weight::from_parts(7_761_500, 0) - .saturating_add(Weight::from_parts(0, 3816)) - // Standard Error: 3_335_635 - .saturating_add(Weight::from_parts(69_367_000, 0).saturating_mul(i.into())) + // Measured: `42 + i * (373 ±0)` + // Estimated: `3507 + i * (1940 ±0)` + // Minimum execution time: 2_233_000 picoseconds. + Weight::from_parts(2_508_432, 0) + .saturating_add(Weight::from_parts(0, 3507)) + // Standard Error: 17_950 + .saturating_add(Weight::from_parts(34_463_967, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(i.into()))) - .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 1940).saturating_mul(i.into())) } /// Storage: `Account::PendingNewAccounts` (r:1 w:1) /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -130,11 +130,11 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42 + i * (74 ±0)` // Estimated: `3507 + i * (74 ±0)` - // Minimum execution time: 6_699_000 picoseconds. - Weight::from_parts(7_645_000, 0) + // Minimum execution time: 2_230_000 picoseconds. + Weight::from_parts(2_511_557, 0) .saturating_add(Weight::from_parts(0, 3507)) - // Standard Error: 10_642_627 - .saturating_add(Weight::from_parts(25_816_500, 0).saturating_mul(i.into())) + // Standard Error: 15_818 + .saturating_add(Weight::from_parts(6_886_042, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 74).saturating_mul(i.into())) @@ -145,8 +145,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `116` // Estimated: `3581` - // Minimum execution time: 20_089_000 picoseconds. - Weight::from_parts(21_261_000, 0) + // Minimum execution time: 8_244_000 picoseconds. + Weight::from_parts(8_876_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,8 +157,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 4_511_000 picoseconds. - Weight::from_parts(4_829_000, 0) + // Minimum execution time: 2_480_000 picoseconds. + Weight::from_parts(2_654_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 7f77612568a91d826195ca81d789146f7dec42e9..5463d93d17d1518f4603afd505b03afb60c6f998 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -47,35 +47,35 @@ use core::marker::PhantomData; /// Weight functions for `pallet_identity`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:2 w:1) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:2 w:2) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification StorageIdtyCertMeta (r:2 w:2) - /// Proof Skipped: Certification StorageIdtyCertMeta (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Identity NextIdtyIndex (r:1 w:1) - /// Proof Skipped: Identity NextIdtyIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Identity IdentityChangeSchedule (r:1 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity CounterForIdentities (r:1 w:1) - /// Proof: Identity CounterForIdentities (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Certification CertsRemovableOn (r:1 w:1) - /// Proof Skipped: Certification CertsRemovableOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsByReceiver (r:1 w:1) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Quota IdtyQuota (r:0 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:2 w:1) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:2 w:2) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::StorageIdtyCertMeta` (r:2 w:2) + /// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Identity::NextIdtyIndex` (r:1 w:1) + /// Proof: `Identity::NextIdtyIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:1) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::CounterForIdentities` (r:1 w:1) + /// Proof: `Identity::CounterForIdentities` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Certification::CertsRemovableOn` (r:1 w:1) + /// Proof: `Certification::CertsRemovableOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsByReceiver` (r:1 w:1) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Quota::IdtyQuota` (r:0 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) fn create_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `921` - // Estimated: `6861` - // Minimum execution time: 132_024_000 picoseconds. - Weight::from_parts(163_110_000, 0) - .saturating_add(Weight::from_parts(0, 6861)) + // Measured: `1022` + // Estimated: `6962` + // Minimum execution time: 62_824_000 picoseconds. + Weight::from_parts(64_338_000, 0) + .saturating_add(Weight::from_parts(0, 6962)) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(12)) } @@ -89,11 +89,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) fn confirm_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `661` - // Estimated: `6601` - // Minimum execution time: 54_645_000 picoseconds. - Weight::from_parts(75_103_000, 0) - .saturating_add(Weight::from_parts(0, 6601)) + // Measured: `698` + // Estimated: `6638` + // Minimum execution time: 27_952_000 picoseconds. + Weight::from_parts(29_141_000, 0) + .saturating_add(Weight::from_parts(0, 6638)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -107,11 +107,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn change_owner_key() -> Weight { // Proof Size summary in bytes: - // Measured: `714` - // Estimated: `6654` - // Minimum execution time: 178_066_000 picoseconds. - Weight::from_parts(219_916_000, 0) - .saturating_add(Weight::from_parts(0, 6654)) + // Measured: `728` + // Estimated: `6668` + // Minimum execution time: 76_506_000 picoseconds. + Weight::from_parts(78_946_000, 0) + .saturating_add(Weight::from_parts(0, 6668)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -127,26 +127,27 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) fn revoke_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `631` - // Estimated: `6571` - // Minimum execution time: 158_320_000 picoseconds. - Weight::from_parts(202_029_000, 0) - .saturating_add(Weight::from_parts(0, 6571)) + // Measured: `664` + // Estimated: `6604` + // Minimum execution time: 65_635_000 picoseconds. + Weight::from_parts(68_044_000, 0) + .saturating_add(Weight::from_parts(0, 6604)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Identity IdentitiesNames (r:0 w:999) - /// Proof Skipped: Identity IdentitiesNames (max_values: None, max_size: None, mode: Measured) - /// The range of component `i` is `[1, 1000]`. + /// Storage: `Identity::IdentitiesNames` (r:0 w:999) + /// Proof: `Identity::IdentitiesNames` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[2, 1000]`. fn prune_item_identities_names(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_266_000 picoseconds. - Weight::from_parts(15_371_520, 0) + // Minimum execution time: 3_607_000 picoseconds. + Weight::from_parts(3_915_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 38_204 - .saturating_add(Weight::from_parts(2_138_979, 0).saturating_mul(i.into())) + // Standard Error: 1_578 + .saturating_add(Weight::from_parts(1_235_688, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `System::Account` (r:1 w:1) @@ -155,8 +156,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `105` // Estimated: `3591` - // Minimum execution time: 13_275_000 picoseconds. - Weight::from_parts(14_053_000, 0) + // Minimum execution time: 6_376_000 picoseconds. + Weight::from_parts(6_795_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -169,11 +170,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn link_account() -> Weight { // Proof Size summary in bytes: - // Measured: `371` - // Estimated: `3836` - // Minimum execution time: 103_563_000 picoseconds. - Weight::from_parts(107_316_000, 0) - .saturating_add(Weight::from_parts(0, 3836)) + // Measured: `404` + // Estimated: `3869` + // Minimum execution time: 52_731_000 picoseconds. + Weight::from_parts(55_640_000, 0) + .saturating_add(Weight::from_parts(0, 3869)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -181,24 +182,24 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 286_000 picoseconds. - Weight::from_parts(492_000, 0) + // Minimum execution time: 126_000 picoseconds. + Weight::from_parts(155_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Identity::Identities` (r:1 w:0) /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_revoke_identity_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `3734` - // Minimum execution time: 8_267_000 picoseconds. - Weight::from_parts(8_928_000, 0) - .saturating_add(Weight::from_parts(0, 3734)) + // Measured: `302` + // Estimated: `3767` + // Minimum execution time: 3_366_000 picoseconds. + Weight::from_parts(3_549_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Identity::Identities` (r:1 w:1) /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:1) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:2) /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Membership::Membership` (r:1 w:1) /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -228,23 +229,23 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_revoke_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `1540` - // Estimated: `9955` - // Minimum execution time: 146_876_000 picoseconds. - Weight::from_parts(158_403_000, 0) - .saturating_add(Weight::from_parts(0, 9955)) + // Measured: `1589` + // Estimated: `10004` + // Minimum execution time: 80_828_000 picoseconds. + Weight::from_parts(84_029_000, 0) + .saturating_add(Weight::from_parts(0, 10004)) .saturating_add(T::DbWeight::get().reads(16)) - .saturating_add(T::DbWeight::get().writes(19)) + .saturating_add(T::DbWeight::get().writes(20)) } /// Storage: `Identity::Identities` (r:1 w:0) /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_identity_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `269` - // Estimated: `3734` - // Minimum execution time: 7_847_000 picoseconds. - Weight::from_parts(8_887_000, 0) - .saturating_add(Weight::from_parts(0, 3734)) + // Measured: `302` + // Estimated: `3767` + // Minimum execution time: 3_480_000 picoseconds. + Weight::from_parts(3_751_000, 0) + .saturating_add(Weight::from_parts(0, 3767)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Identity::Identities` (r:1 w:1) @@ -279,11 +280,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_identity() -> Weight { // Proof Size summary in bytes: - // Measured: `1447` - // Estimated: `9862` - // Minimum execution time: 163_144_000 picoseconds. - Weight::from_parts(223_357_000, 0) - .saturating_add(Weight::from_parts(0, 9862)) + // Measured: `1532` + // Estimated: `9947` + // Minimum execution time: 91_814_000 picoseconds. + Weight::from_parts(98_212_000, 0) + .saturating_add(Weight::from_parts(0, 9947)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(21)) } @@ -291,11 +292,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_identities_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `108` - // Estimated: `3573` - // Minimum execution time: 4_257_000 picoseconds. - Weight::from_parts(4_848_000, 0) - .saturating_add(Weight::from_parts(0, 3573)) + // Measured: `157` + // Estimated: `3622` + // Minimum execution time: 2_847_000 picoseconds. + Weight::from_parts(3_740_000, 0) + .saturating_add(Weight::from_parts(0, 3622)) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:1) @@ -304,37 +305,37 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_identities_none() -> Weight { // Proof Size summary in bytes: - // Measured: `292` - // Estimated: `3757` - // Minimum execution time: 13_902_000 picoseconds. - Weight::from_parts(29_881_000, 0) - .saturating_add(Weight::from_parts(0, 3757)) + // Measured: `327` + // Estimated: `3792` + // Minimum execution time: 6_046_000 picoseconds. + Weight::from_parts(6_416_000, 0) + .saturating_add(Weight::from_parts(0, 3792)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityChangeSchedule (r:1 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity CounterForIdentities (r:1 w:1) - /// Proof: Identity CounterForIdentities (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Certification CertsByReceiver (r:1 w:0) - /// Proof Skipped: Certification CertsByReceiver (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity IdentityIndexOf (r:0 w:1) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Quota IdtyQuota (r:0 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:1) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::CounterForIdentities` (r:1 w:1) + /// Proof: `Identity::CounterForIdentities` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Membership::Membership` (r:1 w:1) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Certification::CertsByReceiver` (r:1 w:0) + /// Proof: `Certification::CertsByReceiver` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentityIndexOf` (r:0 w:1) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Quota::IdtyQuota` (r:0 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) fn prune_identities_err() -> Weight { // Proof Size summary in bytes: - // Measured: `753` - // Estimated: `4218` - // Minimum execution time: 71_875_000 picoseconds. - Weight::from_parts(84_556_000, 0) - .saturating_add(Weight::from_parts(0, 4218)) + // Measured: `788` + // Estimated: `4253` + // Minimum execution time: 32_362_000 picoseconds. + Weight::from_parts(33_851_000, 0) + .saturating_add(Weight::from_parts(0, 4253)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(7)) } diff --git a/runtime/common/src/weights/pallet_im_online.rs b/runtime/common/src/weights/pallet_im_online.rs index 82e221d7b451d19896b96df7d5649bcf22b664b9..b4626468f0f2eeaa6214860e0d69643fae857165 100644 --- a/runtime/common/src/weights/pallet_im_online.rs +++ b/runtime/common/src/weights/pallet_im_online.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -64,11 +64,11 @@ impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `603 + k * (32 ±0)` // Estimated: `33487 + k * (1761 ±0)` - // Minimum execution time: 53_722_000 picoseconds. - Weight::from_parts(66_607_466, 0) + // Minimum execution time: 52_987_000 picoseconds. + Weight::from_parts(81_302_670, 0) .saturating_add(Weight::from_parts(0, 33487)) - // Standard Error: 482 - .saturating_add(Weight::from_parts(28_435, 0).saturating_mul(k.into())) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(44_909, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 1761).saturating_mul(k.into())) diff --git a/runtime/common/src/weights/pallet_membership.rs b/runtime/common/src/weights/pallet_membership.rs index 624d14353e82a492f56f4720d9d264bff6b6ffa9..991e3ad8a3f2c29c16825f973d533075cd4808e3 100644 --- a/runtime/common/src/weights/pallet_membership.rs +++ b/runtime/common/src/weights/pallet_membership.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -51,8 +51,8 @@ impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 378_000 picoseconds. - Weight::from_parts(511_000, 0) + // Minimum execution time: 132_000 picoseconds. + Weight::from_parts(156_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Membership::MembershipsExpireOn` (r:2 w:2) @@ -79,24 +79,24 @@ impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> { /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:3 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) - /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:1) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:2) /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Session::KeyOwner` (r:0 w:12) /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 3]`. fn expire_memberships(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `138 + i * (639 ±0)` - // Estimated: `10471 + i * (1464 ±0)` - // Minimum execution time: 12_285_000 picoseconds. - Weight::from_parts(14_483_500, 0) - .saturating_add(Weight::from_parts(0, 10471)) - // Standard Error: 8_003_454 - .saturating_add(Weight::from_parts(122_359_333, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(i.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(T::DbWeight::get().writes((12_u64).saturating_mul(i.into()))) - .saturating_add(Weight::from_parts(0, 1464).saturating_mul(i.into())) + // Measured: `138 + i * (838 ±0)` + // Estimated: `9744 + i * (2721 ±47)` + // Minimum execution time: 4_005_000 picoseconds. + Weight::from_parts(10_116_741, 0) + .saturating_add(Weight::from_parts(0, 9744)) + // Standard Error: 403_569 + .saturating_add(Weight::from_parts(64_177_467, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((10_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((14_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 2721).saturating_mul(i.into())) } } diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index bc0bc453d410d44afbce4d13f9769b42fbfbe0b1..4dd1f9bc58a743f03924a556220691ee933687dd 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -52,11 +52,11 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_294_000 picoseconds. - Weight::from_parts(17_767_000, 0) + // Minimum execution time: 5_204_000 picoseconds. + Weight::from_parts(5_782_605, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 947 - .saturating_add(Weight::from_parts(221, 0).saturating_mul(z.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(354, 0).saturating_mul(z.into())) } /// Storage: `Multisig::Multisigs` (r:1 w:1) /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) @@ -64,15 +64,15 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `134 + s * (4 ±0)` + // Measured: `126 + s * (5 ±0)` // Estimated: `3922` - // Minimum execution time: 43_829_000 picoseconds. - Weight::from_parts(22_076_250, 0) + // Minimum execution time: 23_867_000 picoseconds. + Weight::from_parts(24_443_940, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 650_697 - .saturating_add(Weight::from_parts(2_451_125, 0).saturating_mul(s.into())) - // Standard Error: 520 - .saturating_add(Weight::from_parts(3_350, 0).saturating_mul(z.into())) + // Standard Error: 11_088 + .saturating_add(Weight::from_parts(141_541, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_100, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -84,13 +84,13 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `240` // Estimated: `3922` - // Minimum execution time: 27_439_000 picoseconds. - Weight::from_parts(23_259_571, 0) + // Minimum execution time: 14_224_000 picoseconds. + Weight::from_parts(12_975_789, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 477_625 - .saturating_add(Weight::from_parts(598_142, 0).saturating_mul(s.into())) - // Standard Error: 334 - .saturating_add(Weight::from_parts(1_942, 0).saturating_mul(z.into())) + // Standard Error: 7_987 + .saturating_add(Weight::from_parts(223_478, 0).saturating_mul(s.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_128, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,15 +102,15 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `268 + s * (36 ±0)` + // Measured: `260 + s * (37 ±0)` // Estimated: `3922` - // Minimum execution time: 54_255_000 picoseconds. - Weight::from_parts(50_336_875, 0) + // Minimum execution time: 27_563_000 picoseconds. + Weight::from_parts(27_704_649, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 202_613 - .saturating_add(Weight::from_parts(484_062, 0).saturating_mul(s.into())) - // Standard Error: 162 - .saturating_add(Weight::from_parts(996, 0).saturating_mul(z.into())) + // Standard Error: 10_594 + .saturating_add(Weight::from_parts(184_953, 0).saturating_mul(s.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_084, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -119,13 +119,13 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[2, 10]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `134 + s * (4 ±0)` + // Measured: `131 + s * (5 ±0)` // Estimated: `3922` - // Minimum execution time: 41_585_000 picoseconds. - Weight::from_parts(43_152_750, 0) + // Minimum execution time: 21_192_000 picoseconds. + Weight::from_parts(23_417_921, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 282_586 - .saturating_add(Weight::from_parts(53_625, 0).saturating_mul(s.into())) + // Standard Error: 9_127 + .saturating_add(Weight::from_parts(179_079, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,24 +136,26 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `240` // Estimated: `3922` - // Minimum execution time: 24_560_000 picoseconds. - Weight::from_parts(20_280_625, 0) + // Minimum execution time: 11_906_000 picoseconds. + Weight::from_parts(12_776_568, 0) .saturating_add(Weight::from_parts(0, 3922)) - // Standard Error: 125_216 - .saturating_add(Weight::from_parts(2_519_937, 0).saturating_mul(s.into())) + // Standard Error: 4_632 + .saturating_add(Weight::from_parts(181_977, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Multisig::Multisigs` (r:1 w:1) /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. - fn cancel_as_multi(_s: u32, ) -> Weight { + fn cancel_as_multi(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `332 + s * (4 ±0)` + // Measured: `329 + s * (5 ±0)` // Estimated: `3922` - // Minimum execution time: 43_044_000 picoseconds. - Weight::from_parts(58_535_000, 0) + // Minimum execution time: 22_943_000 picoseconds. + Weight::from_parts(24_323_364, 0) .saturating_add(Weight::from_parts(0, 3922)) + // Standard Error: 6_921 + .saturating_add(Weight::from_parts(234_775, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_oneshot_account.rs b/runtime/common/src/weights/pallet_oneshot_account.rs index 763fc12107959f049d6764edfa5b24786dab05c8..6cedd65d1e8b7e20333e940e2687310aafbe9c79 100644 --- a/runtime/common/src/weights/pallet_oneshot_account.rs +++ b/runtime/common/src/weights/pallet_oneshot_account.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_oneshot_account` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -53,8 +53,8 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 40_392_000 picoseconds. - Weight::from_parts(41_299_000, 0) + // Minimum execution time: 17_293_000 picoseconds. + Weight::from_parts(18_193_000, 0) .saturating_add(Weight::from_parts(0, 3507)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -69,8 +69,8 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `242` // Estimated: `3707` - // Minimum execution time: 50_349_000 picoseconds. - Weight::from_parts(53_834_000, 0) + // Minimum execution time: 23_076_000 picoseconds. + Weight::from_parts(24_608_000, 0) .saturating_add(Weight::from_parts(0, 3707)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,10 +83,10 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn consume_oneshot_account_with_remaining() -> Weight { // Proof Size summary in bytes: - // Measured: `306` + // Measured: `303` // Estimated: `6192` - // Minimum execution time: 71_084_000 picoseconds. - Weight::from_parts(76_511_000, 0) + // Minimum execution time: 32_999_000 picoseconds. + Weight::from_parts(34_096_000, 0) .saturating_add(Weight::from_parts(0, 6192)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index 8cea5d5178324ddb6dddec908284fe9cfa5ffdfe..b337d5c90e76fe337e5ef0515edf3bc59b326974 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -58,12 +58,12 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3548` - // Minimum execution time: 38_160_000 picoseconds. - Weight::from_parts(39_633_500, 0) + // Minimum execution time: 10_976_000 picoseconds. + Weight::from_parts(11_507_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 65 - .saturating_add(Weight::from_parts(2_347, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_328, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Preimage::StatusFor` (r:1 w:0) @@ -77,12 +77,12 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 25_789_000 picoseconds. - Weight::from_parts(51_365_500, 0) + // Minimum execution time: 12_683_000 picoseconds. + Weight::from_parts(14_022_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 59 - .saturating_add(Weight::from_parts(2_238, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_339, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Preimage::StatusFor` (r:1 w:0) @@ -96,12 +96,12 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 24_406_000 picoseconds. - Weight::from_parts(25_614_000, 0) + // Minimum execution time: 12_079_000 picoseconds. + Weight::from_parts(12_373_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - // Standard Error: 17 - .saturating_add(Weight::from_parts(2_811, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_329, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Preimage::StatusFor` (r:1 w:0) @@ -114,8 +114,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3548` - // Minimum execution time: 60_607_000 picoseconds. - Weight::from_parts(70_545_000, 0) + // Minimum execution time: 25_092_000 picoseconds. + Weight::from_parts(28_178_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -130,8 +130,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 38_868_000 picoseconds. - Weight::from_parts(46_917_000, 0) + // Minimum execution time: 24_140_000 picoseconds. + Weight::from_parts(26_756_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -144,8 +144,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3548` - // Minimum execution time: 30_541_000 picoseconds. - Weight::from_parts(37_066_000, 0) + // Minimum execution time: 23_493_000 picoseconds. + Weight::from_parts(25_785_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -158,8 +158,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 30_620_000 picoseconds. - Weight::from_parts(44_732_000, 0) + // Minimum execution time: 14_998_000 picoseconds. + Weight::from_parts(17_048_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +172,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3548` - // Minimum execution time: 32_593_000 picoseconds. - Weight::from_parts(48_836_000, 0) + // Minimum execution time: 10_270_000 picoseconds. + Weight::from_parts(11_739_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -186,8 +186,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 18_050_000 picoseconds. - Weight::from_parts(20_396_000, 0) + // Minimum execution time: 7_496_000 picoseconds. + Weight::from_parts(8_474_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -202,8 +202,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3548` - // Minimum execution time: 34_145_000 picoseconds. - Weight::from_parts(38_096_000, 0) + // Minimum execution time: 20_891_000 picoseconds. + Weight::from_parts(23_562_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -216,8 +216,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 11_945_000 picoseconds. - Weight::from_parts(15_583_000, 0) + // Minimum execution time: 7_010_000 picoseconds. + Weight::from_parts(7_990_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -230,8 +230,8 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3548` - // Minimum execution time: 16_740_000 picoseconds. - Weight::from_parts(19_662_000, 0) + // Minimum execution time: 6_978_000 picoseconds. + Weight::from_parts(8_112_000, 0) .saturating_add(Weight::from_parts(0, 3548)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -247,11 +247,11 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0 + n * (180 ±0)` // Estimated: `990 + n * (2601 ±0)` - // Minimum execution time: 16_685_000 picoseconds. - Weight::from_parts(17_134_000, 0) + // Minimum execution time: 17_190_000 picoseconds. + Weight::from_parts(17_690_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 17_297 - .saturating_add(Weight::from_parts(13_805_632, 0).saturating_mul(n.into())) + // Standard Error: 21_896 + .saturating_add(Weight::from_parts(14_106_860, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2601).saturating_mul(n.into())) diff --git a/runtime/common/src/weights/pallet_provide_randomness.rs b/runtime/common/src/weights/pallet_provide_randomness.rs index 003ec1b3c7e3d515f4551c84f64cd52af22637b3..a711fa67f69c6969cb585795f21bda049c5eb0fc 100644 --- a/runtime/common/src/weights/pallet_provide_randomness.rs +++ b/runtime/common/src/weights/pallet_provide_randomness.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_provide_randomness` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -63,13 +63,13 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn /// Proof: `ProvideRandomness::RequestsReadyAtEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) fn request() -> Weight { // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `3700` - // Minimum execution time: 80_561_000 picoseconds. - Weight::from_parts(108_149_000, 0) - .saturating_add(Weight::from_parts(0, 3700)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `299` + // Estimated: `3764` + // Minimum execution time: 33_763_000 picoseconds. + Weight::from_parts(34_847_000, 0) + .saturating_add(Weight::from_parts(0, 3764)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `ProvideRandomness::RequestsReadyAtNextBlock` (r:1 w:1) /// Proof: `ProvideRandomness::RequestsReadyAtNextBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -86,13 +86,13 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn /// The range of component `i` is `[1, 100]`. fn on_initialize(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `375 + i * (59 ±0)` - // Estimated: `1860 + i * (2535 ±0)` - // Minimum execution time: 43_649_000 picoseconds. - Weight::from_parts(27_155_939, 0) - .saturating_add(Weight::from_parts(0, 1860)) - // Standard Error: 194_874 - .saturating_add(Weight::from_parts(16_862_060, 0).saturating_mul(i.into())) + // Measured: `383 + i * (59 ±0)` + // Estimated: `1869 + i * (2535 ±0)` + // Minimum execution time: 17_391_000 picoseconds. + Weight::from_parts(14_035_244, 0) + .saturating_add(Weight::from_parts(0, 1869)) + // Standard Error: 11_236 + .saturating_add(Weight::from_parts(6_119_309, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -120,13 +120,13 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn /// The range of component `i` is `[1, 100]`. fn on_initialize_epoch(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `385 + i * (59 ±0)` - // Estimated: `3850 + i * (2535 ±0)` - // Minimum execution time: 53_551_000 picoseconds. - Weight::from_parts(57_278_090, 0) - .saturating_add(Weight::from_parts(0, 3850)) - // Standard Error: 3_676_910 - .saturating_add(Weight::from_parts(19_046_909, 0).saturating_mul(i.into())) + // Measured: `393 + i * (59 ±0)` + // Estimated: `3859 + i * (2535 ±0)` + // Minimum execution time: 18_437_000 picoseconds. + Weight::from_parts(12_735_888, 0) + .saturating_add(Weight::from_parts(0, 3859)) + // Standard Error: 27_945 + .saturating_add(Weight::from_parts(6_583_504, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index f21307d4706ae053eeec5f4a7d29a03a96329a3b..ab6569931af69aced25343ed84b5ca3461ea63ef 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -52,13 +52,13 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `155 + p * (37 ±0)` + // Measured: `157 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 25_631_000 picoseconds. - Weight::from_parts(26_675_316, 0) + // Minimum execution time: 11_488_000 picoseconds. + Weight::from_parts(12_478_639, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 114_144 - .saturating_add(Weight::from_parts(191_683, 0).saturating_mul(p.into())) + // Standard Error: 2_196 + .saturating_add(Weight::from_parts(39_575, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -71,15 +71,15 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `437 + a * (68 ±0) + p * (35 ±0)` + // Measured: `400 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5690` - // Minimum execution time: 52_992_000 picoseconds. - Weight::from_parts(11_730_200, 0) + // Minimum execution time: 27_658_000 picoseconds. + Weight::from_parts(27_797_134, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 592_609 - .saturating_add(Weight::from_parts(1_318_258, 0).saturating_mul(a.into())) - // Standard Error: 612_363 - .saturating_add(Weight::from_parts(1_363_300, 0).saturating_mul(p.into())) + // Standard Error: 7_818 + .saturating_add(Weight::from_parts(159_170, 0).saturating_mul(a.into())) + // Standard Error: 8_078 + .saturating_add(Weight::from_parts(60_025, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -89,13 +89,15 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(_a: u32, _p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `361 + a * (68 ±0)` + // Measured: `323 + a * (68 ±0)` // Estimated: `5690` - // Minimum execution time: 36_348_000 picoseconds. - Weight::from_parts(45_209_200, 0) + // Minimum execution time: 18_093_000 picoseconds. + Weight::from_parts(19_767_838, 0) .saturating_add(Weight::from_parts(0, 5690)) + // Standard Error: 2_203 + .saturating_add(Weight::from_parts(136_988, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -105,17 +107,15 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { + fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `361 + a * (68 ±0)` + // Measured: `323 + a * (68 ±0)` // Estimated: `5690` - // Minimum execution time: 32_605_000 picoseconds. - Weight::from_parts(41_767_616, 0) + // Minimum execution time: 18_451_000 picoseconds. + Weight::from_parts(19_887_654, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 337_979 - .saturating_add(Weight::from_parts(142_145, 0).saturating_mul(a.into())) - // Standard Error: 349_245 - .saturating_add(Weight::from_parts(115_883, 0).saturating_mul(p.into())) + // Standard Error: 2_545 + .saturating_add(Weight::from_parts(116_796, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -127,28 +127,32 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, _p: u32, ) -> Weight { + fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `296 + a * (70 ±0) + p * (35 ±0)` + // Measured: `332 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5690` - // Minimum execution time: 49_970_000 picoseconds. - Weight::from_parts(53_871_883, 0) + // Minimum execution time: 24_577_000 picoseconds. + Weight::from_parts(24_843_121, 0) .saturating_add(Weight::from_parts(0, 5690)) - // Standard Error: 146_491 - .saturating_add(Weight::from_parts(272_483, 0).saturating_mul(a.into())) + // Standard Error: 3_456 + .saturating_add(Weight::from_parts(147_094, 0).saturating_mul(a.into())) + // Standard Error: 3_571 + .saturating_add(Weight::from_parts(40_009, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn add_proxy(_p: u32, ) -> Weight { + fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `155 + p * (37 ±0)` + // Measured: `157 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 40_566_000 picoseconds. - Weight::from_parts(47_260_300, 0) + // Minimum execution time: 16_369_000 picoseconds. + Weight::from_parts(17_950_412, 0) .saturating_add(Weight::from_parts(0, 4698)) + // Standard Error: 2_582 + .saturating_add(Weight::from_parts(69_264, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -157,26 +161,28 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `155 + p * (37 ±0)` + // Measured: `157 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 41_275_000 picoseconds. - Weight::from_parts(41_844_616, 0) + // Minimum execution time: 16_949_000 picoseconds. + Weight::from_parts(18_564_683, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 386_747 - .saturating_add(Weight::from_parts(409_883, 0).saturating_mul(p.into())) + // Standard Error: 2_791 + .saturating_add(Weight::from_parts(42_186, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(_p: u32, ) -> Weight { + fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `155 + p * (37 ±0)` + // Measured: `157 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 35_764_000 picoseconds. - Weight::from_parts(47_260_516, 0) + // Minimum execution time: 16_249_000 picoseconds. + Weight::from_parts(17_690_033, 0) .saturating_add(Weight::from_parts(0, 4698)) + // Standard Error: 2_343 + .saturating_add(Weight::from_parts(48_435, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -187,24 +193,26 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `177` // Estimated: `4698` - // Minimum execution time: 44_405_000 picoseconds. - Weight::from_parts(71_055_316, 0) + // Minimum execution time: 18_178_000 picoseconds. + Weight::from_parts(19_495_842, 0) .saturating_add(Weight::from_parts(0, 4698)) - // Standard Error: 1_936 - .saturating_add(Weight::from_parts(2_195, 0).saturating_mul(p.into())) + // Standard Error: 2_840 + .saturating_add(Weight::from_parts(42_180, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. - fn kill_pure(_p: u32, ) -> Weight { + fn kill_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `193 + p * (37 ±0)` + // Measured: `194 + p * (37 ±0)` // Estimated: `4698` - // Minimum execution time: 36_924_000 picoseconds. - Weight::from_parts(39_701_000, 0) + // Minimum execution time: 17_367_000 picoseconds. + Weight::from_parts(19_053_184, 0) .saturating_add(Weight::from_parts(0, 4698)) + // Standard Error: 2_865 + .saturating_add(Weight::from_parts(34_625, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_quota.rs b/runtime/common/src/weights/pallet_quota.rs index 2e67c768b4813a7920181bcd6f2bc3663e89964a..ea4113968a309d4a514d9f9d3c7620e38afccbf0 100644 --- a/runtime/common/src/weights/pallet_quota.rs +++ b/runtime/common/src/weights/pallet_quota.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_quota` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -53,8 +53,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `11288` // Estimated: `12751` - // Minimum execution time: 20_999_000 picoseconds. - Weight::from_parts(33_078_000, 0) + // Minimum execution time: 7_646_000 picoseconds. + Weight::from_parts(8_316_000, 0) .saturating_add(Weight::from_parts(0, 12751)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +65,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `139` // Estimated: `3489` - // Minimum execution time: 9_664_000 picoseconds. - Weight::from_parts(10_321_000, 0) + // Minimum execution time: 4_915_000 picoseconds. + Weight::from_parts(5_206_000, 0) .saturating_add(Weight::from_parts(0, 3489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,13 +77,13 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn try_refund() -> Weight { // Proof Size summary in bytes: - // Measured: `139` - // Estimated: `3591` - // Minimum execution time: 47_064_000 picoseconds. - Weight::from_parts(48_828_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `203` + // Estimated: `6192` + // Minimum execution time: 23_129_000 picoseconds. + Weight::from_parts(23_954_000, 0) + .saturating_add(Weight::from_parts(0, 6192)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Quota::IdtyQuota` (r:1 w:1) /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) @@ -91,13 +91,13 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn do_refund() -> Weight { // Proof Size summary in bytes: - // Measured: `139` - // Estimated: `3591` - // Minimum execution time: 46_343_000 picoseconds. - Weight::from_parts(71_066_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `203` + // Estimated: `6192` + // Minimum execution time: 23_329_000 picoseconds. + Weight::from_parts(23_957_000, 0) + .saturating_add(Weight::from_parts(0, 6192)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Quota::RefundQueue` (r:1 w:1) /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `MaxEncodedLen`) @@ -105,30 +105,29 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `43` // Estimated: `12751` - // Minimum execution time: 5_297_000 picoseconds. - Weight::from_parts(5_802_000, 0) + // Minimum execution time: 1_924_000 picoseconds. + Weight::from_parts(2_538_000, 0) .saturating_add(Weight::from_parts(0, 12751)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Quota::RefundQueue` (r:1 w:1) - /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `Measured`) + /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `MaxEncodedLen`) /// Storage: `Quota::IdtyQuota` (r:1 w:1) - /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `Measured`) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `Measured`) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `i` is `[1, 256]`. fn on_process_refund_queue_elements(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `161 + i * (44 ±0)` - // Estimated: `3627 + i * (44 ±0)` - // Minimum execution time: 54_337_000 picoseconds. - Weight::from_parts(57_391_466, 0) - .saturating_add(Weight::from_parts(0, 3627)) - // Standard Error: 30_722 - .saturating_add(Weight::from_parts(2_727_533, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 44).saturating_mul(i.into())) + // Measured: `228 + i * (44 ±0)` + // Estimated: `12751` + // Minimum execution time: 26_758_000 picoseconds. + Weight::from_parts(40_276_184, 0) + .saturating_add(Weight::from_parts(0, 12751)) + // Standard Error: 3_300 + .saturating_add(Weight::from_parts(1_234_776, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index 7a86277ae324c41dc41a93411c42c83cfe743705..1fdee954f26a288b3e40dd63312e3a6f47f55b6f 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -53,8 +53,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `30` // Estimated: `1489` - // Minimum execution time: 5_917_000 picoseconds. - Weight::from_parts(6_875_000, 0) + // Minimum execution time: 2_234_000 picoseconds. + Weight::from_parts(2_470_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,13 +64,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3 + s * (178 ±0)` + // Measured: `77 + s * (177 ±0)` // Estimated: `13928` - // Minimum execution time: 5_375_000 picoseconds. - Weight::from_parts(5_869_000, 0) + // Minimum execution time: 2_679_000 picoseconds. + Weight::from_parts(5_358_392, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 735_416 - .saturating_add(Weight::from_parts(1_431_610, 0).saturating_mul(s.into())) + // Standard Error: 1_718 + .saturating_add(Weight::from_parts(308_585, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,8 +78,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_667_000 picoseconds. - Weight::from_parts(10_122_000, 0) + // Minimum execution time: 2_379_000 picoseconds. + Weight::from_parts(2_525_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -91,14 +91,14 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `172 + s * (1 ±0)` - // Estimated: `3638 + s * (1 ±0)` - // Minimum execution time: 30_949_000 picoseconds. - Weight::from_parts(31_708_943, 0) - .saturating_add(Weight::from_parts(0, 3638)) - // Standard Error: 88 - .saturating_add(Weight::from_parts(2_164, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `179 + s * (1 ±0)` + // Estimated: `3644 + s * (1 ±0)` + // Minimum execution time: 13_535_000 picoseconds. + Weight::from_parts(14_150_000, 0) + .saturating_add(Weight::from_parts(0, 3644)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(953, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } @@ -108,8 +108,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_569_000 picoseconds. - Weight::from_parts(13_496_000, 0) + // Minimum execution time: 3_364_000 picoseconds. + Weight::from_parts(3_881_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -117,24 +117,24 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_803_000 picoseconds. - Weight::from_parts(10_347_000, 0) + // Minimum execution time: 2_278_000 picoseconds. + Weight::from_parts(2_456_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_067_000 picoseconds. - Weight::from_parts(6_483_000, 0) + // Minimum execution time: 1_571_000 picoseconds. + Weight::from_parts(1_735_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_837_000 picoseconds. - Weight::from_parts(6_432_000, 0) + // Minimum execution time: 1_592_000 picoseconds. + Weight::from_parts(1_769_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -142,13 +142,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3 + s * (178 ±0)` + // Measured: `77 + s * (177 ±0)` // Estimated: `13928` - // Minimum execution time: 19_912_000 picoseconds. - Weight::from_parts(21_702_500, 0) + // Minimum execution time: 7_758_000 picoseconds. + Weight::from_parts(10_615_080, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 44_424 - .saturating_add(Weight::from_parts(559_500, 0).saturating_mul(s.into())) + // Standard Error: 6_439 + .saturating_add(Weight::from_parts(326_350, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -161,11 +161,11 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `77 + s * (177 ±0)` // Estimated: `13928` - // Minimum execution time: 24_537_000 picoseconds. - Weight::from_parts(24_737_234, 0) + // Minimum execution time: 10_712_000 picoseconds. + Weight::from_parts(11_474_590, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 23_186 - .saturating_add(Weight::from_parts(754_765, 0).saturating_mul(s.into())) + // Standard Error: 2_463 + .saturating_add(Weight::from_parts(509_097, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -176,13 +176,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3 + s * (191 ±0)` + // Measured: `254 + s * (185 ±0)` // Estimated: `13928` - // Minimum execution time: 22_267_000 picoseconds. - Weight::from_parts(23_915_000, 0) + // Minimum execution time: 9_844_000 picoseconds. + Weight::from_parts(14_141_822, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 40_796 - .saturating_add(Weight::from_parts(637_887, 0).saturating_mul(s.into())) + // Standard Error: 3_298 + .saturating_add(Weight::from_parts(361_643, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -193,13 +193,13 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `101 + s * (188 ±0)` + // Measured: `280 + s * (185 ±0)` // Estimated: `13928` - // Minimum execution time: 26_099_000 picoseconds. - Weight::from_parts(26_618_969, 0) + // Minimum execution time: 12_837_000 picoseconds. + Weight::from_parts(14_859_626, 0) .saturating_add(Weight::from_parts(0, 13928)) - // Standard Error: 30_479 - .saturating_add(Weight::from_parts(813_030, 0).saturating_mul(s.into())) + // Standard Error: 2_979 + .saturating_add(Weight::from_parts(506_475, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/common/src/weights/pallet_session.rs b/runtime/common/src/weights/pallet_session.rs index 249b19475ea84ae44e008a0d5e832e5cea6cda60..b6fa4fdac14fe33e1184679d2c534c761c59787f 100644 --- a/runtime/common/src/weights/pallet_session.rs +++ b/runtime/common/src/weights/pallet_session.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -55,8 +55,8 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `723` // Estimated: `11613` - // Minimum execution time: 37_945_000 picoseconds. - Weight::from_parts(40_868_000, 0) + // Minimum execution time: 23_143_000 picoseconds. + Weight::from_parts(24_290_000, 0) .saturating_add(Weight::from_parts(0, 11613)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -69,8 +69,8 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 22_999_000 picoseconds. - Weight::from_parts(23_845_000, 0) + // Minimum execution time: 13_541_000 picoseconds. + Weight::from_parts(14_530_000, 0) .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(5)) diff --git a/runtime/common/src/weights/pallet_smith_members.rs b/runtime/common/src/weights/pallet_smith_members.rs index 3e89d16dd5654befdbac2bca8b8d8025788d6f15..48f6b02e476eb57038d45231cd364f4ec5c93ae4 100644 --- a/runtime/common/src/weights/pallet_smith_members.rs +++ b/runtime/common/src/weights/pallet_smith_members.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_smith_members` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -61,11 +61,11 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> /// Proof: `SmithMembers::ExpiresOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn invite_smith() -> Weight { // Proof Size summary in bytes: - // Measured: `732` - // Estimated: `6672` - // Minimum execution time: 61_398_000 picoseconds. - Weight::from_parts(63_088_000, 0) - .saturating_add(Weight::from_parts(0, 6672)) + // Measured: `765` + // Estimated: `6705` + // Minimum execution time: 24_103_000 picoseconds. + Weight::from_parts(25_031_000, 0) + .saturating_add(Weight::from_parts(0, 6705)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -75,11 +75,11 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) fn accept_invitation() -> Weight { // Proof Size summary in bytes: - // Measured: `463` - // Estimated: `3928` - // Minimum execution time: 31_273_000 picoseconds. - Weight::from_parts(32_005_000, 0) - .saturating_add(Weight::from_parts(0, 3928)) + // Measured: `496` + // Estimated: `3961` + // Minimum execution time: 12_739_000 picoseconds. + Weight::from_parts(13_410_000, 0) + .saturating_add(Weight::from_parts(0, 3961)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -91,14 +91,16 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `SmithMembers::CurrentSession` (r:1 w:0) /// Proof: `SmithMembers::CurrentSession` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::ExpiresOn` (r:1 w:1) + /// Proof: `SmithMembers::ExpiresOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn certify_smith() -> Weight { // Proof Size summary in bytes: - // Measured: `577` - // Estimated: `6517` - // Minimum execution time: 47_601_000 picoseconds. - Weight::from_parts(48_286_000, 0) - .saturating_add(Weight::from_parts(0, 6517)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `626` + // Estimated: `6566` + // Minimum execution time: 23_175_000 picoseconds. + Weight::from_parts(24_257_000, 0) + .saturating_add(Weight::from_parts(0, 6566)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/common/src/weights/pallet_sudo.rs b/runtime/common/src/weights/pallet_sudo.rs index d66cc41fa2664c8022c8b96b38663feb7dd5ddcf..9cfc651a885fa13bb3fff9b97b832cbb4d3c51ed 100644 --- a/runtime/common/src/weights/pallet_sudo.rs +++ b/runtime/common/src/weights/pallet_sudo.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_sudo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -53,8 +53,8 @@ impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `165` // Estimated: `1517` - // Minimum execution time: 6_941_000 picoseconds. - Weight::from_parts(7_451_000, 0) + // Minimum execution time: 7_090_000 picoseconds. + Weight::from_parts(7_609_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +65,8 @@ impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `165` // Estimated: `1517` - // Minimum execution time: 7_383_000 picoseconds. - Weight::from_parts(7_917_000, 0) + // Minimum execution time: 7_228_000 picoseconds. + Weight::from_parts(7_677_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -76,8 +76,8 @@ impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `165` // Estimated: `1517` - // Minimum execution time: 7_367_000 picoseconds. - Weight::from_parts(7_890_000, 0) + // Minimum execution time: 7_111_000 picoseconds. + Weight::from_parts(7_507_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -87,8 +87,8 @@ impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `165` // Estimated: `1517` - // Minimum execution time: 6_445_000 picoseconds. - Weight::from_parts(6_714_000, 0) + // Minimum execution time: 5_975_000 picoseconds. + Weight::from_parts(6_389_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index 6518156f09c0aaa72d8ba3b9353bb01e03ded23a..45a9f1ee0071213ca18a15654bcdbca97b266a01 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -59,8 +59,8 @@ impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `379` // Estimated: `1864` - // Minimum execution time: 23_818_000 picoseconds. - Weight::from_parts(29_069_000, 0) + // Minimum execution time: 10_472_000 picoseconds. + Weight::from_parts(10_906_000, 0) .saturating_add(Weight::from_parts(0, 1864)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,8 +69,8 @@ impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 5_122_000 picoseconds. - Weight::from_parts(8_269_000, 0) + // Minimum execution time: 2_490_000 picoseconds. + Weight::from_parts(2_662_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index 578f56c090daf9b95951083ddab989fca4ebf2f7..44f911050732fec815d486bdc94ab639f29284a6 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -51,8 +51,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 377_000 picoseconds. - Weight::from_parts(557_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Treasury::ProposalCount` (r:1 w:1) @@ -63,8 +63,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `68` // Estimated: `1489` - // Minimum execution time: 35_505_000 picoseconds. - Weight::from_parts(38_046_000, 0) + // Minimum execution time: 17_253_000 picoseconds. + Weight::from_parts(18_225_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -75,13 +75,13 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `210` - // Estimated: `3591` - // Minimum execution time: 50_438_000 picoseconds. - Weight::from_parts(77_399_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `274` + // Estimated: `6192` + // Minimum execution time: 27_458_000 picoseconds. + Weight::from_parts(29_214_000, 0) + .saturating_add(Weight::from_parts(0, 6192)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Treasury::Proposals` (r:1 w:0) /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) @@ -90,13 +90,13 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `97 + p * (11 ±0)` + // Measured: `433 + p * (8 ±0)` // Estimated: `3557` - // Minimum execution time: 12_736_000 picoseconds. - Weight::from_parts(13_685_500, 0) + // Minimum execution time: 6_161_000 picoseconds. + Weight::from_parts(9_912_317, 0) .saturating_add(Weight::from_parts(0, 3557)) - // Standard Error: 9_954 - .saturating_add(Weight::from_parts(55_005, 0).saturating_mul(p.into())) + // Standard Error: 1_404 + .saturating_add(Weight::from_parts(49_916, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -106,8 +106,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 9_504_000 picoseconds. - Weight::from_parts(10_584_000, 0) + // Minimum execution time: 4_329_000 picoseconds. + Weight::from_parts(4_644_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -125,17 +125,18 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6 + p * (194 ±0)` - // Estimated: `521190` - // Minimum execution time: 36_855_000 picoseconds. - Weight::from_parts(46_349_000, 0) - .saturating_add(Weight::from_parts(0, 521190)) - // Standard Error: 393_829 - .saturating_add(Weight::from_parts(47_248_945, 0).saturating_mul(p.into())) + // Measured: `0 + p * (196 ±0)` + // Estimated: `3591 + p * (5202 ±0)` + // Minimum execution time: 11_741_000 picoseconds. + Weight::from_parts(24_413_097, 0) + .saturating_add(Weight::from_parts(0, 3591)) + // Standard Error: 55_879 + .saturating_add(Weight::from_parts(25_867_805, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 5202).saturating_mul(p.into())) } fn spend() -> Weight { // Proof Size summary in bytes: @@ -155,8 +156,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `180` // Estimated: `6192` - // Minimum execution time: 42_526_000 picoseconds. - Weight::from_parts(43_552_000, 0) + // Minimum execution time: 40_971_000 picoseconds. + Weight::from_parts(43_246_000, 0) .saturating_add(Weight::from_parts(0, 6192)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -167,8 +168,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `116` // Estimated: `3526` - // Minimum execution time: 8_915_000 picoseconds. - Weight::from_parts(9_287_000, 0) + // Minimum execution time: 9_324_000 picoseconds. + Weight::from_parts(9_721_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -179,8 +180,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `116` // Estimated: `3526` - // Minimum execution time: 7_955_000 picoseconds. - Weight::from_parts(8_849_000, 0) + // Minimum execution time: 8_174_000 picoseconds. + Weight::from_parts(8_559_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs index 889e7c9996e88eb1e3cb975b7108a7397a700bcb..f7a07406071ed271d28cbaa5d6129dd881270d4d 100644 --- a/runtime/common/src/weights/pallet_universal_dividend.rs +++ b/runtime/common/src/weights/pallet_universal_dividend.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_universal_dividend` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -60,11 +60,11 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn /// The range of component `i` is `[1, 160]`. fn claim_uds(_i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `644` - // Estimated: `4109` - // Minimum execution time: 25_591_000 picoseconds. - Weight::from_parts(27_628_958, 0) - .saturating_add(Weight::from_parts(0, 4109)) + // Measured: `677` + // Estimated: `4142` + // Minimum execution time: 25_452_000 picoseconds. + Weight::from_parts(29_537_021, 0) + .saturating_add(Weight::from_parts(0, 4142)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -78,8 +78,8 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `157` // Estimated: `6192` - // Minimum execution time: 47_742_000 picoseconds. - Weight::from_parts(49_561_000, 0) + // Minimum execution time: 49_417_000 picoseconds. + Weight::from_parts(51_459_000, 0) .saturating_add(Weight::from_parts(0, 6192)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -94,8 +94,8 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `93` // Estimated: `3591` - // Minimum execution time: 34_158_000 picoseconds. - Weight::from_parts(35_312_000, 0) + // Minimum execution time: 34_092_000 picoseconds. + Weight::from_parts(34_705_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -106,16 +106,16 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn /// Proof: `UniversalDividend::PastReevals` (`max_values`: Some(1), `max_size`: Some(1602), added: 2097, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) - /// The range of component `i` is `[0, 160]`. + /// The range of component `i` is `[1, 160]`. fn on_removed_member(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3591` - // Minimum execution time: 3_240_000 picoseconds. - Weight::from_parts(14_149_848, 0) + // Minimum execution time: 13_665_000 picoseconds. + Weight::from_parts(15_160_609, 0) .saturating_add(Weight::from_parts(0, 3591)) - // Standard Error: 1_525 - .saturating_add(Weight::from_parts(5_772, 0).saturating_mul(i.into())) + // Standard Error: 451 + .saturating_add(Weight::from_parts(91, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/common/src/weights/pallet_upgrade_origin.rs b/runtime/common/src/weights/pallet_upgrade_origin.rs index 287a8b650adc67dffaff94e7cc5cb7ff8d8e4ca9..f9829d56fe8fdaca83f409eeeec097a4e2db6b9d 100644 --- a/runtime/common/src/weights/pallet_upgrade_origin.rs +++ b/runtime/common/src/weights/pallet_upgrade_origin.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_upgrade_origin` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -51,8 +51,8 @@ impl<T: frame_system::Config> pallet_upgrade_origin::WeightInfo for WeightInfo<T // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 17_982_000 picoseconds. - Weight::from_parts(28_253_000, 0) + // Minimum execution time: 4_795_000 picoseconds. + Weight::from_parts(5_173_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index 3bbc0e50f65454c7168465298b36bd9b597444d3..ecaa7a5305e3ff5f6dc6410a17a55b896125f7ca 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -17,18 +17,18 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-02-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: -// ./target/release/duniter +// target/release/duniter // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=2 +// --steps=50 +// --repeat=20 // --pallet=* // --extrinsic=* // --wasm-execution=compiled @@ -52,18 +52,18 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_177_000 picoseconds. - Weight::from_parts(11_674_500, 0) + // Minimum execution time: 3_904_000 picoseconds. + Weight::from_parts(17_914_565, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 27_396 - .saturating_add(Weight::from_parts(5_373_642, 0).saturating_mul(c.into())) + // Standard Error: 4_509 + .saturating_add(Weight::from_parts(2_190_055, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_509_000 picoseconds. - Weight::from_parts(9_706_000, 0) + // Minimum execution time: 3_356_000 picoseconds. + Weight::from_parts(3_549_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -71,18 +71,18 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_566_000 picoseconds. - Weight::from_parts(11_745_000, 0) + // Minimum execution time: 3_858_000 picoseconds. + Weight::from_parts(10_617_377, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 186_645 - .saturating_add(Weight::from_parts(5_786_628, 0).saturating_mul(c.into())) + // Standard Error: 14_046 + .saturating_add(Weight::from_parts(2_396_630, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 20_582_000 picoseconds. - Weight::from_parts(29_829_000, 0) + // Minimum execution time: 5_153_000 picoseconds. + Weight::from_parts(5_492_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -90,10 +90,10 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_326_000 picoseconds. - Weight::from_parts(13_269_000, 0) + // Minimum execution time: 3_601_000 picoseconds. + Weight::from_parts(8_137_563, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 721_799 - .saturating_add(Weight::from_parts(6_123_784, 0).saturating_mul(c.into())) + // Standard Error: 3_578 + .saturating_add(Weight::from_parts(2_178_091, 0).saturating_mul(c.into())) } } diff --git a/runtime/common/src/weights/paritydb_weights.rs b/runtime/common/src/weights/paritydb_weights.rs index 4673b94b3907f7761eb255fbaeb2131346cd0efd..357b8ba2612a811add2932cbd06c0ffdf7a111bd 100644 --- a/runtime/common/src/weights/paritydb_weights.rs +++ b/runtime/common/src/weights/paritydb_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-24 (Y/M/D) +//! DATE: 2024-02-01 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! //! DATABASE: `ParityDb`, RUNTIME: `Ğdev Local Testnet` @@ -33,31 +33,31 @@ pub mod constants { /// Calculated by multiplying the *Average* of all values with `2.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 951, 1_277_318 - /// Average: 11_592 - /// Median: 1_567 - /// Std-Dev: 111445.56 + /// Min, Max: 944, 1_716_223 + /// Average: 14_915 + /// Median: 1_665 + /// Std-Dev: 149218.91 /// /// Percentiles nanoseconds: - /// 99th: 10_193 - /// 95th: 2_928 - /// 75th: 1_855 - read: 23_184 * constants::WEIGHT_REF_TIME_PER_NANOS, + /// 99th: 13_564 + /// 95th: 3_092 + /// 75th: 1_972 + read: 29_830 * constants::WEIGHT_REF_TIME_PER_NANOS, /// Time to write one storage item. /// Calculated by multiplying the *Average* of all values with `2.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 3_824, 6_440_944 - /// Average: 58_440 - /// Median: 8_907 - /// Std-Dev: 561954.34 + /// Min, Max: 3_842, 6_482_032 + /// Average: 58_636 + /// Median: 8_892 + /// Std-Dev: 563376.05 /// /// Percentiles nanoseconds: - /// 99th: 18_256 - /// 95th: 13_376 - /// 75th: 10_858 - write: 116_880 * constants::WEIGHT_REF_TIME_PER_NANOS, + /// 99th: 21_967 + /// 95th: 13_806 + /// 75th: 11_443 + write: 117_272 * constants::WEIGHT_REF_TIME_PER_NANOS, }; }