Skip to content

Commit

Permalink
Add weights for pallet-migration on testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Moliholy authored and valentinfernandez1 committed Aug 16, 2024
1 parent 1480928 commit 53258aa
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
3 changes: 1 addition & 2 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ pub type Executive = frame_executive::Executive<
>;

pub mod fee {

use super::{Balance, ExtrinsicBaseWeight, MILLI_MUSE, MILLI_ROC};
use frame_support::weights::{
constants::WEIGHT_REF_TIME_PER_SECOND, FeePolynomial, Weight, WeightToFeeCoefficient,
Expand Down Expand Up @@ -672,7 +671,7 @@ impl pallet_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type Currency = Balances;
type WeightInfo = ();
type WeightInfo = weights::pallet_migration::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
Expand Down
1 change: 1 addition & 0 deletions runtime/testnet/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub mod pallet_dmarket;
pub mod pallet_escrow;
pub mod pallet_marketplace;
pub mod pallet_message_queue;
pub mod pallet_migration;
pub mod pallet_multibatching;
pub mod pallet_multisig;
pub mod pallet_myth_proxy;
Expand Down
82 changes: 82 additions & 0 deletions runtime/testnet/src/weights/pallet_migration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

//! Autogenerated weights for `pallet_migration`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bdl-ref`, CPU: `AMD EPYC 7232P 8-Core Processor`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("local-v")`, DB CACHE: 1024

// Executed Command:
// ./target/release/mythos-node
// benchmark
// pallet
// --chain
// local-v
// --pallet
// pallet_migration
// --extrinsic
// *
// --wasm-execution
// compiled
// --steps
// 50
// --repeat
// 20
// --output
// ./runtime/testnet/src/weights/pallet_migration.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_migration`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_migration::WeightInfo for WeightInfo<T> {
/// Storage: `Migration::Migrator` (r:1 w:1)
/// Proof: `Migration::Migrator` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
fn force_set_migrator() -> Weight {
// Proof Size summary in bytes:
// Measured: `3`
// Estimated: `1505`
// Minimum execution time: 10_780_000 picoseconds.
Weight::from_parts(11_620_000, 0)
.saturating_add(Weight::from_parts(0, 1505))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Migration::Migrator` (r:1 w:0)
/// Proof: `Migration::Migrator` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
/// Storage: `Dmarket::DmarketCollection` (r:1 w:0)
/// Proof: `Dmarket::DmarketCollection` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(637), added: 3112, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Collection` (r:1 w:0)
/// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(169), added: 2644, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Attribute` (r:1 w:0)
/// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(495), added: 2970, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
/// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
/// Storage: `Nfts::Account` (r:0 w:2)
/// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
/// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
/// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
/// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
/// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(151), added: 2626, mode: `MaxEncodedLen`)
fn set_item_owner() -> Weight {
// Proof Size summary in bytes:
// Measured: `900`
// Estimated: `4102`
// Minimum execution time: 82_700_000 picoseconds.
Weight::from_parts(84_051_000, 0)
.saturating_add(Weight::from_parts(0, 4102))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
}

0 comments on commit 53258aa

Please sign in to comment.