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
Merge requests
!156
Substrate pallets benchmark
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Substrate pallets benchmark
bgallois/duniter-v2s:benchmark_substrate_pallets
into
master
Overview
2
Commits
5
Pipelines
30
Changes
25
Merged
Benjamin Gallois
requested to merge
bgallois/duniter-v2s:benchmark_substrate_pallets
into
master
2 years ago
Overview
2
Commits
5
Pipelines
30
Changes
25
Expand
Benchmark Substrate pallets (
#75 (closed)
and
#81 (closed)
)
0
0
Merge request reports
Compare
master
version 14
8c85d94a
1 year ago
version 13
79d7aaca
1 year ago
version 12
efe244ea
1 year ago
version 11
6a92cdf8
1 year ago
version 10
e8f0932f
1 year ago
version 9
88ebbbf5
1 year ago
version 8
3aac161f
1 year ago
version 7
7123d7ab
1 year ago
version 6
6ce67bbb
2 years ago
version 5
61f259c5
2 years ago
version 4
ef98db45
2 years ago
version 3
c65c03e3
2 years ago
version 2
606ef32a
2 years ago
version 1
cd3a23d6
2 years ago
master (base)
and
latest version
latest version
df40129c
5 commits,
1 year ago
version 14
8c85d94a
5 commits,
1 year ago
version 13
79d7aaca
5 commits,
1 year ago
version 12
efe244ea
5 commits,
1 year ago
version 11
6a92cdf8
5 commits,
1 year ago
version 10
e8f0932f
5 commits,
1 year ago
version 9
88ebbbf5
4 commits,
1 year ago
version 8
3aac161f
4 commits,
1 year ago
version 7
7123d7ab
4 commits,
1 year ago
version 6
6ce67bbb
4 commits,
2 years ago
version 5
61f259c5
3 commits,
2 years ago
version 4
ef98db45
2 commits,
2 years ago
version 3
c65c03e3
2 commits,
2 years ago
version 2
606ef32a
1 commit,
2 years ago
version 1
cd3a23d6
1 commit,
2 years ago
25 files
+
1305
−
231
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
25
Search (e.g. *.vue) (Ctrl+P)
pallets/session-benchmarking/src/lib.rs
0 → 100644
+
47
−
0
Options
// Copyright 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/>.
//! Benchmarks for the Session Pallet.
// This is separated into its own crate due to cyclic dependency issues.
#![cfg_attr(not(feature
=
"std"
),
no_std)]
#![cfg(feature
=
"runtime-benchmarks"
)]
use
parity_scale_codec
::
Decode
;
use
sp_std
::{
prelude
::
*
,
vec
};
use
frame_benchmarking
::{
benchmarks
,
whitelisted_caller
};
use
frame_system
::
RawOrigin
;
use
pallet_session
::
*
;
pub
struct
Pallet
<
T
:
Config
>
(
pallet_session
::
Pallet
<
T
>
);
pub
trait
Config
:
pallet_session
::
Config
{}
benchmarks!
{
set_keys
{
let
caller
:
T
::
AccountId
=
whitelisted_caller
();
frame_system
::
Pallet
::
<
T
>
::
inc_providers
(
&
caller
);
let
keys
=
T
::
Keys
::
decode
(
&
mut
sp_runtime
::
traits
::
TrailingZeroInput
::
zeroes
())
.unwrap
();
let
proof
:
Vec
<
u8
>
=
vec!
[
0
,
1
,
2
,
3
];
}:
_
(
RawOrigin
::
Signed
(
caller
),
keys
,
proof
)
purge_keys
{
let
caller
:
T
::
AccountId
=
whitelisted_caller
();
frame_system
::
Pallet
::
<
T
>
::
inc_providers
(
&
caller
);
let
keys
=
T
::
Keys
::
decode
(
&
mut
sp_runtime
::
traits
::
TrailingZeroInput
::
zeroes
())
.unwrap
();
let
proof
:
Vec
<
u8
>
=
vec!
[
0
,
1
,
2
,
3
];
let
_t
=
pallet_session
::
Pallet
::
<
T
>
::
set_keys
(
RawOrigin
::
Signed
(
caller
.clone
())
.into
(),
keys
,
proof
);
}:
_
(
RawOrigin
::
Signed
(
caller
))
}
Loading