pallet_template/weights.rs
1
2//! Autogenerated weights for pallet_template
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
5//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `<UNKNOWN>`
8//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
9
10// Executed Command:
11// ../../target/release/node-template
12// benchmark
13// pallet
14// --chain
15// dev
16// --pallet
17// pallet_template
18// --extrinsic
19// *
20// --steps=50
21// --repeat=20
22// --wasm-execution=compiled
23// --output
24// pallets/template/src/weights.rs
25// --template
26// ../../.maintain/frame-weight-template.hbs
27
28#![cfg_attr(rustfmt, rustfmt_skip)]
29#![allow(unused_parens)]
30#![allow(unused_imports)]
31
32use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
33use core::marker::PhantomData;
34
35/// Weight functions needed for pallet_template.
36pub trait WeightInfo {
37 fn do_something() -> Weight;
38 fn cause_error() -> Weight;
39}
40
41/// Weights for pallet_template using the Substrate node and recommended hardware.
42pub struct SubstrateWeight<T>(PhantomData<T>);
43impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
44 /// Storage: Template Something (r:0 w:1)
45 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
46 fn do_something() -> Weight {
47 // Proof Size summary in bytes:
48 // Measured: `0`
49 // Estimated: `0`
50 // Minimum execution time: 8_000_000 picoseconds.
51 Weight::from_parts(9_000_000, 0)
52 .saturating_add(T::DbWeight::get().writes(1_u64))
53 }
54 /// Storage: Template Something (r:1 w:1)
55 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
56 fn cause_error() -> Weight {
57 // Proof Size summary in bytes:
58 // Measured: `32`
59 // Estimated: `1489`
60 // Minimum execution time: 6_000_000 picoseconds.
61 Weight::from_parts(6_000_000, 1489)
62 .saturating_add(T::DbWeight::get().reads(1_u64))
63 .saturating_add(T::DbWeight::get().writes(1_u64))
64 }
65}
66
67// For backwards compatibility and tests
68impl WeightInfo for () {
69 /// Storage: Template Something (r:0 w:1)
70 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
71 fn do_something() -> Weight {
72 // Proof Size summary in bytes:
73 // Measured: `0`
74 // Estimated: `0`
75 // Minimum execution time: 8_000_000 picoseconds.
76 Weight::from_parts(9_000_000, 0)
77 .saturating_add(RocksDbWeight::get().writes(1_u64))
78 }
79 /// Storage: Template Something (r:1 w:1)
80 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
81 fn cause_error() -> Weight {
82 // Proof Size summary in bytes:
83 // Measured: `32`
84 // Estimated: `1489`
85 // Minimum execution time: 6_000_000 picoseconds.
86 Weight::from_parts(6_000_000, 1489)
87 .saturating_add(RocksDbWeight::get().reads(1_u64))
88 .saturating_add(RocksDbWeight::get().writes(1_u64))
89 }
90}