referrerpolicy=no-referrer-when-downgrade

rococo_runtime_constants/weights/
extrinsic_weights.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
18//! DATE: 2024-02-29 (Y/M/D)
19//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
20//!
21//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Development`
22//! WARMUPS: `10`, REPEAT: `100`
23//! WEIGHT-PATH: `./polkadot/runtime/rococo/constants/src/weights/`
24//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0`
25
26// Executed Command:
27//   ./target/production/polkadot
28//   benchmark
29//   overhead
30//   --chain=rococo-dev
31//   --wasm-execution=compiled
32//   --weight-path=./polkadot/runtime/rococo/constants/src/weights/
33//   --warmup=10
34//   --repeat=100
35//   --header=./polkadot/file_header.txt
36
37use sp_core::parameter_types;
38use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
39
40parameter_types! {
41	/// Time to execute a NO-OP extrinsic, for example `System::remark`.
42	/// Calculated by multiplying the *Average* with `1.0` and adding `0`.
43	///
44	/// Stats nanoseconds:
45	///   Min, Max: 92_961, 94_143
46	///   Average:  93_369
47	///   Median:   93_331
48	///   Std-Dev:  217.39
49	///
50	/// Percentiles nanoseconds:
51	///   99th: 93_848
52	///   95th: 93_691
53	///   75th: 93_514
54	pub const ExtrinsicBaseWeight: Weight =
55		Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(93_369), 0);
56}
57
58#[cfg(test)]
59mod test_weights {
60	use sp_weights::constants;
61
62	/// Checks that the weight exists and is sane.
63	// NOTE: If this test fails but you are sure that the generated values are fine,
64	// you can delete it.
65	#[test]
66	fn sane() {
67		let w = super::ExtrinsicBaseWeight::get();
68
69		// At least 10 µs.
70		assert!(
71			w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
72			"Weight should be at least 10 µs."
73		);
74		// At most 1 ms.
75		assert!(
76			w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
77			"Weight should be at most 1 ms."
78		);
79	}
80}