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

Fix elections-phragmen and proxy issue#7040

Merged
98 commits merged intomasterfrom
kiz-fix-proxy-election-drain
Jan 20, 2021
Merged

Fix elections-phragmen and proxy issue#7040
98 commits merged intomasterfrom
kiz-fix-proxy-election-drain

Conversation

@kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Sep 7, 2020

Closes #7030
polkadot companion: paritytech/polkadot#1719

📕 Detailed description of the PR is here

@kianenigma kianenigma added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Sep 7, 2020
@kianenigma
Copy link
Contributor Author

Weight update report. Note that we only care about DB stuff and variables. These are native numbers on my machine.

vote

  • before: #[ weight = 50 * WEIGHT_PER_MICROS + T::DbWeight::get().reads_writes(4, 2)]
  • now:
(131493000 as Weight)
			.saturating_add(DbWeight::get().reads(5 as Weight))
			.saturating_add(DbWeight::get().writes(2 as Weight))
  • comments: set_lock is both read and write of locks, and it was mis-counted before. Also before, we always submitted MAX_VOTES, now we have a variable v, so just more accurate.

remove_voter

  • before: #[weight = 35 * WEIGHT_PER_MICROS + T::DbWeight::get().reads_writes(1, 2)]
  • now:
(90000000 as Weight)
			.saturating_add(DbWeight::get().reads(2 as Weight))
			.saturating_add(DbWeight::get().writes(2 as Weight))
  • comments: set_lock is both read and write of locks, and it was mis-counted before.

report_defunct_voter_incorrect

  • before:
Weight::from(defunct.candidate_count).saturating_mul(2 * WEIGHT_PER_MICROS)
			.saturating_add(Weight::from(defunct.vote_count).saturating_mul(19 * WEIGHT_PER_MICROS))
			.saturating_add(T::DbWeight::get().reads_writes(6, 3))
  • now:
(0 as Weight)
			.saturating_add((1664000 as Weight).saturating_mul(c as Weight))
			.saturating_add((42696000 as Weight).saturating_mul(v as Weight))
			.saturating_add(DbWeight::get().reads(4 as Weight))
  • comments: The changes are expected. An invalid report is now a no-op. See the new refund scheme.

report_defunct_voter_incorrect

  • before:
Weight::from(defunct.candidate_count).saturating_mul(2 * WEIGHT_PER_MICROS)
			.saturating_add(Weight::from(defunct.vote_count).saturating_mul(19 * WEIGHT_PER_MICROS))
			.saturating_add(T::DbWeight::get().reads_writes(6, 3))
  • now:
(0 as Weight)
			.saturating_add((1613000 as Weight).saturating_mul(c as Weight))
			.saturating_add((40652000 as Weight).saturating_mul(v as Weight))
			.saturating_add(DbWeight::get().reads(6 as Weight))
			.saturating_add(DbWeight::get().writes(3 as Weight))
  • comments: Excellent.

submit_candidacy

  • before:
#[weight =
	(35 * WEIGHT_PER_MICROS)
	.saturating_add(Weight::from(*candidate_count).saturating_mul(375 * WEIGHT_PER_NANOS))
	.saturating_add(T::DbWeight::get().reads_writes(4, 1))
]
  • now:
(169289000 as Weight)
			.saturating_add((351000 as Weight).saturating_mul(c as Weight))
			.saturating_add(DbWeight::get().reads(3 as Weight))
			.saturating_add(DbWeight::get().writes(1 as Weight))
  • comments: Previous read count was wrong because we count candidates.decode_len() and candidates twice.

renounce_candidacy

  • before:
