Skip to content

Commit f0fd083

Browse files
authored
Update approval-voting-regression-bench (paritytech#5504)
The accepted divergence rate of 1/1000 is excessive and leads to false positives especially after paritytech#4772 and paritytech#5042, so let's increase it to 1/100 since we do have some randomness in the system and there is no point in being that strict. Fixes: paritytech#5463 --------- Signed-off-by: Alexandru Gheorghe <[email protected]>
1 parent f4be48c commit f0fd083

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

polkadot/node/core/approval-voting/benches/approval-voting-regression-bench.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ fn main() -> Result<(), String> {
7474
.map_err(|e| e.to_string())?;
7575
println!("{}", average_usage);
7676

77-
// We expect no variance for received and sent
78-
// but use 0.001 because we operate with floats
77+
// We expect some small variance for received and sent because the
78+
// test messages are generated at every benchmark run and they contain
79+
// random data so use 0.01 as the accepted variance.
7980
messages.extend(average_usage.check_network_usage(&[
80-
("Received from peers", 52941.6071, 0.001),
81-
("Sent to peers", 63810.1859, 0.001),
81+
("Received from peers", 52941.6071, 0.01),
82+
("Sent to peers", 63995.2200, 0.01),
8283
]));
8384
messages.extend(average_usage.check_cpu_usage(&[
8485
("approval-distribution", 6.3912, 0.1),

0 commit comments

Comments
 (0)