referrerpolicy=no-referrer-when-downgrade

pallet_oracle/
weights.rs

1// This file is part of Substrate.
2
3// Copyright (C) 2020-2025 Acala Foundation.
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_oracle`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 50.0.0
21//! DATE: 2025-09-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `Mac.lan`, CPU: `<UNKNOWN>`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
25
26// Executed Command:
27// frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --extrinsic=all
32// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
33// --pallet=pallet_oracle
34// --header=substrate/HEADER-APACHE2
35// --output=substrate/frame/honzon/oracle/src/weights.rs
36// --wasm-execution=compiled
37// --steps=50
38// --repeat=20
39// --heap-pages=4096
40// --template=substrate/.maintain/frame-weight-template.hbs
41// --no-storage-info
42// --no-min-squares
43// --no-median-slopes
44// --genesis-builder-policy=none
45// --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
46
47#![cfg_attr(rustfmt, rustfmt_skip)]
48#![allow(unused_parens)]
49#![allow(unused_imports)]
50#![allow(missing_docs)]
51#![allow(dead_code)]
52
53use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
54use core::marker::PhantomData;
55
56/// Weight functions needed for `pallet_oracle`.
57pub trait WeightInfo {
58	fn feed_values(x: u32, ) -> Weight;
59	fn on_finalize() -> Weight;
60}
61
62/// Weights for `pallet_oracle` using the Substrate node and recommended hardware.
63pub struct SubstrateWeight<T>(PhantomData<T>);
64impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
65	/// Storage: `TechnicalMembership::Members` (r:1 w:0)
66	/// Proof: `TechnicalMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
67	/// Storage: `Oracle::HasDispatched` (r:1 w:1)
68	/// Proof: `Oracle::HasDispatched` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
69	/// Storage: `Timestamp::Now` (r:1 w:0)
70	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
71	/// Storage: `Oracle::RawValues` (r:10 w:10)
72	/// Proof: `Oracle::RawValues` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
73	/// Storage: `Oracle::Values` (r:10 w:0)
74	/// Proof: `Oracle::Values` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
75	/// The range of component `x` is `[0, 10]`.
76	fn feed_values(x: u32, ) -> Weight {
77		// Proof Size summary in bytes:
78		//  Measured:  `3`
79		//  Estimated: `4687 + x * (2551 ±0)`
80		// Minimum execution time: 5_000_000 picoseconds.
81		Weight::from_parts(6_049_545, 4687)
82			// Standard Error: 9_666
83			.saturating_add(Weight::from_parts(5_167_799, 0).saturating_mul(x.into()))
84			.saturating_add(T::DbWeight::get().reads(3_u64))
85			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into())))
86			.saturating_add(T::DbWeight::get().writes(1_u64))
87			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
88			.saturating_add(Weight::from_parts(0, 2551).saturating_mul(x.into()))
89	}
90	/// Storage: `Oracle::HasDispatched` (r:0 w:1)
91	/// Proof: `Oracle::HasDispatched` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
92	fn on_finalize() -> Weight {
93		// Proof Size summary in bytes:
94		//  Measured:  `0`
95		//  Estimated: `0`
96		// Minimum execution time: 0_000 picoseconds.
97		Weight::from_parts(1_000_000, 0)
98			.saturating_add(T::DbWeight::get().writes(1_u64))
99	}
100}
101
102// For backwards compatibility and tests.
103impl WeightInfo for () {
104	/// Storage: `TechnicalMembership::Members` (r:1 w:0)
105	/// Proof: `TechnicalMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
106	/// Storage: `Oracle::HasDispatched` (r:1 w:1)
107	/// Proof: `Oracle::HasDispatched` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
108	/// Storage: `Timestamp::Now` (r:1 w:0)
109	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
110	/// Storage: `Oracle::RawValues` (r:10 w:10)
111	/// Proof: `Oracle::RawValues` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
112	/// Storage: `Oracle::Values` (r:10 w:0)
113	/// Proof: `Oracle::Values` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
114	/// The range of component `x` is `[0, 10]`.
115	fn feed_values(x: u32, ) -> Weight {
116		// Proof Size summary in bytes:
117		//  Measured:  `3`
118		//  Estimated: `4687 + x * (2551 ±0)`
119		// Minimum execution time: 5_000_000 picoseconds.
120		Weight::from_parts(6_049_545, 4687)
121			// Standard Error: 9_666
122			.saturating_add(Weight::from_parts(5_167_799, 0).saturating_mul(x.into()))
123			.saturating_add(RocksDbWeight::get().reads(3_u64))
124			.saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(x.into())))
125			.saturating_add(RocksDbWeight::get().writes(1_u64))
126			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(x.into())))
127			.saturating_add(Weight::from_parts(0, 2551).saturating_mul(x.into()))
128	}
129	/// Storage: `Oracle::HasDispatched` (r:0 w:1)
130	/// Proof: `Oracle::HasDispatched` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
131	fn on_finalize() -> Weight {
132		// Proof Size summary in bytes:
133		//  Measured:  `0`
134		//  Estimated: `0`
135		// Minimum execution time: 0_000 picoseconds.
136		Weight::from_parts(1_000_000, 0)
137			.saturating_add(RocksDbWeight::get().writes(1_u64))
138	}
139}