pallet_nft_fractionalization/weights.rs
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// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_nft_fractionalization`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `4563561839a5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_nft_fractionalization
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/nft-fractionalization/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --genesis-builder-policy=none
62// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage,pallet_election_provider_multi_block,pallet_election_provider_multi_block::signed,pallet_election_provider_multi_block::unsigned,pallet_election_provider_multi_block::verifier
63
64#![cfg_attr(rustfmt, rustfmt_skip)]
65#![allow(unused_parens)]
66#![allow(unused_imports)]
67#![allow(missing_docs)]
68#![allow(dead_code)]
69
70use frame::weights_prelude::*;
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_nft_fractionalization`.
74pub trait WeightInfo {
75 fn fractionalize() -> Weight;
76 fn unify() -> Weight;
77}
78
79/// Weights for `pallet_nft_fractionalization` using the Substrate node and recommended hardware.
80pub struct SubstrateWeight<T>(PhantomData<T>);
81impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
82 /// Storage: `Nfts::Item` (r:1 w:0)
83 /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
84 /// Storage: `Balances::Holds` (r:1 w:1)
85 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(427), added: 2902, mode: `MaxEncodedLen`)
86 /// Storage: `Nfts::Attribute` (r:1 w:1)
87 /// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
88 /// Storage: `Nfts::Collection` (r:1 w:1)
89 /// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
90 /// Storage: `Assets::Asset` (r:1 w:1)
91 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
92 /// Storage: `Assets::NextAssetId` (r:1 w:0)
93 /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
94 /// Storage: `Assets::Account` (r:1 w:1)
95 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
96 /// Storage: `System::Account` (r:1 w:1)
97 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
98 /// Storage: `Assets::Metadata` (r:1 w:1)
99 /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
100 /// Storage: `NftFractionalization::NftToAsset` (r:0 w:1)
101 /// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
102 fn fractionalize() -> Weight {
103 // Proof Size summary in bytes:
104 // Measured: `364`
105 // Estimated: `4326`
106 // Minimum execution time: 173_042_000 picoseconds.
107 Weight::from_parts(176_398_000, 4326)
108 .saturating_add(T::DbWeight::get().reads(9_u64))
109 .saturating_add(T::DbWeight::get().writes(8_u64))
110 }
111 /// Storage: `NftFractionalization::NftToAsset` (r:1 w:1)
112 /// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
113 /// Storage: `Assets::Asset` (r:1 w:1)
114 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
115 /// Storage: `Assets::Account` (r:1 w:1)
116 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
117 /// Storage: `Nfts::Attribute` (r:1 w:1)
118 /// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
119 /// Storage: `Nfts::Collection` (r:1 w:1)
120 /// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
121 /// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
122 /// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
123 /// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
124 /// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
125 /// Storage: `Nfts::Item` (r:1 w:1)
126 /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
127 /// Storage: `Balances::Holds` (r:1 w:1)
128 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(427), added: 2902, mode: `MaxEncodedLen`)
129 /// Storage: `Nfts::Account` (r:0 w:1)
130 /// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
131 /// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
132 /// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
133 /// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
134 /// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
135 fn unify() -> Weight {
136 // Proof Size summary in bytes:
137 // Measured: `1174`
138 // Estimated: `4326`
139 // Minimum execution time: 124_038_000 picoseconds.
140 Weight::from_parts(127_219_000, 4326)
141 .saturating_add(T::DbWeight::get().reads(9_u64))
142 .saturating_add(T::DbWeight::get().writes(10_u64))
143 }
144}
145
146// For backwards compatibility and tests.
147impl WeightInfo for () {
148 /// Storage: `Nfts::Item` (r:1 w:0)
149 /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
150 /// Storage: `Balances::Holds` (r:1 w:1)
151 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(427), added: 2902, mode: `MaxEncodedLen`)
152 /// Storage: `Nfts::Attribute` (r:1 w:1)
153 /// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
154 /// Storage: `Nfts::Collection` (r:1 w:1)
155 /// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
156 /// Storage: `Assets::Asset` (r:1 w:1)
157 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
158 /// Storage: `Assets::NextAssetId` (r:1 w:0)
159 /// Proof: `Assets::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
160 /// Storage: `Assets::Account` (r:1 w:1)
161 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
162 /// Storage: `System::Account` (r:1 w:1)
163 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
164 /// Storage: `Assets::Metadata` (r:1 w:1)
165 /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(140), added: 2615, mode: `MaxEncodedLen`)
166 /// Storage: `NftFractionalization::NftToAsset` (r:0 w:1)
167 /// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
168 fn fractionalize() -> Weight {
169 // Proof Size summary in bytes:
170 // Measured: `364`
171 // Estimated: `4326`
172 // Minimum execution time: 173_042_000 picoseconds.
173 Weight::from_parts(176_398_000, 4326)
174 .saturating_add(RocksDbWeight::get().reads(9_u64))
175 .saturating_add(RocksDbWeight::get().writes(8_u64))
176 }
177 /// Storage: `NftFractionalization::NftToAsset` (r:1 w:1)
178 /// Proof: `NftFractionalization::NftToAsset` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
179 /// Storage: `Assets::Asset` (r:1 w:1)
180 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
181 /// Storage: `Assets::Account` (r:1 w:1)
182 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
183 /// Storage: `Nfts::Attribute` (r:1 w:1)
184 /// Proof: `Nfts::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`)
185 /// Storage: `Nfts::Collection` (r:1 w:1)
186 /// Proof: `Nfts::Collection` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
187 /// Storage: `Nfts::CollectionConfigOf` (r:1 w:0)
188 /// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
189 /// Storage: `Nfts::ItemConfigOf` (r:1 w:0)
190 /// Proof: `Nfts::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
191 /// Storage: `Nfts::Item` (r:1 w:1)
192 /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
193 /// Storage: `Balances::Holds` (r:1 w:1)
194 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(427), added: 2902, mode: `MaxEncodedLen`)
195 /// Storage: `Nfts::Account` (r:0 w:1)
196 /// Proof: `Nfts::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`)
197 /// Storage: `Nfts::ItemPriceOf` (r:0 w:1)
198 /// Proof: `Nfts::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
199 /// Storage: `Nfts::PendingSwapOf` (r:0 w:1)
200 /// Proof: `Nfts::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`)
201 fn unify() -> Weight {
202 // Proof Size summary in bytes:
203 // Measured: `1174`
204 // Estimated: `4326`
205 // Minimum execution time: 124_038_000 picoseconds.
206 Weight::from_parts(127_219_000, 4326)
207 .saturating_add(RocksDbWeight::get().reads(9_u64))
208 .saturating_add(RocksDbWeight::get().writes(10_u64))
209 }
210}