referrerpolicy=no-referrer-when-downgrade

pallet_example_split/
weights.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: MIT-0
5
6// Permission is hereby granted, free of charge, to any person obtaining a copy of
7// this software and associated documentation files (the "Software"), to deal in
8// the Software without restriction, including without limitation the rights to
9// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10// of the Software, and to permit persons to whom the Software is furnished to do
11// so, subject to the following conditions:
12
13// The above copyright notice and this permission notice shall be included in all
14// copies or substantial portions of the Software.
15
16// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22// SOFTWARE.
23
24//! Autogenerated weights for pallet_template
25//!
26//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
27//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
28//! WORST CASE MAP SIZE: `1000000`
29//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `<UNKNOWN>`
30//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
31
32// Executed Command:
33// ../../target/release/node-template
34// benchmark
35// pallet
36// --chain
37// dev
38// --pallet
39// pallet_template
40// --extrinsic
41// *
42// --steps=50
43// --repeat=20
44// --execution=wasm
45// --wasm-execution=compiled
46// --output
47// pallets/template/src/weights.rs
48// --template
49// ../../.maintain/frame-weight-template.hbs
50
51#![cfg_attr(rustfmt, rustfmt_skip)]
52#![allow(unused_parens)]
53#![allow(unused_imports)]
54
55use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
56use core::marker::PhantomData;
57
58/// Weight functions needed for pallet_template.
59pub trait WeightInfo {
60	fn do_something() -> Weight;
61	fn cause_error() -> Weight;
62}
63
64/// Weights for pallet_template using the Substrate node and recommended hardware.
65pub struct SubstrateWeight<T>(PhantomData<T>);
66impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
67	/// Storage: TemplatePallet Something (r:0 w:1)
68	/// Proof: TemplatePallet Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
69	fn do_something() -> Weight {
70		// Proof Size summary in bytes:
71		//  Measured:  `0`
72		//  Estimated: `0`
73		// Minimum execution time: 8_000_000 picoseconds.
74		Weight::from_parts(9_000_000, 0)
75			.saturating_add(T::DbWeight::get().writes(1_u64))
76	}
77	/// Storage: TemplatePallet Something (r:1 w:1)
78	/// Proof: TemplatePallet Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
79	fn cause_error() -> Weight {
80		// Proof Size summary in bytes:
81		//  Measured:  `32`
82		//  Estimated: `1489`
83		// Minimum execution time: 6_000_000 picoseconds.
84		Weight::from_parts(6_000_000, 1489)
85			.saturating_add(T::DbWeight::get().reads(1_u64))
86			.saturating_add(T::DbWeight::get().writes(1_u64))
87	}
88}
89
90// For backwards compatibility and tests
91impl WeightInfo for () {
92	/// Storage: TemplatePallet Something (r:0 w:1)
93	/// Proof: TemplatePallet Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
94	fn do_something() -> Weight {
95		// Proof Size summary in bytes:
96		//  Measured:  `0`
97		//  Estimated: `0`
98		// Minimum execution time: 8_000_000 picoseconds.
99		Weight::from_parts(9_000_000, 0)
100			.saturating_add(RocksDbWeight::get().writes(1_u64))
101	}
102	/// Storage: TemplatePallet Something (r:1 w:1)
103	/// Proof: TemplatePallet Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
104	fn cause_error() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `32`
107		//  Estimated: `1489`
108		// Minimum execution time: 6_000_000 picoseconds.
109		Weight::from_parts(6_000_000, 1489)
110			.saturating_add(RocksDbWeight::get().reads(1_u64))
111			.saturating_add(RocksDbWeight::get().writes(1_u64))
112	}
113}