1
// This file is part of Substrate.
2

            
3
// Copyright (C) Parity Technologies (UK) Ltd.
4
// SPDX-License-Identifier: Apache-2.0
5

            
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
// 	http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17

            
18
//! Autogenerated weights for `pallet_parameters`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `runner-anb7yjbi-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
25

            
26
// Executed Command:
27
// ./target/production/substrate-node
28
// benchmark
29
// pallet
30
// --chain=dev
31
// --steps=50
32
// --repeat=20
33
// --pallet=pallet_parameters
34
// --no-storage-info
35
// --no-median-slopes
36
// --no-min-squares
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --heap-pages=4096
40
// --output=./substrate/frame/parameters/src/weights.rs
41
// --header=./substrate/HEADER-APACHE2
42
// --template=./substrate/.maintain/frame-weight-template.hbs
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47
#![allow(missing_docs)]
48

            
49
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
50
use core::marker::PhantomData;
51

            
52
/// Weight functions needed for `pallet_parameters`.
53
pub trait WeightInfo {
54
	fn set_parameter() -> Weight;
55
}
56

            
57
/// Weights for `pallet_parameters` using the Substrate node and recommended hardware.
58
pub struct SubstrateWeight<T>(PhantomData<T>);
59
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
60
	/// Storage: `Parameters::Parameters` (r:1 w:1)
61
	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
62
	fn set_parameter() -> Weight {
63
		// Proof Size summary in bytes:
64
		//  Measured:  `3`
65
		//  Estimated: `3501`
66
		// Minimum execution time: 8_360_000 picoseconds.
67
		Weight::from_parts(8_568_000, 3501)
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.
74
impl WeightInfo for () {
75
	/// Storage: `Parameters::Parameters` (r:1 w:1)
76
	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
77
	fn set_parameter() -> Weight {
78
		// Proof Size summary in bytes:
79
		//  Measured:  `3`
80
		//  Estimated: `3501`
81
		// Minimum execution time: 8_360_000 picoseconds.
82
		Weight::from_parts(8_568_000, 3501)
83
			.saturating_add(RocksDbWeight::get().reads(1_u64))
84
			.saturating_add(RocksDbWeight::get().writes(1_u64))
85
	}
86
}