#[weight =  match *renouncing {
	Renouncing::Candidate(count) => {
		(18 * WEIGHT_PER_MICROS)
		.saturating_add(Weight::from(count).saturating_mul(235 * WEIGHT_PER_NANOS))
		.saturating_add(T::DbWeight::get().reads_writes(1, 1))
	},
	Renouncing::Member => {
		46 * WEIGHT_PER_MICROS +
		T::DbWeight::get().reads_writes(2, 2)
	},
	Renouncing::RunnerUp => {
		46 * WEIGHT_PER_MICROS +
		T::DbWeight::get().reads_writes(1, 1)
	}
}]
  • now:
// candidate
(106589000 as Weight)
			.saturating_add((216000 as Weight).saturating_mul(c as Weight))
			.saturating_add(DbWeight::get().reads(1 as Weight))
			.saturating_add(DbWeight::get().writes(1 as Weight))
// member 
(190000000 as Weight)
			.saturating_add(DbWeight::get().reads(3 as Weight))
			.saturating_add(DbWeight::get().writes(4 as Weight))
// runners-up
(56000000 as Weight)
			.saturating_add(DbWeight::get().reads(1 as Weight))
			.saturating_add(DbWeight::get().writes(1 as Weight))

  • comments: previous r/w for member renounce was wrong, because we forgot that we also call into T::ChangeMambers which alters some state in the council module.

remove_member_without_replacement

  • before:
T::MaximumBlockWeight::get()
  • comments: Nothing else to do. Stays the same for now.

remove_member_with_replacement

  • before:
50 * WEIGHT_PER_MICROS + T::DbWeight::get().reads_writes(3, 2)
  • now:
(111000000 as Weight)
			.saturating_add(DbWeight::get().reads(4 as Weight))
			.saturating_add(DbWeight::get().writes(5 as Weight))
  • comments: Similarly, calls into T::ChangeMember were ignored before.

remove_member_wrong_refund

  • before:
6 * WEIGHT_PER_MICROS + T::DbWeight::get().reads_writes(1, 0)
  • now:
(19000000 as Weight)
			.saturating_add(DbWeight::get().reads(1 as Weight))
  • comments: All good.

@kianenigma
Copy link
Contributor Author

Okay -- weights also re-done and pushed.

@gavofyork gavofyork added D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. A8-mergeoncegreen and removed A0-please_review Pull request needs code review. A7-needspolkadotpr labels Sep 14, 2020
@gavofyork
Copy link
Member

@kianenigma how about that polkadot PR?

@gavofyork gavofyork added the U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. label Sep 14, 2020
@kianenigma
Copy link
Contributor Author

This is changing the amount of deposit needed for each vote. Should we write a migration code and update the deposit of all previous voters as well? I guess yes.

…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_elections_phragmen --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/elections-phragmen/src/weights.rs --template=./.maintain/frame-weight-template.hbs
@kianenigma kianenigma added D0-transaction-version D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. D2-breaksapi labels Dec 21, 2020
@kianenigma
Copy link
Contributor Author

This is queued for Runtime release 28 -- 27 is already drafted and does not contain this and will be launched next year. So Icing this in the meantime.

@kianenigma kianenigma added A1-onice and removed A0-please_review Pull request needs code review. labels Dec 21, 2020
@kianenigma
Copy link
Contributor Author

/benchmark runtime pallet pallet_elections_phragmen

@parity-benchapp
Copy link

parity-benchapp bot commented Jan 20, 2021

Finished benchmark for branch: kiz-fix-proxy-election-drain

Benchmark: Benchmark Runtime Pallet

cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_elections_phragmen --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/elections-phragmen/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results

Pallet: "pallet_elections_phragmen", Extrinsic: "vote_equal", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 45.19
+ v 0.4
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v mean µs sigma µs %
1 44.86 0.141 0.3%
2 45.79 0.054 0.1%
3 46.27 0.114 0.2%
4 46.66 0.135 0.2%
5 47.19 0.159 0.3%
6 47.93 0.051 0.1%
7 48.31 0.13 0.2%
8 48.85 0.106 0.2%
9 49.23 0.096 0.1%
10 49.36 0.103 0.2%
11 49.71 0.271 0.5%
12 49.94 0.123 0.2%
13 49.99 0.076 0.1%
14 50.37 0.143 0.2%
15 50.62 0.173 0.3%
16 51.67 0.185 0.3%

