frame_election_provider_support/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//! Autogenerated weights for pallet_election_provider_support_benchmarking
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2022-04-23, STEPS: `1`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
23
24// Executed Command:
25// target/release/substrate
26// benchmark
27// pallet
28// --chain=dev
29// --steps=1
30// --repeat=1
31// --pallet=pallet_election_provider_support_benchmarking
32// --extrinsic=*
33// --execution=wasm
34// --wasm-execution=compiled
35// --heap-pages=4096
36// --output=frame/election-provider-support/src/weights.rs
37// --template=./.maintain/frame-weight-template.hbs
38
39#![cfg_attr(rustfmt, rustfmt_skip)]
40#![allow(unused_parens)]
41#![allow(unused_imports)]
42
43use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
44use core::marker::PhantomData;
45
46/// Weight functions needed for pallet_election_provider_support_benchmarking.
47pub trait WeightInfo {
48 fn phragmen(v: u32, t: u32, d: u32, ) -> Weight;
49 fn phragmms(v: u32, t: u32, d: u32, ) -> Weight;
50}
51
52/// Weights for pallet_election_provider_support_benchmarking using the Substrate node and recommended hardware.
53pub struct SubstrateWeight<T>(PhantomData<T>);
54impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
55 fn phragmen(v: u32, t: u32, d: u32, ) -> Weight {
56 Weight::from_parts(0 as u64, 0)
57 // Standard Error: 667_000
58 .saturating_add(Weight::from_parts(32_973_000 as u64, 0).saturating_mul(v as u64))
59 // Standard Error: 1_334_000
60 .saturating_add(Weight::from_parts(1_334_000 as u64, 0).saturating_mul(t as u64))
61 // Standard Error: 60_644_000
62 .saturating_add(Weight::from_parts(2_636_364_000 as u64, 0).saturating_mul(d as u64))
63 }
64 fn phragmms(v: u32, t: u32, d: u32, ) -> Weight {
65 Weight::from_parts(0 as u64, 0)
66 // Standard Error: 73_000
67 .saturating_add(Weight::from_parts(21_073_000 as u64, 0).saturating_mul(v as u64))
68 // Standard Error: 146_000
69 .saturating_add(Weight::from_parts(65_000 as u64, 0).saturating_mul(t as u64))
70 // Standard Error: 6_649_000
71 .saturating_add(Weight::from_parts(1_711_424_000 as u64, 0).saturating_mul(d as u64))
72 }
73}
74
75// For backwards compatibility and tests
76impl WeightInfo for () {
77 fn phragmen(v: u32, t: u32, d: u32, ) -> Weight {
78 Weight::from_parts(0 as u64, 0)
79 // Standard Error: 667_000
80 .saturating_add(Weight::from_parts(32_973_000 as u64, 0).saturating_mul(v as u64))
81 // Standard Error: 1_334_000
82 .saturating_add(Weight::from_parts(1_334_000 as u64, 0).saturating_mul(t as u64))
83 // Standard Error: 60_644_000
84 .saturating_add(Weight::from_parts(2_636_364_000 as u64, 0).saturating_mul(d as u64))
85 }
86 fn phragmms(v: u32, t: u32, d: u32, ) -> Weight {
87 Weight::from_parts(0 as u64, 0)
88 // Standard Error: 73_000
89 .saturating_add(Weight::from_parts(21_073_000 as u64, 0).saturating_mul(v as u64))
90 // Standard Error: 146_000
91 .saturating_add(Weight::from_parts(65_000 as u64, 0).saturating_mul(t as u64))
92 // Standard Error: 6_649_000
93 .saturating_add(Weight::from_parts(1_711_424_000 as u64, 0).saturating_mul(d as u64))
94 }
95}