mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
7c8804c049
* benchmarks for fungibles * add benchmark to westend * fix hex * clean up a bit * update code doc * fix warnings * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=westend-dev --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --steps=10 --repeat=10 --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./ --execution=wasm --wasm-execution=compiled * use skip * fix spelling * Update Cargo.lock * add scale-info * Update Cargo.lock * update bench * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs * weights compile * update westend to use weights * fmt * spelling fixes * Delete pallet_xcm_benchmarks::fungible.rs * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix code review * update weight * fix report_error * fix spell check Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
67 lines
2.6 KiB
Handlebars
67 lines
2.6 KiB
Handlebars
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
|
// This file is part of Polkadot.
|
|
|
|
// Polkadot is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Polkadot is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Autogenerated weights for `{{pallet}}`
|
|
//!
|
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
|
|
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
|
|
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
|
|
|
|
// Executed Command:
|
|
{{#each args as |arg|~}}
|
|
// {{arg}}
|
|
{{/each}}
|
|
|
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
|
#![allow(unused_parens)]
|
|
#![allow(unused_imports)]
|
|
|
|
use frame_support::{traits::Get, weights::Weight};
|
|
use sp_std::marker::PhantomData;
|
|
|
|
/// Weights for `{{pallet}}`.
|
|
pub struct WeightInfo<T>(PhantomData<T>);
|
|
impl<T: frame_system::Config> WeightInfo<T> {
|
|
{{~#each benchmarks as |benchmark|}}
|
|
{{~#each benchmark.comments as |comment|}}
|
|
// {{comment}}
|
|
{{~/each}}
|
|
pub(crate) fn {{benchmark.name~}}
|
|
(
|
|
{{~#each benchmark.components as |c| ~}}
|
|
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
|
|
) -> Weight {
|
|
({{underscore benchmark.base_weight}} as Weight)
|
|
{{~#each benchmark.component_weight as |cw|}}
|
|
// Standard Error: {{underscore cw.error}}
|
|
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
|
|
{{~/each}}
|
|
{{~#if (ne benchmark.base_reads "0")}}
|
|
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
|
|
{{~/if}}
|
|
{{~#each benchmark.component_reads as |cr|}}
|
|
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
|
|
{{~/each}}
|
|
{{~#if (ne benchmark.base_writes "0")}}
|
|
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
|
|
{{~/if}}
|
|
{{~#each benchmark.component_writes as |cw|}}
|
|
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
|
|
{{~/each}}
|
|
}
|
|
{{~/each}}
|
|
}
|