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

add pallet distance benchmarks

parent fe571d88
No related branches found
No related tags found
No related merge requests found
Pipeline #33740 failed
......@@ -5844,6 +5844,7 @@ dependencies = [
name = "pallet-distance"
version = "1.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"pallet-authority-members",
......
......@@ -11,9 +11,11 @@ version = '1.0.0'
[features]
default = ['std']
runtime-benchmarks = ['frame-benchmarking/runtime-benchmarks']
std = [
'codec/std',
'frame-support/std',
'frame-benchmarking/std',
'pallet-authority-members/std',
'pallet-authorship/std',
'pallet-identity/std',
......@@ -37,6 +39,12 @@ scale-info = { version = "2.1.1", default-features = false, features = [
"derive",
] }
[dependencies.frame-benchmarking]
default-features = false
git = 'https://github.com/duniter/substrate'
optional = true
branch = 'duniter-substrate-v0.9.42'
[dependencies.codec]
default-features = false
features = ['derive']
......
......@@ -21,10 +21,13 @@ mod traits;
mod types;
mod weights;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
pub use pallet::*;
pub use traits::*;
pub use types::*;
// pub use weights::WeightInfo;
pub use weights::WeightInfo;
use frame_support::traits::StorageVersion;
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.
Finish editing this message first!
Please register or to comment