mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 09:27:57 +00:00
4a7a2a85b2
* Remove RefTimeWeight
* [ci] Apply cargo-fmt
* update lockfile for {"substrate", "polkadot"}
Co-authored-by: paritytech-ci <paritytech-ci@parity.io>
Co-authored-by: parity-processbot <>
69 lines
2.6 KiB
Handlebars
69 lines
2.6 KiB
Handlebars
// Copyright 2022 Parity Technologies (UK) Ltd.
|
|
// This file is part of Cumulus.
|
|
|
|
// Cumulus 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.
|
|
|
|
// Cumulus 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 Cumulus. 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}}`
|
|
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
|
|
//! 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 {
|
|
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
|
|
{{#each benchmark.component_weight as |cw|}}
|
|
// Standard Error: {{underscore cw.error}}
|
|
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}} as u64))
|
|
{{/each}}
|
|
{{#if (ne benchmark.base_reads "0")}}
|
|
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
|
|
{{/if}}
|
|
{{#each benchmark.component_reads as |cr|}}
|
|
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
|
|
{{/each}}
|
|
{{#if (ne benchmark.base_writes "0")}}
|
|
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
|
|
{{/if}}
|
|
{{#each benchmark.component_writes as |cw|}}
|
|
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
|
|
{{/each}}
|
|
}
|
|
{{/each}}
|
|
}
|