Quality and confidence:
param error
v 0.006

Model:
Time ~= 45.15
+ v 0.399
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Pallet: "pallet_elections_phragmen", Extrinsic: "vote_more", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 69.9
+ v 0.421
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v mean µs sigma µs %
2 70.37 0.122 0.1%
3 71 0.181 0.2%
4 71.77 0.131 0.1%
5 72.14 0.101 0.1%
6 72.47 0.165 0.2%
7 72.73 0.072 0.0%
8 73.86 0.134 0.1%
9 73.9 0.122 0.1%
10 74.62 0.19 0.2%
11 74.13 0.141 0.1%
12 75.13 0.238 0.3%
13 75.01 0.257 0.3%
14 75.42 0.108 0.1%
15 76.22 0.186 0.2%
16 78.02 2.425 3.1%

Quality and confidence:
param error
v 0.014

Model:
Time ~= 69.73
+ v 0.45
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Pallet: "pallet_elections_phragmen", Extrinsic: "vote_less", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 72.35
+ v 0.372
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v mean µs sigma µs %
2 79.17 3.364 4.2%
3 75.35 2.639 3.5%
4 71.49 0.136 0.1%
5 73.15 0.618 0.8%
6 74.53 0.081 0.1%
7 75.35 0.088 0.1%
8 75.1 0.135 0.1%
9 76.1 0.247 0.3%
10 76.2 0.191 0.2%
11 76.69 0.133 0.1%
12 76.27 0.594 0.7%
13 76.63 0.119 0.1%
14 77.29 0.261 0.3%
15 78.28 0.309 0.3%
16 78.32 0.266 0.3%

Quality and confidence:
param error
v 0.038

Model:
Time ~= 73.95
+ v 0.227
µs

Reads = 5 + (0 * v)
Writes = 2 + (0 * v)
Pallet: "pallet_elections_phragmen", Extrinsic: "remove_voter", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 68.39
µs

Reads = 2
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 68.39
µs

Reads = 2
Writes = 2
Pallet: "pallet_elections_phragmen", Extrinsic: "submit_candidacy", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 59.31
+ c 0.399
µs

Reads = 3 + (0 * c)
Writes = 1 + (0 * c)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
1 62.77 0.51 0.8%
4 61.39 1.943 3.1%
7 64.33 0.729 1.1%
10 65.61 0.475 0.7%
13 65.58 1.128 1.7%
16 67.46 0.405 0.6%
19 65.18 0.233 0.3%
22 68.72 0.44 0.6%
25 69.48 0.699 1.0%
28 73.35 1.446 1.9%
31 72.75 1.52 2.0%
34 73.45 1.321 1.7%
37 75.07 1.514 2.0%
40 75.37 1.153 1.5%
43 79.23 2.059 2.5%
46 77.74 1.734 2.2%
49 78.71 0.893 1.1%
52 80.41 1.93 2.4%
55 83.26 2.192 2.6%
58 84 2.218 2.6%
61 84.18 1.837 2.1%
64 83.77 0.307 0.3%
67 85.29 0.261 0.3%
70 86.48 0.258 0.2%
73 87.66 0.146 0.1%
76 88.97 0.355 0.3%
79 90.35 0.454 0.5%
82 92.16 1.479 1.6%
85 93.03 1.51 1.6%
88 99.2 0.42 0.4%
91 99.98 1.558 1.5%
94 100 2.406 2.4%
97 100.6 3.036 3.0%
100 97.95 0.433 0.4%
103 101.3 2.614 2.5%
106 105.4 2.291 2.1%
109 105.2 2.543 2.4%
112 105.8 2.949 2.7%
115 105.3 3.011 2.8%
118 104.8 0.176 0.1%
121 105.7 0.272 0.2%
124 107.1 0.903 0.8%
127 107.7 0.335 0.3%
130 109.9 2.065 1.8%
133 110.3 0.718 0.6%
136 112.5 1.961 1.7%
139 116.5 3.523 3.0%
142 119.6 2.537 2.1%
145 110.9 0.435 0.3%
148 113.8 1.86 1.6%
151 124 4.641 3.7%
154 121.2 5.267 4.3%
157 120.5 5.132 4.2%
160 121.7 3.864 3.1%
163 126.1 4.822 3.8%
166 130.6 1.653 1.2%
169 132.2 2.386 1.8%
172 133.1 3.284 2.4%
175 128.1 5.685 4.4%
178 136.3 0.584 0.4%
181 137.7 0.264 0.1%
184 137.4 3.343 2.4%
187 140.2 0.371 0.2%
190 136.8 3.785 2.7%
193 142.2 0.505 0.3%
196 144.5 0.314 0.2%
199 145.3 0.409 0.2%

