git.delta.rocks / unique-network / refs/commits / 19dbab98f182

difftreelog

style allow missing docs in weights

Yaroslav Bolyukin2022-07-12parent: #dced9b9.patch.diff
in: master

1 file changed

modified.maintain/frame-weight-template.hbsdiffbeforeafterboth
before · .maintain/frame-weight-template.hbs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for {{pallet}}4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}6//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`7//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}89// Executed Command:10{{#each args as |arg|}}11// {{arg}}12{{/each}}1314#![cfg_attr(rustfmt, rustfmt_skip)]15#![allow(unused_parens)]16#![allow(unused_imports)]17#![allow(clippy::unnecessary_cast)]1819use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};20use sp_std::marker::PhantomData;2122/// Weight functions needed for {{pallet}}.23pub trait WeightInfo {24	{{#each benchmarks as |benchmark|}}25	fn {{benchmark.name~}}26	(27		{{~#each benchmark.components as |c| ~}}28		{{c.name}}: u32, {{/each~}}29	) -> Weight;30	{{/each}}31}3233/// Weights for {{pallet}} using the Substrate node and recommended hardware.34pub struct SubstrateWeight<T>(PhantomData<T>);35{{#if (eq pallet "frame_system")}}36impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {37{{else}}38impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {39{{/if}}40	{{#each benchmarks as |benchmark|}}41	{{#each benchmark.comments as |comment|}}42	// {{comment}}43	{{/each}}44	fn {{benchmark.name~}}45	(46		{{~#each benchmark.components as |c| ~}}47		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}48	) -> Weight {49		({{underscore benchmark.base_weight}} as Weight)50			{{#each benchmark.component_weight as |cw|}}51			// Standard Error: {{underscore cw.error}}52			.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))53			{{/each}}54			{{#if (ne benchmark.base_reads "0")}}55			.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))56			{{/if}}57			{{#each benchmark.component_reads as |cr|}}58			.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))59			{{/each}}60			{{#if (ne benchmark.base_writes "0")}}61			.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))62			{{/if}}63			{{#each benchmark.component_writes as |cw|}}64			.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))65			{{/each}}66	}67	{{/each}}68}6970// For backwards compatibility and tests71impl WeightInfo for () {72	{{#each benchmarks as |benchmark|}}73	{{#each benchmark.comments as |comment|}}74	// {{comment}}75	{{/each}}76	fn {{benchmark.name~}}77	(78		{{~#each benchmark.components as |c| ~}}79		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}80	) -> Weight {81		({{underscore benchmark.base_weight}} as Weight)82			{{#each benchmark.component_weight as |cw|}}83			// Standard Error: {{underscore cw.error}}84			.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))85			{{/each}}86			{{#if (ne benchmark.base_reads "0")}}87			.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))88			{{/if}}89			{{#each benchmark.component_reads as |cr|}}90			.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))91			{{/each}}92			{{#if (ne benchmark.base_writes "0")}}93			.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))94			{{/if}}95			{{#each benchmark.component_writes as |cw|}}96			.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))97			{{/each}}98	}99	{{/each}}100}
after · .maintain/frame-weight-template.hbs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for {{pallet}}4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}6//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`7//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}89// Executed Command:10{{#each args as |arg|}}11// {{arg}}12{{/each}}1314#![cfg_attr(rustfmt, rustfmt_skip)]15#![allow(unused_parens)]16#![allow(unused_imports)]17#![allow(missing_docs)]18#![allow(clippy::unnecessary_cast)]1920use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};21use sp_std::marker::PhantomData;2223/// Weight functions needed for {{pallet}}.24pub trait WeightInfo {25	{{#each benchmarks as |benchmark|}}26	fn {{benchmark.name~}}27	(28		{{~#each benchmark.components as |c| ~}}29		{{c.name}}: u32, {{/each~}}30	) -> Weight;31	{{/each}}32}3334/// Weights for {{pallet}} using the Substrate node and recommended hardware.35pub struct SubstrateWeight<T>(PhantomData<T>);36{{#if (eq pallet "frame_system")}}37impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {38{{else}}39impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {40{{/if}}41	{{#each benchmarks as |benchmark|}}42	{{#each benchmark.comments as |comment|}}43	// {{comment}}44	{{/each}}45	fn {{benchmark.name~}}46	(47		{{~#each benchmark.components as |c| ~}}48		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}49	) -> Weight {50		({{underscore benchmark.base_weight}} as Weight)51			{{#each benchmark.component_weight as |cw|}}52			// Standard Error: {{underscore cw.error}}53			.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))54			{{/each}}55			{{#if (ne benchmark.base_reads "0")}}56			.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))57			{{/if}}58			{{#each benchmark.component_reads as |cr|}}59			.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))60			{{/each}}61			{{#if (ne benchmark.base_writes "0")}}62			.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))63			{{/if}}64			{{#each benchmark.component_writes as |cw|}}65			.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))66			{{/each}}67	}68	{{/each}}69}7071// For backwards compatibility and tests72impl WeightInfo for () {73	{{#each benchmarks as |benchmark|}}74	{{#each benchmark.comments as |comment|}}75	// {{comment}}76	{{/each}}77	fn {{benchmark.name~}}78	(79		{{~#each benchmark.components as |c| ~}}80		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}81	) -> Weight {82		({{underscore benchmark.base_weight}} as Weight)83			{{#each benchmark.component_weight as |cw|}}84			// Standard Error: {{underscore cw.error}}85			.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))86			{{/each}}87			{{#if (ne benchmark.base_reads "0")}}88			.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))89			{{/if}}90			{{#each benchmark.component_reads as |cr|}}91			.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))92			{{/each}}93			{{#if (ne benchmark.base_writes "0")}}94			.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))95			{{/if}}96			{{#each benchmark.component_writes as |cw|}}97			.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))98			{{/each}}99	}100	{{/each}}101}