Add a block production benchmark (#10104)

* Add a block production benchmark

* Simplify the block production benchmark

* Cleanups; switch execution strategy to WASM

* Switch WASM execution to `Compiled`

* Reduce the setup cost of the benchmark

Creating all of those extrinsics takes up *a lot* of time, up to the point
where the majority of the time is actually spent *outside* of the code
which we want to benchmark here. So let's only do it once.

* Add a variant of the block production benchmark with proof recording
This commit is contained in:
Koute
2021-11-09 22:38:31 +09:00
committed by GitHub
parent 91b6d5970a
commit 59078fcf94
3 changed files with 247 additions and 0 deletions
+7
View File
@@ -116,7 +116,9 @@ sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/commo
sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/babe" }
sc-consensus-epochs = { version = "0.10.0-dev", path = "../../../client/consensus/epochs" }
sc-service-test = { version = "2.0.0", path = "../../../client/service/test" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
sp-tracing = { version = "4.0.0-dev", path = "../../../primitives/tracing" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
futures = "0.3.16"
tempfile = "3.1.0"
assert_cmd = "2.0.2"
@@ -131,6 +133,7 @@ tokio = { version = "1.10", features = ["macros", "time"] }
jsonrpsee-ws-client = { version = "0.3.1", default-features = false, features = ["tokio1"] }
wait-timeout = "0.2"
remote-externalities = { path = "../../../utils/frame/remote-externalities" }
pallet-timestamp = { version = "4.0.0-dev", path = "../../../frame/timestamp" }
[build-dependencies]
structopt = { version = "0.3.8", optional = true }
@@ -166,3 +169,7 @@ try-runtime = ["node-runtime/try-runtime", "try-runtime-cli"]
[[bench]]
name = "transaction_pool"
harness = false
[[bench]]
name = "block_production"
harness = false