pallet_ethereum_checked/
weights.rs

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