Benchmark Democracy Pallet (#5257)

* Add origin bounds to benchmark macro.

* Add democracy benchmark.

* Fix tests

* Remove collective from frame/benchmarking, partially use EnsureOrigin.

* Remove collective stuff.

* Make previous benches compile again.

* Remove comments.

* Make prev bench to work again.

* Add remove votes.

* Add new proxy calls.

* Add runtime-benchmarks guard to EnsureOrigin and implementations.

* Refactor.

* Add missing import.

* Remove duplicated import

* Fix features.

* Add some missing features.

* Update frame/collective/Cargo.toml

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/democracy/src/benchmarking.rs

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/democracy/src/benchmarking.rs

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Add referendums to state.

* populate vecs before call

* Update weight docs

* More fixes and weight docs

* More updates

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Marcio Diaz
2020-03-26 11:18:24 +01:00
committed by GitHub
parent a0772117ac
commit 5a48cade1b
17 changed files with 564 additions and 15 deletions
+5 -1
View File
@@ -134,16 +134,20 @@ std = [
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-session-benchmarking",
"pallet-staking/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-session-benchmarking",
"pallet-staking/runtime-benchmarks",
"pallet-society/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
]