Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Benchmarks for elections-phragmen pallet #5845

Merged
merged 39 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d115a3d
Fist benchmark barely working
kianenigma Apr 29, 2020
848d4d9
Merge branch 'master' of github.com:paritytech/substrate into kiz-wei…
kianenigma Apr 29, 2020
831aa27
Debug checkpoint
kianenigma Apr 29, 2020
630b6a7
add rest of benchmarks
kianenigma Apr 30, 2020
55879f6
Add to runtime
kianenigma Apr 30, 2020
f282fbd
Merge branch 'master' of github.com:paritytech/substrate into kiz-wei…
kianenigma Apr 30, 2020
c26ae0b
Fix build
kianenigma Apr 30, 2020
dd56797
Update frame/elections-phragmen/src/benchmarking.rs
kianenigma May 4, 2020
c3629f6
Update frame/elections-phragmen/src/benchmarking.rs
kianenigma May 4, 2020
23b733f
major imp
kianenigma May 4, 2020
3185829
Master.into()
kianenigma May 4, 2020
cc6e072
Make them run on release
kianenigma May 4, 2020
7c5b184
Help finish phragmen benchmarks (#5886)
shawntabrizi May 5, 2020
6201da2
make it work with real run
kianenigma May 5, 2020
c0c4437
relax the numbers a bit
kianenigma May 5, 2020
85984d5
New and improved version
kianenigma May 6, 2020
cdbf7da
Master.into()
kianenigma May 12, 2020
023d1b3
Make elections-phragmen weighable and secure. (#5949)
kianenigma May 12, 2020
f4bd494
Doc update
kianenigma May 12, 2020
944919a
Merge branch 'kiz-weight-election-phragmen' of github.com:paritytech/…
kianenigma May 12, 2020
2db6966
Fix some complexity params
kianenigma May 12, 2020
2cf9758
Once more ready to benchmark
kianenigma May 13, 2020
3ec23c1
ready for bench
kianenigma May 13, 2020
71678cf
final tunes
kianenigma May 13, 2020
8990de6
Update frame/elections-phragmen/src/lib.rs
kianenigma May 13, 2020
2d963b2
Fix fix
kianenigma May 13, 2020
7c83d28
Update frame/elections-phragmen/src/lib.rs
kianenigma May 13, 2020
e28bbe4
Merge branch 'kiz-weight-election-phragmen' of github.com:paritytech/…
kianenigma May 13, 2020
189c331
Update frame/elections-phragmen/src/benchmarking.rs
kianenigma May 14, 2020
2be28b6
Update frame/elections-phragmen/src/benchmarking.rs
kianenigma May 14, 2020
c3bdc88
Update to latest weights
kianenigma May 14, 2020
ace891d
Merge branch 'master' into kiz-weight-election-phragmen
shawntabrizi May 15, 2020
4303584
Some fixes
kianenigma May 15, 2020
f98abc6
Merge branch 'kiz-weight-election-phragmen' of github.com:paritytech/…
kianenigma May 15, 2020
2bda5a8
Merge branch 'master' of github.com:paritytech/substrate into kiz-wei…
kianenigma May 15, 2020
5f74c7a
Fix dual voter read from @thiolliere
kianenigma May 15, 2020
2f096f5
Remove todos
kianenigma May 15, 2020
4ba9e43
review from @shawntabrizi
kianenigma May 15, 2020
d85090c
Fix bench tests.
kianenigma May 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ impl_runtime_apis! {
add_benchmark!(params, batches, b"balances", Balances);
add_benchmark!(params, batches, b"collective", Council);
add_benchmark!(params, batches, b"democracy", Democracy);
add_benchmark!(params, batches, b"elections", Elections);
add_benchmark!(params, batches, b"identity", Identity);
add_benchmark!(params, batches, b"im-online", ImOnline);
add_benchmark!(params, batches, b"offences", OffencesBench::<Runtime>);
Expand Down
4 changes: 4 additions & 0 deletions frame/benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,10 @@ macro_rules! impl_benchmark_tests {
let selected_benchmark = SelectedBenchmark::$name;
let components = <SelectedBenchmark as $crate::BenchmarkingSetup<T>>::components(&selected_benchmark);

assert!(
components.len() != 0,
"You need to add components to your benchmark!",
);
for (_, (name, low, high)) in components.iter().enumerate() {
// Test only the low and high value, assuming values in the middle won't break
for component_value in vec![low, high] {
Expand Down
8 changes: 6 additions & 2 deletions frame/elections-phragmen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ sp-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../p
frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" }
frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" }
sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" }
frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking", optional = true }

[dev-dependencies]
sp-io = { version = "2.0.0-dev", path = "../../primitives/io" }
hex-literal = "0.2.1"
pallet-balances = { version = "2.0.0-dev", path = "../balances" }
pallet-scheduler = { version = "2.0.0-dev", path = "../scheduler" }
sp-core = { version = "2.0.0-dev", path = "../../primitives/core" }
substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" }

Expand All @@ -39,4 +39,8 @@ std = [
"frame-system/std",
"sp-std/std",
]
runtime-benchmarks = ["frame-support/runtime-benchmarks"]
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]
Loading