-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
273 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
// Polimec Blockchain – https://www.polimec.org/ | ||
// Copyright (C) Polimec 2022. All rights reserved. | ||
|
||
// The Polimec Blockchain is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// The Polimec Blockchain is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// If you feel like getting in touch with us, you can do so at info@polimec.org | ||
|
||
|
||
//! Autogenerated weights for `pallet_funding` | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 | ||
//! DATE: 2024-05-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! WORST CASE MAP SIZE: `1000000` | ||
//! HOSTNAME: `ip-172-31-23-147`, CPU: `AMD EPYC 9R14` | ||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("polimec-local")`, DB CACHE: `1024` | ||
|
||
// Executed Command: | ||
// ./target/production/polimec-node | ||
// benchmark | ||
// pallet | ||
// --chain=polimec-local | ||
// --steps=50 | ||
// --repeat=20 | ||
// --pallet=pallet-funding | ||
// --no-storage-info | ||
// --no-median-slopes | ||
// --no-min-squares | ||
// --extrinsic | ||
// end_auction_closing,start_community_funding | ||
// --wasm-execution=compiled | ||
// --heap-pages=4096 | ||
// --output=pallets/funding/weight-test.rs | ||
// --template=./.maintain/frame-weight-template.hbs | ||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
#![allow(missing_docs)] | ||
|
||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; | ||
use core::marker::PhantomData; | ||
|
||
/// Weight functions needed for `pallet_funding`. | ||
pub trait WeightInfo { | ||
fn end_auction_closing(x: u32, y: u32, z: u32, ) -> Weight; | ||
fn start_community_funding(x: u32, y: u32, ) -> Weight; | ||
} | ||
|
||
/// Weights for `pallet_funding` using the Substrate node and recommended hardware. | ||
pub struct SubstrateWeight<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { | ||
/// Storage: `Funding::ProjectsDetails` (r:1 w:1) | ||
/// Proof: `Funding::ProjectsDetails` (`max_values`: None, `max_size`: Some(397), added: 2872, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsMetadata` (r:1 w:0) | ||
/// Proof: `Funding::ProjectsMetadata` (`max_values`: None, `max_size`: Some(502), added: 2977, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Nonce` (r:1 w:1) | ||
/// Proof: `Funding::Nonce` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) | ||
/// Storage: `Random::RandomMaterial` (r:1 w:0) | ||
/// Proof: `Random::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Bids` (r:513 w:512) | ||
/// Proof: `Funding::Bids` (`max_values`: None, `max_size`: Some(306), added: 2781, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::DidWithWinningBids` (r:512 w:512) | ||
/// Proof: `Funding::DidWithWinningBids` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsToUpdate` (r:100 w:1) | ||
/// Proof: `Funding::ProjectsToUpdate` (`max_values`: None, `max_size`: Some(26), added: 2501, mode: `MaxEncodedLen`) | ||
/// The range of component `x` is `[1, 99]`. | ||
/// The range of component `y` is `[0, 512]`. | ||
/// The range of component `z` is `[0, 512]`. | ||
fn end_auction_closing(x: u32, y: u32, z: u32, ) -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `1146 + x * (28 ±0) + y * (272 ±0)` | ||
// Estimated: `4079 + x * (2501 ±0) + y * (2781 ±0)` | ||
// Minimum execution time: 311_511_000 picoseconds. | ||
Weight::from_parts(18_641_944, 4079) | ||
// Standard Error: 33_447 | ||
.saturating_add(Weight::from_parts(2_156_942, 0).saturating_mul(x.into())) | ||
// Standard Error: 6_394 | ||
.saturating_add(Weight::from_parts(11_317_919, 0).saturating_mul(y.into())) | ||
// Standard Error: 6_394 | ||
.saturating_add(Weight::from_parts(9_036, 0).saturating_mul(z.into())) | ||
.saturating_add(T::DbWeight::get().reads(6_u64)) | ||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) | ||
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(y.into()))) | ||
.saturating_add(T::DbWeight::get().writes(3_u64)) | ||
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(y.into()))) | ||
.saturating_add(Weight::from_parts(0, 2501).saturating_mul(x.into())) | ||
.saturating_add(Weight::from_parts(0, 2781).saturating_mul(y.into())) | ||
} | ||
/// Storage: `Funding::ProjectsDetails` (r:1 w:1) | ||
/// Proof: `Funding::ProjectsDetails` (`max_values`: None, `max_size`: Some(397), added: 2872, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsMetadata` (r:1 w:0) | ||
/// Proof: `Funding::ProjectsMetadata` (`max_values`: None, `max_size`: Some(502), added: 2977, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Nonce` (r:1 w:1) | ||
/// Proof: `Funding::Nonce` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) | ||
/// Storage: `Random::RandomMaterial` (r:1 w:0) | ||
/// Proof: `Random::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Bids` (r:1025 w:1024) | ||
/// Proof: `Funding::Bids` (`max_values`: None, `max_size`: Some(306), added: 2781, mode: `MaxEncodedLen`) | ||
/// Storage: `Oracle::Values` (r:1 w:0) | ||
/// Proof: `Oracle::Values` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsToUpdate` (r:100 w:1) | ||
/// Proof: `Funding::ProjectsToUpdate` (`max_values`: None, `max_size`: Some(26), added: 2501, mode: `MaxEncodedLen`) | ||
/// The range of component `x` is `[1, 99]`. | ||
/// The range of component `y` is `[0, 1024]`. | ||
fn start_community_funding(x: u32, y: u32, ) -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `1417 + x * (28 ±0) + y * (272 ±0)` | ||
// Estimated: `4079 + x * (2501 ±0) + y * (2781 ±0)` | ||
// Minimum execution time: 294_780_000 picoseconds. | ||
Weight::from_parts(22_516_170, 4079) | ||
// Standard Error: 42_593 | ||
.saturating_add(Weight::from_parts(2_409_378, 0).saturating_mul(x.into())) | ||
// Standard Error: 4_073 | ||
.saturating_add(Weight::from_parts(8_029_457, 0).saturating_mul(y.into())) | ||
.saturating_add(T::DbWeight::get().reads(7_u64)) | ||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) | ||
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) | ||
.saturating_add(T::DbWeight::get().writes(3_u64)) | ||
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) | ||
.saturating_add(Weight::from_parts(0, 2501).saturating_mul(x.into())) | ||
.saturating_add(Weight::from_parts(0, 2781).saturating_mul(y.into())) | ||
} | ||
} | ||
|
||
// For backwards compatibility and tests. | ||
impl WeightInfo for () { | ||
/// Storage: `Funding::ProjectsDetails` (r:1 w:1) | ||
/// Proof: `Funding::ProjectsDetails` (`max_values`: None, `max_size`: Some(397), added: 2872, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsMetadata` (r:1 w:0) | ||
/// Proof: `Funding::ProjectsMetadata` (`max_values`: None, `max_size`: Some(502), added: 2977, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Nonce` (r:1 w:1) | ||
/// Proof: `Funding::Nonce` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) | ||
/// Storage: `Random::RandomMaterial` (r:1 w:0) | ||
/// Proof: `Random::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Bids` (r:513 w:512) | ||
/// Proof: `Funding::Bids` (`max_values`: None, `max_size`: Some(306), added: 2781, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::DidWithWinningBids` (r:512 w:512) | ||
/// Proof: `Funding::DidWithWinningBids` (`max_values`: None, `max_size`: Some(95), added: 2570, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsToUpdate` (r:100 w:1) | ||
/// Proof: `Funding::ProjectsToUpdate` (`max_values`: None, `max_size`: Some(26), added: 2501, mode: `MaxEncodedLen`) | ||
/// The range of component `x` is `[1, 99]`. | ||
/// The range of component `y` is `[0, 512]`. | ||
/// The range of component `z` is `[0, 512]`. | ||
fn end_auction_closing(x: u32, y: u32, z: u32, ) -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `1146 + x * (28 ±0) + y * (272 ±0)` | ||
// Estimated: `4079 + x * (2501 ±0) + y * (2781 ±0)` | ||
// Minimum execution time: 311_511_000 picoseconds. | ||
Weight::from_parts(18_641_944, 4079) | ||
// Standard Error: 33_447 | ||
.saturating_add(Weight::from_parts(2_156_942, 0).saturating_mul(x.into())) | ||
// Standard Error: 6_394 | ||
.saturating_add(Weight::from_parts(11_317_919, 0).saturating_mul(y.into())) | ||
// Standard Error: 6_394 | ||
.saturating_add(Weight::from_parts(9_036, 0).saturating_mul(z.into())) | ||
.saturating_add(RocksDbWeight::get().reads(6_u64)) | ||
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) | ||
.saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(y.into()))) | ||
.saturating_add(RocksDbWeight::get().writes(3_u64)) | ||
.saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(y.into()))) | ||
.saturating_add(Weight::from_parts(0, 2501).saturating_mul(x.into())) | ||
.saturating_add(Weight::from_parts(0, 2781).saturating_mul(y.into())) | ||
} | ||
/// Storage: `Funding::ProjectsDetails` (r:1 w:1) | ||
/// Proof: `Funding::ProjectsDetails` (`max_values`: None, `max_size`: Some(397), added: 2872, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsMetadata` (r:1 w:0) | ||
/// Proof: `Funding::ProjectsMetadata` (`max_values`: None, `max_size`: Some(502), added: 2977, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Nonce` (r:1 w:1) | ||
/// Proof: `Funding::Nonce` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) | ||
/// Storage: `Random::RandomMaterial` (r:1 w:0) | ||
/// Proof: `Random::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::Bids` (r:1025 w:1024) | ||
/// Proof: `Funding::Bids` (`max_values`: None, `max_size`: Some(306), added: 2781, mode: `MaxEncodedLen`) | ||
/// Storage: `Oracle::Values` (r:1 w:0) | ||
/// Proof: `Oracle::Values` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) | ||
/// Storage: `Funding::ProjectsToUpdate` (r:100 w:1) | ||
/// Proof: `Funding::ProjectsToUpdate` (`max_values`: None, `max_size`: Some(26), added: 2501, mode: `MaxEncodedLen`) | ||
/// The range of component `x` is `[1, 99]`. | ||
/// The range of component `y` is `[0, 1024]`. | ||
fn start_community_funding(x: u32, y: u32, ) -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `1417 + x * (28 ±0) + y * (272 ±0)` | ||
// Estimated: `4079 + x * (2501 ±0) + y * (2781 ±0)` | ||
// Minimum execution time: 294_780_000 picoseconds. | ||
Weight::from_parts(22_516_170, 4079) | ||
// Standard Error: 42_593 | ||
.saturating_add(Weight::from_parts(2_409_378, 0).saturating_mul(x.into())) | ||
// Standard Error: 4_073 | ||
.saturating_add(Weight::from_parts(8_029_457, 0).saturating_mul(y.into())) | ||
.saturating_add(RocksDbWeight::get().reads(7_u64)) | ||
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) | ||
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(y.into()))) | ||
.saturating_add(RocksDbWeight::get().writes(3_u64)) | ||
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(y.into()))) | ||
.saturating_add(Weight::from_parts(0, 2501).saturating_mul(x.into())) | ||
.saturating_add(Weight::from_parts(0, 2781).saturating_mul(y.into())) | ||
} | ||
} |