Skip to content
Snippets Groups Projects
Commit dd1828ea authored by Éloïs's avatar Éloïs
Browse files

feat(weights): use our benchmarks for pallet balance

parent 12ac2190
No related branches found
No related tags found
No related merge requests found
...@@ -862,6 +862,7 @@ dependencies = [ ...@@ -862,6 +862,7 @@ dependencies = [
"log", "log",
"pallet-authority-members", "pallet-authority-members",
"pallet-babe", "pallet-babe",
"pallet-balances",
"pallet-certification", "pallet-certification",
"pallet-duniter-account", "pallet-duniter-account",
"pallet-duniter-wot", "pallet-duniter-wot",
......
...@@ -13,6 +13,7 @@ runtime-benchmarks = [ ...@@ -13,6 +13,7 @@ runtime-benchmarks = [
'frame-system-benchmarking', 'frame-system-benchmarking',
'frame-system/runtime-benchmarks', 'frame-system/runtime-benchmarks',
"pallet-babe/runtime-benchmarks", "pallet-babe/runtime-benchmarks",
'pallet-balances/runtime-benchmarks',
'pallet-certification/runtime-benchmarks', 'pallet-certification/runtime-benchmarks',
'pallet-duniter-wot/runtime-benchmarks', 'pallet-duniter-wot/runtime-benchmarks',
'pallet-identity/runtime-benchmarks', 'pallet-identity/runtime-benchmarks',
...@@ -29,6 +30,7 @@ std = [ ...@@ -29,6 +30,7 @@ std = [
'log/std', 'log/std',
'pallet-authority-members/std', 'pallet-authority-members/std',
'pallet-babe/std', 'pallet-babe/std',
'pallet-balances/std',
'pallet-certification/std', 'pallet-certification/std',
'pallet-duniter-account/std', 'pallet-duniter-account/std',
'pallet-duniter-wot/std', 'pallet-duniter-wot/std',
...@@ -77,6 +79,7 @@ smallvec = "1.6.1" ...@@ -77,6 +79,7 @@ smallvec = "1.6.1"
frame-support = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } frame-support = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
frame-system = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } frame-system = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
pallet-babe = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } pallet-babe = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
pallet-balances = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
pallet-grandpa = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } pallet-grandpa = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
pallet-session = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } pallet-session = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
pallet-treasury = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false } pallet-treasury = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-02', default-features = false }
......
...@@ -159,7 +159,7 @@ macro_rules! pallets_config { ...@@ -159,7 +159,7 @@ macro_rules! pallets_config {
type DustRemoval = Treasury; type DustRemoval = Treasury;
type ExistentialDeposit = ExistentialDeposit; type ExistentialDeposit = ExistentialDeposit;
type AccountStore = Account; type AccountStore = Account;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>; type WeightInfo = common_runtime::weights::pallet_balances::WeightInfo<Runtime>;
} }
pub struct HandleFees; pub struct HandleFees;
......
...@@ -15,4 +15,5 @@ ...@@ -15,4 +15,5 @@
// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>.
pub mod pallet_babe; pub mod pallet_babe;
pub mod pallet_balances;
pub mod pallet_grandpa; pub mod pallet_grandpa;
// Copyright 2021-2022 Axiom-Team
//
// This file is part of Duniter-v2S.
//
// Duniter-v2S is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// Duniter-v2S 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Interpreted, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./duniter
// benchmark
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=interpreted-i-know-what-i-do
// --heap-pages=4096
// --output=.
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
// Storage: Account PendingNewAccounts (r:0 w:1)
fn transfer() -> Weight {
(2_412_993_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
// Storage: Account PendingNewAccounts (r:0 w:1)
fn transfer_keep_alive() -> Weight {
(1_414_318_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(594_104_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(704_715_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: System Account (r:2 w:2)
// Storage: Account PendingNewAccounts (r:0 w:1)
fn force_transfer() -> Weight {
(2_427_122_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: System Account (r:1 w:1)
// Storage: Account PendingNewAccounts (r:0 w:1)
fn transfer_all() -> Weight {
(1_769_185_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(619_549_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment