Skip to content

Commit

Permalink
Fix: corrected weight for unregister_core
Browse files Browse the repository at this point in the history
  • Loading branch information
Anny0nn committed Jun 18, 2024
1 parent 2ea6d9d commit c7bd7bb
Showing 1 changed file with 75 additions and 55 deletions.
130 changes: 75 additions & 55 deletions OCIF/staking/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Autogenerated weights for `pallet_ocif_staking`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-05-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `anny.local`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
Expand Down Expand Up @@ -58,16 +58,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `n` is `[0, 20]`.
/// The range of component `d` is `[0, 300]`.
/// The range of component `i` is `[0, 100]`.
fn register_core(_n: u32, d: u32, i: u32, ) -> Weight {
fn register_core(_n: u32, _d: u32, _i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `213`
// Estimated: `3942`
// Minimum execution time: 22_000_000 picoseconds.
Weight::from_parts(23_127_348, 3942)
// Standard Error: 152
.saturating_add(Weight::from_parts(526, 0).saturating_mul(d.into()))
// Standard Error: 456
.saturating_add(Weight::from_parts(395, 0).saturating_mul(i.into()))
Weight::from_parts(24_293_021, 3942)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
Expand All @@ -83,13 +79,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `86`
// Estimated: `3942`
// Minimum execution time: 9_000_000 picoseconds.
Weight::from_parts(9_729_396, 3942)
// Standard Error: 1_581
.saturating_add(Weight::from_parts(5_533, 0).saturating_mul(n.into()))
// Standard Error: 108
.saturating_add(Weight::from_parts(788, 0).saturating_mul(d.into()))
// Standard Error: 324
.saturating_add(Weight::from_parts(947, 0).saturating_mul(i.into()))
Weight::from_parts(9_593_278, 3942)
// Standard Error: 890
.saturating_add(Weight::from_parts(4_471, 0).saturating_mul(n.into()))
// Standard Error: 61
.saturating_add(Weight::from_parts(856, 0).saturating_mul(d.into()))
// Standard Error: 182
.saturating_add(Weight::from_parts(1_028, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -103,16 +99,30 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `OcifStaking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::GeneralStakerInfo` (r:1 w:0)
/// Proof: `OcifStaking::GeneralStakerInfo` (`max_values`: None, `max_size`: Some(269), added: 2744, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::CoreEraStake` (r:1 w:1)
/// Proof: `OcifStaking::CoreEraStake` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::GeneralEraInfo` (r:1 w:1)
/// Proof: `OcifStaking::GeneralEraInfo` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::UnregisteredCoreStakeInfo` (r:0 w:1)
/// Proof: `OcifStaking::UnregisteredCoreStakeInfo` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::UnregisteredCoreStakers` (r:0 w:1)
/// Proof: `OcifStaking::UnregisteredCoreStakers` (`max_values`: None, `max_size`: Some(320022), added: 322497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134194), added: 136669, mode: `MaxEncodedLen`)
fn unregister_core() -> Weight {
// Proof Size summary in bytes:
// Measured: `337`
// Measured: `343`
// Estimated: `3942`
// Minimum execution time: 27_000_000 picoseconds.
Weight::from_parts(28_000_000, 3942)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
// Minimum execution time: 44_000_000 picoseconds.
Weight::from_parts(45_000_000, 3942)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(9_u64))
}
/// Storage: `OcifStaking::Halted` (r:1 w:0)
/// Proof: `OcifStaking::Halted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
Expand Down Expand Up @@ -163,8 +173,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `397`
// Estimated: `4764`
// Minimum execution time: 35_000_000 picoseconds.
Weight::from_parts(36_000_000, 4764)
// Minimum execution time: 36_000_000 picoseconds.
Weight::from_parts(37_000_000, 4764)
.saturating_add(T::DbWeight::get().reads(9_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand All @@ -184,8 +194,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `449`
// Estimated: `4764`
// Minimum execution time: 32_000_000 picoseconds.
Weight::from_parts(34_000_000, 4764)
// Minimum execution time: 31_000_000 picoseconds.
Weight::from_parts(32_000_000, 4764)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
Expand All @@ -203,8 +213,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `374`
// Estimated: `3734`
// Minimum execution time: 19_000_000 picoseconds.
Weight::from_parts(20_000_000, 3734)
// Minimum execution time: 18_000_000 picoseconds.
Weight::from_parts(19_000_000, 3734)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand Down Expand Up @@ -234,7 +244,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `4`
// Estimated: `1486`
// Minimum execution time: 5_000_000 picoseconds.
Weight::from_parts(6_000_000, 1486)
Weight::from_parts(5_000_000, 1486)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -252,8 +262,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `302`
// Estimated: `6478`
// Minimum execution time: 25_000_000 picoseconds.
Weight::from_parts(26_000_000, 6478)
// Minimum execution time: 24_000_000 picoseconds.
Weight::from_parts(25_000_000, 6478)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -272,16 +282,12 @@ impl WeightInfo for () {
/// The range of component `n` is `[0, 20]`.
/// The range of component `d` is `[0, 300]`.
/// The range of component `i` is `[0, 100]`.
fn register_core(_n: u32, d: u32, i: u32, ) -> Weight {
fn register_core(_n: u32, _d: u32, _i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `213`
// Estimated: `3942`
// Minimum execution time: 22_000_000 picoseconds.
Weight::from_parts(23_127_348, 3942)
// Standard Error: 152
.saturating_add(Weight::from_parts(526, 0).saturating_mul(d.into()))
// Standard Error: 456
.saturating_add(Weight::from_parts(395, 0).saturating_mul(i.into()))
Weight::from_parts(24_293_021, 3942)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
Expand All @@ -297,13 +303,13 @@ impl WeightInfo for () {
// Measured: `86`
// Estimated: `3942`
// Minimum execution time: 9_000_000 picoseconds.
Weight::from_parts(9_729_396, 3942)
// Standard Error: 1_581
.saturating_add(Weight::from_parts(5_533, 0).saturating_mul(n.into()))
// Standard Error: 108
.saturating_add(Weight::from_parts(788, 0).saturating_mul(d.into()))
// Standard Error: 324
.saturating_add(Weight::from_parts(947, 0).saturating_mul(i.into()))
Weight::from_parts(9_593_278, 3942)
// Standard Error: 890
.saturating_add(Weight::from_parts(4_471, 0).saturating_mul(n.into()))
// Standard Error: 61
.saturating_add(Weight::from_parts(856, 0).saturating_mul(d.into()))
// Standard Error: 182
.saturating_add(Weight::from_parts(1_028, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -317,16 +323,30 @@ impl WeightInfo for () {
/// Proof: `OcifStaking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::GeneralStakerInfo` (r:1 w:0)
/// Proof: `OcifStaking::GeneralStakerInfo` (`max_values`: None, `max_size`: Some(269), added: 2744, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::CoreEraStake` (r:1 w:1)
/// Proof: `OcifStaking::CoreEraStake` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::GeneralEraInfo` (r:1 w:1)
/// Proof: `OcifStaking::GeneralEraInfo` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::UnregisteredCoreStakeInfo` (r:0 w:1)
/// Proof: `OcifStaking::UnregisteredCoreStakeInfo` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `OcifStaking::UnregisteredCoreStakers` (r:0 w:1)
/// Proof: `OcifStaking::UnregisteredCoreStakers` (`max_values`: None, `max_size`: Some(320022), added: 322497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134194), added: 136669, mode: `MaxEncodedLen`)
fn unregister_core() -> Weight {
// Proof Size summary in bytes:
// Measured: `337`
// Measured: `343`
// Estimated: `3942`
// Minimum execution time: 27_000_000 picoseconds.
Weight::from_parts(28_000_000, 3942)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
// Minimum execution time: 44_000_000 picoseconds.
Weight::from_parts(45_000_000, 3942)
.saturating_add(RocksDbWeight::get().reads(10_u64))
.saturating_add(RocksDbWeight::get().writes(9_u64))
}
/// Storage: `OcifStaking::Halted` (r:1 w:0)
/// Proof: `OcifStaking::Halted` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
Expand Down Expand Up @@ -377,8 +397,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `397`
// Estimated: `4764`
// Minimum execution time: 35_000_000 picoseconds.
Weight::from_parts(36_000_000, 4764)
// Minimum execution time: 36_000_000 picoseconds.
Weight::from_parts(37_000_000, 4764)
.saturating_add(RocksDbWeight::get().reads(9_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
Expand All @@ -398,8 +418,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `449`
// Estimated: `4764`
// Minimum execution time: 32_000_000 picoseconds.
Weight::from_parts(34_000_000, 4764)
// Minimum execution time: 31_000_000 picoseconds.
Weight::from_parts(32_000_000, 4764)
.saturating_add(RocksDbWeight::get().reads(6_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
Expand All @@ -417,8 +437,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `374`
// Estimated: `3734`
// Minimum execution time: 19_000_000 picoseconds.
Weight::from_parts(20_000_000, 3734)
// Minimum execution time: 18_000_000 picoseconds.
Weight::from_parts(19_000_000, 3734)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand Down Expand Up @@ -448,7 +468,7 @@ impl WeightInfo for () {
// Measured: `4`
// Estimated: `1486`
// Minimum execution time: 5_000_000 picoseconds.
Weight::from_parts(6_000_000, 1486)
Weight::from_parts(5_000_000, 1486)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -466,8 +486,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `302`
// Estimated: `6478`
// Minimum execution time: 25_000_000 picoseconds.
Weight::from_parts(26_000_000, 6478)
// Minimum execution time: 24_000_000 picoseconds.
Weight::from_parts(25_000_000, 6478)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand Down

0 comments on commit c7bd7bb

Please sign in to comment.