Quality and confidence:
param error
c 0.002

Model:
Time ~= 59.29
+ c 0.412
µs

Reads = 3 + (0 * c)
Writes = 1 + (0 * c)
Pallet: "pallet_elections_phragmen", Extrinsic: "renounce_candidacy_candidate", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 54.77
+ c 0.225
µs

Reads = 1 + (0 * c)
Writes = 1 + (0 * c)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c mean µs sigma µs %
1 52.76 0.108 0.2%
4 53.98 0.156 0.2%
7 54.64 0.096 0.1%
10 56.2 0.117 0.2%
13 56.45 0.125 0.2%
16 57.12 0.188 0.3%
19 58.13 0.185 0.3%
22 59.4 0.165 0.2%
25 59.87 0.178 0.2%
28 60.79 0.132 0.2%
31 61.58 0.242 0.3%
34 61.61 0.221 0.3%
37 63.23 0.081 0.1%
40 64.11 0.122 0.1%
43 64.94 0.127 0.1%
46 65.36 0.125 0.1%
49 66.05 0.19 0.2%
52 66.91 0.135 0.2%
55 67.74 0.174 0.2%
58 68.21 0.198 0.2%
61 68.89 0.145 0.2%
64 69.52 0.108 0.1%
67 70.69 0.147 0.2%
70 71.16 0.207 0.2%
73 71.75 0.124 0.1%
76 72.17 0.176 0.2%
79 73.05 0.163 0.2%
82 73.82 0.26 0.3%
85 73.97 0.25 0.3%
88 74.66 0.082 0.1%
91 75.75 0.213 0.2%
94 76.32 0.345 0.4%
97 76.92 0.291 0.3%
100 77.78 0.12 0.1%
103 78.35 0.219 0.2%
106 79.27 0.462 0.5%
109 79.43 0.183 0.2%
112 80.53 0.352 0.4%
115 80.72 0.314 0.3%
118 80.73 2.102 2.6%
121 82.58 0.27 0.3%
124 78.78 3.316 4.2%
127 78.53 2.731 3.4%
130 78.58 2.051 2.6%
133 82.65 3.2 3.8%
136 78.7 0.348 0.4%
139 79.61 1.669 2.0%
142 82.41 3.287 3.9%
145 75.42 0.657 0.8%
148 76.34 0.262 0.3%
151 81.03 5.328 6.5%
154 77.59 0.928 1.1%
157 80.84 2.069 2.5%
160 86.02 3.49 4.0%
163 89.36 2.564 2.8%
166 91.93 0.589 0.6%
169 92.97 0.702 0.7%
172 93.16 0.808 0.8%
175 94.87 0.545 0.5%
178 91.64 3.978 4.3%
181 93.23 3.912 4.1%
184 93.5 4.363 4.6%
187 98.06 0.87 0.8%
190 94.74 4.002 4.2%
193 98.83 0.386 0.3%
196 99.03 0.405 0.4%
199 100.8 0.336 0.3%

