Skip to content
Snippets Groups Projects
Unverified Commit 1d5cd029 authored by bgallois's avatar bgallois
Browse files

add pallet distance benchmarks

parent b793b455
No related branches found
No related tags found
1 merge request!187Distance pallet benchmark
...@@ -5770,6 +5770,7 @@ dependencies = [ ...@@ -5770,6 +5770,7 @@ dependencies = [
name = "pallet-distance" name = "pallet-distance"
version = "1.0.0" version = "1.0.0"
dependencies = [ dependencies = [
"frame-benchmarking",
"frame-support", "frame-support",
"frame-system", "frame-system",
"pallet-authority-members", "pallet-authority-members",
......
...@@ -11,9 +11,11 @@ version = '1.0.0' ...@@ -11,9 +11,11 @@ version = '1.0.0'
[features] [features]
default = ['std'] default = ['std']
runtime-benchmarks = ['frame-benchmarking/runtime-benchmarks']
std = [ std = [
'codec/std', 'codec/std',
'frame-support/std', 'frame-support/std',
'frame-benchmarking/std',
'pallet-authority-members/std', 'pallet-authority-members/std',
'pallet-authorship/std', 'pallet-authorship/std',
'pallet-identity/std', 'pallet-identity/std',
...@@ -37,6 +39,12 @@ scale-info = { version = "2.1.1", default-features = false, features = [ ...@@ -37,6 +39,12 @@ scale-info = { version = "2.1.1", default-features = false, features = [
"derive", "derive",
] } ] }
[dependencies.frame-benchmarking]
default-features = false
git = 'https://github.com/duniter/substrate'
optional = true
branch = 'duniter-substrate-v0.9.42'
[dependencies.codec] [dependencies.codec]
default-features = false default-features = false
features = ['derive'] features = ['derive']
......
...@@ -21,10 +21,13 @@ mod traits; ...@@ -21,10 +21,13 @@ mod traits;
mod types; mod types;
mod weights; mod weights;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
pub use pallet::*; pub use pallet::*;
pub use traits::*; pub use traits::*;
pub use types::*; pub use types::*;
// pub use weights::WeightInfo; pub use weights::WeightInfo;
use frame_support::traits::StorageVersion; use frame_support::traits::StorageVersion;
use pallet_authority_members::SessionIndex; use pallet_authority_members::SessionIndex;
......
// Copyright 2021-2023 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/>.
#![allow(clippy::unnecessary_cast)]
use frame_support::weights::Weight;
/// Weight functions needed for pallet_universal_dividend.
pub trait WeightInfo {
fn request_distance_evaluation() -> Weight;
fn update_evaluation() -> Weight;
fn force_update_evaluation() -> Weight;
fn force_set_distance_status() -> Weight;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment