Add runtime-benchmarks for frame-benchmarking (#10324)

* update frame/benchmarking/src/baseline.rs

* add runtime-benchmarks feature

* add runtime-benchmarks for frame-benchmarking

* update frame-benchmarking/runtime-benchmarks

* trigger GitHub actions
This commit is contained in:
zjb0807
2021-11-30 21:15:52 +08:00
committed by GitHub
parent a01004e143
commit b5ed64684d
35 changed files with 36 additions and 33 deletions
@@ -36,5 +36,5 @@ std = [
'frame-benchmarking/std', 'frame-benchmarking/std',
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
@@ -83,7 +83,7 @@ std = [
"sp-version/std", "sp-version/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system-benchmarking", "frame-system-benchmarking",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
+1 -1
View File
@@ -176,7 +176,7 @@ std = [
"sp-io/std" "sp-io/std"
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks",
+1 -1
View File
@@ -42,7 +42,7 @@ std = [
"frame-benchmarking/std", "frame-benchmarking/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -60,5 +60,5 @@ std = [
"sp-std/std", "sp-std/std",
"log/std", "log/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -56,7 +56,7 @@ std = [
"log/std", "log/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"sp-core", "sp-core",
"sp-io", "sp-io",
"pallet-balances", "pallet-balances",
+1 -1
View File
@@ -39,5 +39,5 @@ std = [
"frame-system/std", "frame-system/std",
"log/std", "log/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1
View File
@@ -44,3 +44,4 @@ std = [
"linregress", "linregress",
"log/std", "log/std",
] ]
runtime-benchmarks = []
@@ -18,6 +18,8 @@
//! A set of benchmarks which can establish a global baseline for all other //! A set of benchmarks which can establish a global baseline for all other
//! benchmarking. //! benchmarking.
#![cfg(feature = "runtime-benchmarks")]
use crate::benchmarks; use crate::benchmarks;
use codec::Encode; use codec::Encode;
use frame_system::Pallet as System; use frame_system::Pallet as System;
+1 -1
View File
@@ -45,7 +45,7 @@ std = [
"log/std", "log/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -41,7 +41,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
+1 -1
View File
@@ -79,7 +79,7 @@ std = [
"libsecp256k1/std", "libsecp256k1/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"libsecp256k1", "libsecp256k1",
"rand", "rand",
"rand_pcg", "rand_pcg",
+1 -1
View File
@@ -44,7 +44,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
@@ -72,7 +72,7 @@ std = [
"log/std", "log/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks", "frame-election-provider-support/runtime-benchmarks",
"rand", "rand",
"strum", "strum",
@@ -47,7 +47,7 @@ std = [
"log/std", "log/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -42,5 +42,5 @@ std = [
"sp-runtime/std", "sp-runtime/std",
"sp-std/std" "sp-std/std"
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -40,7 +40,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -60,5 +60,5 @@ std = [
"pallet-session/std", "pallet-session/std",
"log/std", "log/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -40,7 +40,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -47,5 +47,5 @@ std = [
"frame-system/std", "frame-system/std",
"log/std", "log/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -42,7 +42,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -41,7 +41,7 @@ std = [
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
] ]
+1 -1
View File
@@ -41,7 +41,7 @@ std = [
"frame-benchmarking/std", "frame-benchmarking/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
@@ -46,5 +46,5 @@ std = [
"frame-system/std", "frame-system/std",
"pallet-mmr-primitives/std", "pallet-mmr-primitives/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -39,7 +39,7 @@ std = [
"sp-std/std" "sp-std/std"
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -40,7 +40,7 @@ std = [
"sp-io/std", "sp-io/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -39,7 +39,7 @@ std = [
"log/std", "log/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -68,7 +68,7 @@ std = [
"frame-election-provider-support/std", "frame-election-provider-support/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks", "frame-election-provider-support/runtime-benchmarks",
"rand_chacha", "rand_chacha",
] ]
+1 -1
View File
@@ -45,5 +45,5 @@ std = [
"sp-timestamp/std", "sp-timestamp/std",
"log/std", "log/std",
] ]
runtime-benchmarks = ["frame-benchmarking", "sp-io"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "sp-io"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
+1 -1
View File
@@ -50,7 +50,7 @@ std = [
"pallet-treasury/std", "pallet-treasury/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
@@ -33,7 +33,7 @@ sp-core = { version = "4.0.0-dev", path = "../../primitives/core", default-featu
[features] [features]
default = ["std"] default = ["std"]
runtime-benchmarks = ["frame-benchmarking", "hex-literal"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "hex-literal"]
std = [ std = [
"serde", "serde",
"codec/std", "codec/std",
+1 -1
View File
@@ -47,7 +47,7 @@ std = [
"pallet-balances/std", "pallet-balances/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -39,7 +39,7 @@ std = [
"frame-benchmarking/std", "frame-benchmarking/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -40,7 +40,7 @@ std = [
"sp-std/std", "sp-std/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking", "frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
] ]
+1 -1
View File
@@ -39,5 +39,5 @@ std = [
"frame-support/std", "frame-support/std",
"frame-system/std", "frame-system/std",
] ]
runtime-benchmarks = ["frame-benchmarking"] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]