code/pallets/commitments/src/weights.rs

weights.rs

61 lines · 1,918 bytes · 19a6485969RawGitHub

//! Autogenerated weights for `pallet_commitments`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-12-08, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `rustys-mbp.lan`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("local")`, DB CACHE: `1024`

// Executed Command:
// ./target/release/node-subtensor
// benchmark
// pallet
// --chain=local
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_commitments
// --extrinsic=*
// --output=pallets/commitments/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs

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

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

/// Weight functions needed for `pallet_commitments`.
pub trait WeightInfo {
	fn set_commitment() -> Weight;
	fn set_max_space() -> Weight;
}

/// Weights for `pallet_commitments` using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
	fn set_commitment() -> Weight {
		Weight::from_parts(33_480_000, 0)
			.saturating_add(T::DbWeight::get().reads(5_u64))
			.saturating_add(T::DbWeight::get().writes(4_u64))
	}
	fn set_max_space() -> Weight {
		Weight::from_parts(2_856_000, 0)
			.saturating_add(T::DbWeight::get().writes(1_u64))
	}
}

// For backwards compatibility and tests.
impl WeightInfo for () {
	fn set_commitment() -> Weight {
		Weight::from_parts(33_480_000, 0)
			.saturating_add(RocksDbWeight::get().reads(5_u64))
			.saturating_add(RocksDbWeight::get().writes(4_u64))
	}
	fn set_max_space() -> Weight {
		Weight::from_parts(2_856_000, 0)
			.saturating_add(RocksDbWeight::get().writes(1_u64))
	}
}