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_asset_rate`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-04-08, 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_asset_rate
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/asset-rate/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_asset_rate`.
53
pub trait WeightInfo {
54
	fn create() -> Weight;
55
	fn update() -> Weight;
56
	fn remove() -> Weight;
57
}
58

            
59
/// Weights for `pallet_asset_rate` using the Substrate node and recommended hardware.
60
pub struct SubstrateWeight<T>(PhantomData<T>);
61
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
63
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
64
	fn create() -> Weight {
65
		// Proof Size summary in bytes:
66
		//  Measured:  `76`
67
		//  Estimated: `3501`
68
		// Minimum execution time: 9_816_000 picoseconds.
69
		Weight::from_parts(10_076_000, 3501)
70
			.saturating_add(T::DbWeight::get().reads(1_u64))
71
			.saturating_add(T::DbWeight::get().writes(1_u64))
72
	}
73
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
74
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
75
	fn update() -> Weight {
76
		// Proof Size summary in bytes:
77
		//  Measured:  `137`
78
		//  Estimated: `3501`
79
		// Minimum execution time: 10_164_000 picoseconds.
80
		Weight::from_parts(10_598_000, 3501)
81
			.saturating_add(T::DbWeight::get().reads(1_u64))
82
			.saturating_add(T::DbWeight::get().writes(1_u64))
83
	}
84
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
85
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
86
	fn remove() -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `137`
89
		//  Estimated: `3501`
90
		// Minimum execution time: 10_837_000 picoseconds.
91
		Weight::from_parts(11_050_000, 3501)
92
			.saturating_add(T::DbWeight::get().reads(1_u64))
93
			.saturating_add(T::DbWeight::get().writes(1_u64))
94
	}
95
}
96

            
97
// For backwards compatibility and tests.
98
impl WeightInfo for () {
99
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
100
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
101
	fn create() -> Weight {
102
		// Proof Size summary in bytes:
103
		//  Measured:  `76`
104
		//  Estimated: `3501`
105
		// Minimum execution time: 9_816_000 picoseconds.
106
		Weight::from_parts(10_076_000, 3501)
107
			.saturating_add(RocksDbWeight::get().reads(1_u64))
108
			.saturating_add(RocksDbWeight::get().writes(1_u64))
109
	}
110
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
111
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
112
	fn update() -> Weight {
113
		// Proof Size summary in bytes:
114
		//  Measured:  `137`
115
		//  Estimated: `3501`
116
		// Minimum execution time: 10_164_000 picoseconds.
117
		Weight::from_parts(10_598_000, 3501)
118
			.saturating_add(RocksDbWeight::get().reads(1_u64))
119
			.saturating_add(RocksDbWeight::get().writes(1_u64))
120
	}
121
	/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
122
	/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
123
	fn remove() -> Weight {
124
		// Proof Size summary in bytes:
125
		//  Measured:  `137`
126
		//  Estimated: `3501`
127
		// Minimum execution time: 10_837_000 picoseconds.
128
		Weight::from_parts(11_050_000, 3501)
129
			.saturating_add(RocksDbWeight::get().reads(1_u64))
130
			.saturating_add(RocksDbWeight::get().writes(1_u64))
131
	}
132
}