Quality and confidence:
param error
c 0.002

Model:
Time ~= 55.02
+ c 0.207
µs

Reads = 1 + (0 * c)
Writes = 1 + (0 * c)
Pallet: "pallet_elections_phragmen", Extrinsic: "renounce_candidacy_members", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 77.84
µs

Reads = 4
Writes = 4
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 77.84
µs

Reads = 4
Writes = 4
Pallet: "pallet_elections_phragmen", Extrinsic: "renounce_candidacy_runners_up", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 54.55
µs

Reads = 1
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 54.55
µs

Reads = 1
Writes = 1
Pallet: "pallet_elections_phragmen", Extrinsic: "remove_member_with_replacement", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 84.31
µs

Reads = 5
Writes = 5
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 84.31
µs

Reads = 5
Writes = 5
Pallet: "pallet_elections_phragmen", Extrinsic: "remove_member_wrong_refund", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 7.677
µs

Reads = 1
Writes = 0
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 7.677
µs

Reads = 1
Writes = 0
Pallet: "pallet_elections_phragmen", Extrinsic: "clean_defunct_voters", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ v 114.3
+ d 0.496
µs

Reads = 4 + (3 * v) + (0 * d)
Writes = 0 + (3 * v) + (0 * d)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
v d mean µs sigma µs %
250 250 28030 75.13 0.2%
255 250 28690 43.54 0.1%
260 250 29130 35.33 0.1%
265 250 29700 13.28 0.0%
270 250 30330 42.66 0.1%
275 250 30980 41.17 0.1%
280 250 31450 37.38 0.1%
285 250 31910 28.21 0.0%
290 250 32550 31.15 0.0%
295 250 33200 51.66 0.1%
300 250 33750 38.26 0.1%
305 250 34400 27.81 0.0%
310 250 34950 74.87 0.2%
315 250 35490 36.58 0.1%
320 250 36120 94.93 0.2%
325 250 36610 44.88 0.1%
330 250 37190 60.39 0.1%
335 250 37850 30.37 0.0%
340 250 38330 47.78 0.1%
345 250 38910 69.13 0.1%
350 250 39470 50.07 0.1%
355 250 39880 39.41 0.0%
360 250 40570 51.71 0.1%
365 250 41210 22 0.0%
370 250 41820 30.86 0.0%
375 250 42350 73.43 0.1%
380 250 42830 23.9 0.0%
385 250 43480 48.81 0.1%
390 250 44150 51.11 0.1%
395 250 44690 65.69 0.1%
400 250 45180 23.21 0.0%
405 250 45820 41.84 0.0%
410 250 46370 49.82 0.1%
415 250 46800 28.76 0.0%
420 250 47360 68.81 0.1%
425 250 48120 35.76 0.0%
430 250 48660 57.05 0.1%
435 250 49160 67.52 0.1%
440 250 49720 30.04 0.0%
445 250 50270 56.95 0.1%
450 250 51090 62.61 0.1%
455 250 51530 65.28 0.1%
460 250 52070 59.41 0.1%
465 250 52610 47.57 0.0%
470 250 53190 73.89 0.1%
475 250 53860 63.87 0.1%
480 250 54340 54.27 0.0%
485 250 54690 49.34 0.0%
490 250 55210 81.35 0.1%
495 250 56140 63.9 0.1%
500 1 56710 76.73 0.1%
500 5 56870 101 0.1%
500 9 56720 55.18 0.0%
500 13 56690 73.75 0.1%
500 17 56710 53.2 0.0%
500 21 56650 52.76 0.0%
500 25 56780 65.96 0.1%
500 29 56790 122.5 0.2%
500 33 56820 71.22 0.1%
500 37 56640 58.35 0.1%
500 41 56660 48.41 0.0%
500 45 56600 50.99 0.0%
500 49 56560 32.07 0.0%
500 53 56700 62.3 0.1%
500 57 56610 70.34 0.1%
500 61 56650 40.17 0.0%
500 65 56630 44.31 0.0%
500 69 56740 80.9 0.1%
500 73 56640 81.01 0.1%
500 77 56670 43.66 0.0%
500 81 56800 64.75 0.1%
500 85 56750 63.4 0.1%
500 89 56920 58.88 0.1%
500 93 56660 80.71 0.1%
500 97 56620 70.75 0.1%
500 101 56590 29.67 0.0%
500 105 56620 52.64 0.0%
500 109 56690 65.75 0.1%
500 113 56730 52.12 0.0%
500 117 56770 99.39 0.1%
500 121 56650 56.43 0.0%
500 125 56670 70.72 0.1%
500 129 56700 69.96 0.1%
500 133 56640 73 0.1%
500 137 56760 67.96 0.1%
500 141 56780 63.34 0.1%
500 145 56720 60.28 0.1%
500 149 56600 60.49 0.1%
500 153 56600 82.35 0.1%
500 157 56650 39.39 0.0%
500 161 56600 62.33 0.1%
500 165 56560 54.02 0.0%
500 169 56790 44.33 0.0%
500 173 56660 58.19 0.1%
500 177 56630 138.6 0.2%
500 181 56620 65.62 0.1%
500 185 56670 102.8 0.1%
500 189 56820 72.23 0.1%
500 193 56680 51.13 0.0%
500 197 56660 73.24 0.1%
500 201 56810 61.39 0.1%
500 205 56750 95.34 0.1%
500 209 56640 76.38 0.1%
500 213 56780 63.48 0.1%
500 217 56830 80.76 0.1%
500 221 56760 70.07 0.1%
500 225 56750 61.39 0.1%
500 229 56660 72.63 0.1%
500 233 56930 97.56 0.1%
500 237 56900 59.79 0.1%
500 241 57140 56.58 0.0%
500 245 56920 73.6 0.1%
500 249 56860 54.33 0.0%
500 250 56800 70.21 0.1%

