From c1dcab1e5c202027baf094aa9036ac2beb7345d9 Mon Sep 17 00:00:00 2001 From: bgallois <benjamin@gallois.cc> Date: Tue, 12 Mar 2024 14:22:27 +0100 Subject: [PATCH] remove unused benchmark --- pallets/certification/src/weights.rs | 8 -------- pallets/identity/src/weights.rs | 12 ------------ pallets/membership/src/lib.rs | 4 ++-- .../common/src/weights/pallet_certification.rs | 18 ------------------ runtime/common/src/weights/pallet_identity.rs | 14 -------------- 5 files changed, 2 insertions(+), 54 deletions(-) diff --git a/pallets/certification/src/weights.rs b/pallets/certification/src/weights.rs index 736d3c366..e58c33831 100644 --- a/pallets/certification/src/weights.rs +++ b/pallets/certification/src/weights.rs @@ -27,7 +27,6 @@ pub trait WeightInfo { fn on_initialize() -> Weight; fn do_remove_cert_noop() -> Weight; fn do_remove_cert() -> Weight; - fn do_add_cert_checked() -> Weight; } // Insecure weights implementation, use it for tests only! @@ -103,11 +102,4 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - - fn do_add_cert_checked() -> Weight { - // Minimum execution time: 259_247 nanoseconds. - Weight::from_parts(269_348_000 as u64, 0) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) - } } diff --git a/pallets/identity/src/weights.rs b/pallets/identity/src/weights.rs index aa07cb254..61d15aba7 100644 --- a/pallets/identity/src/weights.rs +++ b/pallets/identity/src/weights.rs @@ -35,7 +35,6 @@ pub trait WeightInfo { fn prune_identities_noop() -> Weight; fn prune_identities_none() -> Weight; fn prune_identities_err() -> Weight; - fn membership_added() -> Weight; fn membership_removed() -> Weight; } @@ -211,17 +210,6 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(8)) } - fn membership_added() -> Weight { - // Proof Size summary in bytes: - // Measured: `1177` - // Estimated: `4642` - // Minimum execution time: 1_427_848_000 picoseconds. - Weight::from_parts(2_637_229_000, 0) - .saturating_add(Weight::from_parts(0, 4642)) - .saturating_add(RocksDbWeight::get().reads(8)) - .saturating_add(RocksDbWeight::get().writes(8)) - } - fn membership_removed() -> Weight { // Proof Size summary in bytes: // Measured: `1177` diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index afa6290d5..92a82428c 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -99,9 +99,9 @@ pub mod pallet { // i.e. asking for distance evaluation #[pallet::constant] type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>; - /// On new and renew membership handler + /// On new and renew membership handler. type OnNewMembership: OnNewMembership<Self::IdtyId>; - /// On revoked and removed membership handler + /// On revoked and removed membership handler. type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>; /// Because this pallet emits events, it depends on the runtime's definition of an event. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; diff --git a/runtime/common/src/weights/pallet_certification.rs b/runtime/common/src/weights/pallet_certification.rs index 8b3f81cb9..d38b68f61 100644 --- a/runtime/common/src/weights/pallet_certification.rs +++ b/runtime/common/src/weights/pallet_certification.rs @@ -47,24 +47,6 @@ 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: `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: `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 do_add_cert_checked() -> Weight { - // Proof Size summary in bytes: - // Measured: `465` - // Estimated: `6405` - // Minimum execution time: 18_920_000 picoseconds. - Weight::from_parts(19_707_000, 0) - .saturating_add(Weight::from_parts(0, 6405)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } /// 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) diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 87fee845e..695d15018 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -342,20 +342,6 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { } /// Storage: `Identity::Identities` (r:1 w:1) /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:1) - /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn membership_added() -> Weight { - // Proof Size summary in bytes: - // Measured: `407` - // Estimated: `3872` - // Minimum execution time: 14_594_000 picoseconds. - Weight::from_parts(15_149_000, 0) - .saturating_add(Weight::from_parts(0, 3872)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Identity::Identities` (r:1 w:1) - /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:2) /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) fn membership_removed() -> Weight { -- GitLab