Skip to content

Commit

Permalink
Update approval-voting-regression-bench (#5504)
Browse files Browse the repository at this point in the history
The accepted divergence rate of 1/1000 is excessive and leads to false
positives especially after
#4772 and
#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: #5463

---------

Signed-off-by: Alexandru Gheorghe <[email protected]>
  • Loading branch information
alexggh authored Aug 28, 2024
1 parent f4be48c commit f0fd083
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ fn main() -> Result<(), String> {
.map_err(|e| e.to_string())?;
println!("{}", average_usage);

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

0 comments on commit f0fd083

Please sign in to comment.