referrerpolicy=no-referrer-when-downgrade

frame_support/weights/
extrinsic_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 WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
19//! DATE: 2024-11-08 (Y/M/D)
20//! HOSTNAME: `runner-wiukf8gn-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
21//!
22//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
23//! WARMUPS: `10`, REPEAT: `100`
24//! WEIGHT-PATH: `./substrate/frame/support/src/weights/`
25//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
26
27// Executed Command:
28//   ./target/production/substrate-node
29//   benchmark
30//   overhead
31//   --chain=dev
32//   --wasm-execution=compiled
33//   --weight-path=./substrate/frame/support/src/weights/
34//   --header=./substrate/HEADER-APACHE2
35//   --warmup=10
36//   --repeat=100
37
38use sp_core::parameter_types;
39use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
40
41parameter_types! {
42	/// Weight of executing a NO-OP extrinsic, for example `System::remark`.
43	/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
44	///
45	/// Stats nanoseconds:
46	///   Min, Max: 107_464, 109_127
47	///   Average:  108_157
48	///   Median:   108_119
49	///   Std-Dev:  353.52
50	///
51	/// Percentiles nanoseconds:
52	///   99th: 109_041
53	///   95th: 108_748
54	///   75th: 108_405
55	pub const ExtrinsicBaseWeight: Weight =
56		Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(108_157), 0);
57}
58
59#[cfg(test)]
60mod test_weights {
61	use sp_weights::constants;
62
63	/// Checks that the weight exists and is sane.
64	// NOTE: If this test fails but you are sure that the generated values are fine,
65	// you can delete it.
66	#[test]
67	fn sane() {
68		let w = super::ExtrinsicBaseWeight::get();
69
70		// At least 10 µs.
71		assert!(
72			w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
73			"Weight should be at least 10 µs."
74		);
75		// At most 1 ms.
76		assert!(
77			w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
78			"Weight should be at most 1 ms."
79		);
80	}
81}