Quality and confidence:
param error
v 0.055
d 0.053

Model:
Time ~= 0
+ v 114.8
+ d 0.049
µs

Reads = 4 + (3 * v) + (0 * d)
Writes = 0 + (3 * v) + (0 * d)
Pallet: "pallet_elections_phragmen", Extrinsic: "election_phragmen", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ c 21.85
+ v 62.51
+ e 3.472
µs

Reads = 0 + (2 * c) + (1 * v) + (0 * e)
Writes = 0 + (1 * c) + (0 * v) + (0 * e)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
c v e mean µs sigma µs %
1 500 8000 6108 28.14 0.4%
4 500 8000 8810 47.76 0.5%
7 500 8000 12180 26.12 0.2%
10 500 8000 16560 32.41 0.1%
13 500 8000 21480 30.05 0.1%
16 500 8000 27190 30.7 0.1%
19 500 8000 29720 30.22 0.1%
22 500 8000 32000 27.9 0.0%
25 500 8000 33380 36.89 0.1%
28 500 8000 34330 46.23 0.1%
31 500 8000 34540 34.76 0.1%
34 500 8000 36020 43.2 0.1%
37 500 8000 37560 28.88 0.0%
40 500 8000 37630 37.52 0.0%
43 500 8000 37760 29.3 0.0%
46 500 8000 36230 29.89 0.0%
49 500 8000 36860 30.32 0.0%
52 500 8000 39190 21.84 0.0%
55 500 8000 36920 31.2 0.0%
58 500 8000 39270 24.14 0.0%
61 500 8000 38180 41.95 0.1%
64 500 8000 37780 21.51 0.0%
67 500 8000 40160 45.66 0.1%
70 500 8000 37620 15.22 0.0%
73 500 8000 37970 33.38 0.0%
76 500 8000 39690 77.88 0.1%
79 500 8000 40000 33.66 0.0%
82 500 8000 37610 32.99 0.0%
85 500 8000 38050 39.29 0.1%
88 500 8000 40150 36.43 0.0%
91 500 8000 39110 43.76 0.1%
94 500 8000 39660 44.15 0.1%
97 500 8000 38880 36.2 0.0%
100 500 8000 37840 33.98 0.0%
103 500 8000 38980 48.72 0.1%
106 500 8000 39670 44.99 0.1%
109 500 8000 39900 58.38 0.1%
112 500 8000 39880 38.43 0.0%
115 500 8000 39540 36.44 0.0%
118 500 8000 40080 32.05 0.0%
121 500 8000 38810 48.6 0.1%
124 500 8000 37570 32.76 0.0%
127 500 8000 37770 35.94 0.0%
130 500 8000 39190 32.87 0.0%
133 500 8000 39480 42.3 0.1%
136 500 8000 39480 42.96 0.1%
139 500 8000 39990 39.16 0.0%
142 500 8000 39350 53.91 0.1%
145 500 8000 39550 33.35 0.0%
148 500 8000 39740 35.94 0.0%
151 500 8000 39540 30.65 0.0%
154 500 8000 39400 43.76 0.1%
157 500 8000 39600 69.04 0.1%
160 500 8000 39200 40.72 0.1%
163 500 8000 37920 21.9 0.0%
166 500 8000 37330 49.65 0.1%
169 500 8000 37470 52.47 0.1%
172 500 8000 38280 27.67 0.0%
175 500 8000 38620 48.25 0.1%
178 500 8000 38540 32.32 0.0%
181 500 8000 38740 40.42 0.1%
184 500 8000 38920 27.67 0.0%
187 500 8000 38700 53.58 0.1%
190 500 8000 38670 23.75 0.0%
193 500 8000 38820 94.64 0.2%
196 500 8000 38870 48.47 0.1%
199 500 8000 39150 35.77 0.0%
200 1 8000 6753 12.51 0.1%
200 10 8000 7332 17.23 0.2%
200 19 8000 8061 16.88 0.2%
200 28 8000 8834 15.59 0.1%
200 37 8000 9720 72.57 0.7%
200 46 8000 10210 14.4 0.1%
200 55 8000 10860 12.74 0.1%
200 64 8000 11520 15.81 0.1%
200 73 8000 12160 21.36 0.1%
200 82 8000 12650 27.38 0.2%
200 91 8000 13330 13.64 0.1%
200 100 8000 13810 13.27 0.0%
200 109 8000 14420 25.29 0.1%
200 118 8000 14860 15.38 0.1%
200 127 8000 15380 10.01 0.0%
200 136 8000 15910 19.98 0.1%
200 145 8000 16460 15.68 0.0%
200 154 8000 17040 28.1 0.1%
200 163 8000 17500 15.18 0.0%
200 172 8000 17890 18.45 0.1%
200 181 8000 18370 24.11 0.1%
200 190 8000 18690 12.93 0.0%
200 199 8000 19050 15.38 0.0%
200 208 8000 19880 44.95 0.2%
200 217 8000 20800 40.09 0.1%
200 226 8000 21310 24.1 0.1%
200 235 8000 22180 28.21 0.1%
200 244 8000 22500 22.15 0.0%
200 253 8000 23010 27.26 0.1%
200 262 8000 23670 87.24 0.3%
200 271 8000 23990 34.1 0.1%
200 280 8000 24390 33.92 0.1%
200 289 8000 25080 38.86 0.1%
200 298 8000 25920 19.21 0.0%
200 307 8000 26390 39.81 0.1%
200 316 8000 26990 22.11 0.0%
200 325 8000 27480 38.69 0.1%
200 334 8000 27750 13.27 0.0%
200 343 8000 28470 18.48 0.0%
200 352 8000 28910 31.27 0.1%
200 361 8000 29450 24.13 0.0%
200 370 8000 30100 28.52 0.0%
200 379 8000 30530 45.05 0.1%
200 388 8000 30830 24.93 0.0%
200 397 8000 31010 34.71 0.1%
200 406 8000 31620 33.33 0.1%
200 415 8000 32720 39.38 0.1%
200 424 8000 34130 26.26 0.0%
200 433 8000 34710 48.96 0.1%
200 442 8000 35070 37.53 0.1%
200 451 8000 35830 44.74 0.1%
200 460 8000 36320 39.98 0.1%
200 469 8000 36930 54.06 0.1%
200 478 8000 37440 38.88 0.1%
200 487 8000 38060 23.37 0.0%
200 496 8000 38520 36.54 0.0%
200 500 500 12360 56.02 0.4%
200 500 650 12300 24.34 0.1%
200 500 800 12300 21.58 0.1%
200 500 950 12280 21.12 0.1%
200 500 1100 13230 31.16 0.2%
200 500 1250 13270 29.38 0.2%
200 500 1400 13300 39.35 0.2%
200 500 1550 14330 21.34 0.1%
200 500 1700 14330 32.02 0.2%
200 500 1850 14310 27.05 0.1%
200 500 2000 15510 23.82 0.1%
200 500 2150 15500 17.34 0.1%
200 500 2300 15530 45.88 0.2%
200 500 2450 15490 24.29 0.1%
200 500 2600 16830 31.71 0.1%
200 500 2750 16840 19.33 0.1%
200 500 2900 16820 20.76 0.1%
200 500 3050 18440 43.92 0.2%
200 500 3200 18540 67.5 0.3%
200 500 3350 18480 51.2 0.2%
200 500 3500 20180 48.32 0.2%
200 500 3650 20190 34.61 0.1%
200 500 3800 20210 50.42 0.2%
200 500 3950 20240 27.55 0.1%
200 500 4100 21650 37.26 0.1%
200 500 4250 21640 29.61 0.1%
200 500 4400 21610 43.02 0.1%
200 500 4550 23540 36.98 0.1%
200 500 4700 23530 55.85 0.2%
200 500 4850 23520 56.37 0.2%
200 500 5000 25250 44.74 0.1%
200 500 5150 25270 65.02 0.2%
200 500 5300 25260 45.22 0.1%
200 500 5450 25280 40.88 0.1%
200 500 5600 27440 36.38 0.1%
200 500 5750 27430 26.3 0.0%
200 500 5900 27430 43.23 0.1%
200 500 6050 29670 38 0.1%
200 500 6200 29600 39.96 0.1%
200 500 6350 29570 16.82 0.0%
200 500 6500 32150 55.02 0.1%
200 500 6650 32150 48.68 0.1%
200 500 6800 32180 66.27 0.2%
200 500 6950 32250 50.2 0.1%
200 500 7100 33830 28.02 0.0%
200 500 7250 33910 40.69 0.1%
200 500 7400 33870 23.24 0.0%
200 500 7550 36460 54.56 0.1%
200 500 7700 36480 46.2 0.1%
200 500 7850 36390 37.7 0.1%
200 500 8000 39080 22.54 0.0%

Quality and confidence:
param error
c 1.94
v 0.807
e 0.055

Model:
Time ~= 0
+ c 43.55
+ v 65.84
+ e 4.206
µs

Reads = 0 + (2 * c) + (1 * v) + (0 * e)
Writes = 0 + (1 * c) + (0 * v) + (0 * e)

Parity Benchmarking Bot added 2 commits January 20, 2021 11:34
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_elections_phragmen --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/elections-phragmen/src/weights.rs --template=./.maintain/frame-weight-template.hbs
@gavofyork
Copy link
Member

Needs a companion?

@kianenigma
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Jan 20, 2021

Waiting for commit status.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change report_defunct_voter so that it doesn't pay to make bad votes.

8 participants