Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
f56b4a03
Unverified
Commit
f56b4a03
authored
May 21, 2020
by
Shawn Tabrizi
Committed by
GitHub
May 21, 2020
Browse files
Add System to benchmarks (#1126)
* add system to benchmarks * Update cargo files
parent
395a13e9
Pipeline
#93616
canceled with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
f56b4a03
...
...
@@ -1361,6 +1361,20 @@ dependencies = [
"sp-version",
]
[[package]]
name = "frame-system-benchmarking"
version = "2.0.0-dev"
source = "git+https://github.com/paritytech/substrate#903693105a39f4a88ed99d99a4462616ed059968"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
"sp-core",
"sp-runtime",
"sp-std",
]
[[package]]
name = "frame-system-rpc-runtime-api"
version = "2.0.0-dev"
...
...
@@ -2228,6 +2242,7 @@ dependencies = [
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex-literal",
"libsecp256k1",
...
...
@@ -4296,6 +4311,7 @@ dependencies = [
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex-literal",
"libsecp256k1",
...
...
@@ -8502,6 +8518,7 @@ dependencies = [
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex-literal",
"libsecp256k1",
...
...
runtime/kusama/Cargo.toml
View file @
f56b4a03
...
...
@@ -64,6 +64,7 @@ utility = { package = "pallet-utility", git = "https://github.com/paritytech/sub
vesting
=
{
package
=
"pallet-vesting"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
frame-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
frame-system-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-offences-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-session-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
...
...
@@ -145,6 +146,7 @@ runtime-benchmarks = [
"runtime-common/runtime-benchmarks"
,
"frame-benchmarking"
,
"frame-support/runtime-benchmarks"
,
"frame-system-benchmarking"
,
"system/runtime-benchmarks"
,
"sp-runtime/runtime-benchmarks"
,
"balances/runtime-benchmarks"
,
...
...
runtime/kusama/src/lib.rs
View file @
f56b4a03
...
...
@@ -1081,9 +1081,11 @@ sp_api::impl_runtime_apis! {
// we need these two lines below.
use
pallet_session_benchmarking
::
Module
as
SessionBench
;
use
pallet_offences_benchmarking
::
Module
as
OffencesBench
;
use
frame_system_benchmarking
::
Module
as
SystemBench
;
impl
pallet_session_benchmarking
::
Trait
for
Runtime
{}
impl
pallet_offences_benchmarking
::
Trait
for
Runtime
{}
impl
frame_system_benchmarking
::
Trait
for
Runtime
{}
let
mut
batches
=
Vec
::
<
BenchmarkBatch
>
::
new
();
let
params
=
(
&
pallet
,
&
benchmark
,
&
lowest_range_values
,
&
highest_range_values
,
&
steps
,
repeat
);
...
...
@@ -1098,6 +1100,7 @@ sp_api::impl_runtime_apis! {
add_benchmark!
(
params
,
batches
,
b"offences"
,
OffencesBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"session"
,
SessionBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"staking"
,
Staking
);
add_benchmark!
(
params
,
batches
,
b"system"
,
SystemBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"timestamp"
,
Timestamp
);
add_benchmark!
(
params
,
batches
,
b"treasury"
,
Treasury
);
add_benchmark!
(
params
,
batches
,
b"utility"
,
Utility
);
...
...
runtime/polkadot/Cargo.toml
View file @
f56b4a03
...
...
@@ -61,6 +61,7 @@ sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate
vesting
=
{
package
=
"pallet-vesting"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
frame-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
frame-system-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-offences-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-session-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
...
...
@@ -139,6 +140,7 @@ runtime-benchmarks = [
"runtime-common/runtime-benchmarks"
,
"frame-benchmarking"
,
"frame-support/runtime-benchmarks"
,
"frame-system-benchmarking"
,
"system/runtime-benchmarks"
,
"sp-runtime/runtime-benchmarks"
,
"balances/runtime-benchmarks"
,
...
...
runtime/polkadot/src/lib.rs
View file @
f56b4a03
...
...
@@ -998,9 +998,11 @@ sp_api::impl_runtime_apis! {
// we need these two lines below.
use
pallet_session_benchmarking
::
Module
as
SessionBench
;
use
pallet_offences_benchmarking
::
Module
as
OffencesBench
;
use
frame_system_benchmarking
::
Module
as
SystemBench
;
impl
pallet_session_benchmarking
::
Trait
for
Runtime
{}
impl
pallet_offences_benchmarking
::
Trait
for
Runtime
{}
impl
frame_system_benchmarking
::
Trait
for
Runtime
{}
let
mut
batches
=
Vec
::
<
BenchmarkBatch
>
::
new
();
let
params
=
(
&
pallet
,
&
benchmark
,
&
lowest_range_values
,
&
highest_range_values
,
&
steps
,
repeat
);
...
...
@@ -1014,6 +1016,7 @@ sp_api::impl_runtime_apis! {
add_benchmark!
(
params
,
batches
,
b"offences"
,
OffencesBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"session"
,
SessionBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"staking"
,
Staking
);
add_benchmark!
(
params
,
batches
,
b"system"
,
SystemBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"timestamp"
,
Timestamp
);
add_benchmark!
(
params
,
batches
,
b"treasury"
,
Treasury
);
add_benchmark!
(
params
,
batches
,
b"vesting"
,
Vesting
);
...
...
runtime/westend/Cargo.toml
View file @
f56b4a03
...
...
@@ -64,6 +64,7 @@ utility = { package = "pallet-utility", git = "https://github.com/paritytech/sub
vesting
=
{
package
=
"pallet-vesting"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
frame-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
frame-system-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-offences-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
pallet-session-benchmarking
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
,
optional
=
true
}
...
...
@@ -148,6 +149,7 @@ runtime-benchmarks = [
"runtime-common/runtime-benchmarks"
,
"frame-benchmarking"
,
"frame-support/runtime-benchmarks"
,
"frame-system-benchmarking"
,
"system/runtime-benchmarks"
,
"sp-runtime/runtime-benchmarks"
,
"balances/runtime-benchmarks"
,
...
...
runtime/westend/src/lib.rs
View file @
f56b4a03
...
...
@@ -877,9 +877,11 @@ sp_api::impl_runtime_apis! {
// we need these two lines below.
use
pallet_session_benchmarking
::
Module
as
SessionBench
;
use
pallet_offences_benchmarking
::
Module
as
OffencesBench
;
use
frame_system_benchmarking
::
Module
as
SystemBench
;
impl
pallet_session_benchmarking
::
Trait
for
Runtime
{}
impl
pallet_offences_benchmarking
::
Trait
for
Runtime
{}
impl
frame_system_benchmarking
::
Trait
for
Runtime
{}
let
mut
batches
=
Vec
::
<
BenchmarkBatch
>
::
new
();
let
params
=
(
&
pallet
,
&
benchmark
,
&
lowest_range_values
,
&
highest_range_values
,
&
steps
,
repeat
);
...
...
@@ -890,6 +892,7 @@ sp_api::impl_runtime_apis! {
add_benchmark!
(
params
,
batches
,
b"offences"
,
OffencesBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"session"
,
SessionBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"staking"
,
Staking
);
add_benchmark!
(
params
,
batches
,
b"system"
,
SystemBench
::
<
Runtime
>
);
add_benchmark!
(
params
,
batches
,
b"timestamp"
,
Timestamp
);
add_benchmark!
(
params
,
batches
,
b"utility"
,
Utility
);
add_benchmark!
(
params
,
batches
,
b"vesting"
,
Vesting
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment