pallet_parachain_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: `_`, 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::{deps::frame_support::weights::constants::RocksDbWeight, prelude::*};
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.
42#[cfg_attr(
43 not(feature = "std"),
44 deprecated(
45 note = "SubstrateWeight is auto-generated and should not be used in production. Replace it with runtime benchmarked weights."
46 )
47)]
48pub struct SubstrateWeight<T>(PhantomData<T>);
49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
50 /// Storage: Template Something (r:0 w:1)
51 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
52 fn do_something() -> Weight {
53 // Proof Size summary in bytes:
54 // Measured: `0`
55 // Estimated: `0`
56 // Minimum execution time: 8_000_000 picoseconds.
57 Weight::from_parts(9_000_000, 0)
58 .saturating_add(T::DbWeight::get().writes(1_u64))
59 }
60 /// Storage: Template Something (r:1 w:1)
61 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
62 fn cause_error() -> Weight {
63 // Proof Size summary in bytes:
64 // Measured: `32`
65 // Estimated: `1489`
66 // Minimum execution time: 6_000_000 picoseconds.
67 Weight::from_parts(6_000_000, 1489)
68 .saturating_add(T::DbWeight::get().reads(1_u64))
69 .saturating_add(T::DbWeight::get().writes(1_u64))
70 }
71}
72
73// For backwards compatibility and tests
74impl WeightInfo for () {
75 /// Storage: Template Something (r:0 w:1)
76 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
77 fn do_something() -> Weight {
78 // Proof Size summary in bytes:
79 // Measured: `0`
80 // Estimated: `0`
81 // Minimum execution time: 8_000_000 picoseconds.
82 Weight::from_parts(9_000_000, 0)
83 .saturating_add(RocksDbWeight::get().writes(1_u64))
84 }
85 /// Storage: Template Something (r:1 w:1)
86 /// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
87 fn cause_error() -> Weight {
88 // Proof Size summary in bytes:
89 // Measured: `32`
90 // Estimated: `1489`
91 // Minimum execution time: 6_000_000 picoseconds.
92 Weight::from_parts(6_000_000, 1489)
93 .saturating_add(RocksDbWeight::get().reads(1_u64))
94 .saturating_add(RocksDbWeight::get().writes(1_u64))
95 }
96}