Fix benchmarks! macro for non dispatchable code (#5100)

* Init allowing non dispatchable closure to be benchmarked.

* Remove example, add it in timestamp

* Fix nits.

* Move test to example.

* Update frame/example/src/lib.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/example/src/lib.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Apply review suggestion: move test to benchmarking crate.

* Update frame/benchmarking/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove unused imports.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com>
This commit is contained in:
Marcio Diaz
2020-03-04 10:13:14 +01:00
committed by GitHub
parent 619f64efe9
commit f39e705523
7 changed files with 352 additions and 130 deletions
+2
View File
@@ -11,6 +11,7 @@ description = "FRAME example pallet"
[dependencies]
serde = { version = "1.0.101", optional = true }
codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false }
frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" }
frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" }
frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" }
pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" }
@@ -27,6 +28,7 @@ std = [
"serde",
"codec/std",
"sp-runtime/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"pallet-balances/std",