pallet_price_aggregator/
weights.rs

1
2// This file is part of Astar.
3
4// Copyright (C) Stake Technologies Pte.Ltd.
5// SPDX-License-Identifier: GPL-3.0-or-later
6
7// Astar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11
12// Astar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License
18// along with Astar. If not, see <http://www.gnu.org/licenses/>.
19
20//! Autogenerated weights for pallet_price_aggregator
21//!
22//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
23//! DATE: 2024-03-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
24//! WORST CASE MAP SIZE: `1000000`
25//! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
26//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
27
28// Executed Command:
29// ./target/release/astar-collator
30// benchmark
31// pallet
32// --chain=shibuya-dev
33// --steps=50
34// --repeat=20
35// --pallet=pallet_price_aggregator
36// --extrinsic=*
37// --execution=wasm
38// --wasm-execution=compiled
39// --heap-pages=4096
40// --output=./benchmark-results/shibuya-dev/price_aggregator_weights.rs
41// --template=./scripts/templates/weight-template.hbs
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use core::marker::PhantomData;
49
50/// Weight functions needed for pallet_price_aggregator.
51pub trait WeightInfo {
52	fn process_block_aggregated_values() -> Weight;
53	fn process_intermediate_aggregated_values() -> Weight;
54}
55
56/// Weights for pallet_price_aggregator using the Substrate node and recommended hardware.
57pub struct SubstrateWeight<T>(PhantomData<T>);
58impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
59	fn process_block_aggregated_values() -> Weight {
60		// Proof Size summary in bytes:
61		//  Measured:  `0`
62		//  Estimated: `0`
63		// Minimum execution time: 3_417_000 picoseconds.
64		Weight::from_parts(3_520_000, 0)
65	}
66	/// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:1)
67	/// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`)
68	fn process_intermediate_aggregated_values() -> Weight {
69		// Proof Size summary in bytes:
70		//  Measured:  `102`
71		//  Estimated: `1602`
72		// Minimum execution time: 9_093_000 picoseconds.
73		Weight::from_parts(9_297_000, 1602)
74			.saturating_add(T::DbWeight::get().reads(1_u64))
75			.saturating_add(T::DbWeight::get().writes(1_u64))
76	}
77}
78
79// For backwards compatibility and tests
80impl WeightInfo for () {
81	fn process_block_aggregated_values() -> Weight {
82		// Proof Size summary in bytes:
83		//  Measured:  `0`
84		//  Estimated: `0`
85		// Minimum execution time: 3_417_000 picoseconds.
86		Weight::from_parts(3_520_000, 0)
87	}
88	/// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:1)
89	/// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`)
90	fn process_intermediate_aggregated_values() -> Weight {
91		// Proof Size summary in bytes:
92		//  Measured:  `102`
93		//  Estimated: `1602`
94		// Minimum execution time: 9_093_000 picoseconds.
95		Weight::from_parts(9_297_000, 1602)
96			.saturating_add(RocksDbWeight::get().reads(1_u64))
97			.saturating_add(RocksDbWeight::get().writes(1_u64))
98	}
99}