Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
7d3fae88
Unverified
Commit
7d3fae88
authored
1 year ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
add pallet distance benchmarks
parent
fe571d88
No related branches found
No related tags found
No related merge requests found
Pipeline
#33740
failed
1 year ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Cargo.lock
+1
-0
1 addition, 0 deletions
Cargo.lock
pallets/distance/Cargo.toml
+8
-0
8 additions, 0 deletions
pallets/distance/Cargo.toml
pallets/distance/src/lib.rs
+4
-1
4 additions, 1 deletion
pallets/distance/src/lib.rs
pallets/distance/src/weights.rs
+26
-0
26 additions, 0 deletions
pallets/distance/src/weights.rs
with
39 additions
and
1 deletion
Cargo.lock
+
1
−
0
View file @
7d3fae88
...
...
@@ -5844,6 +5844,7 @@ dependencies = [
name = "pallet-distance"
version = "1.0.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"pallet-authority-members",
...
...
This diff is collapsed.
Click to expand it.
pallets/distance/Cargo.toml
+
8
−
0
View file @
7d3fae88
...
...
@@ -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'
]
...
...
This diff is collapsed.
Click to expand it.
pallets/distance/src/lib.rs
+
4
−
1
View file @
7d3fae88
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
pallets/distance/src/weights.rs
+
26
−
0
View file @
7d3fae88
// 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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment