Skip to content

Commit

Permalink
Update subsystem-benchmark params (#4201)
Browse files Browse the repository at this point in the history
- Returned latency (with it, results are more stable)
- The threshold is weakened
- Increased number of runs
  • Loading branch information
AndreiEres authored Apr 19, 2024
1 parent 98a364f commit 4f125d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use polkadot_subsystem_bench::{
};
use std::io::Write;

const BENCH_COUNT: usize = 5;
const BENCH_COUNT: usize = 50;

fn main() -> Result<(), String> {
let mut messages = vec![];
Expand All @@ -40,8 +40,6 @@ fn main() -> Result<(), String> {
config.n_cores = 10;
config.n_validators = 500;
config.num_blocks = 3;
config.connectivity = 100;
config.latency = None;
config.generate_pov_sizes();
let state = TestState::new(&config);

Expand Down Expand Up @@ -75,13 +73,13 @@ fn main() -> Result<(), String> {
// We expect no variance for received and sent
// but use 0.001 because we operate with floats
messages.extend(average_usage.check_network_usage(&[
("Received from peers", 433.3, 0.001),
("Sent to peers", 18480.0, 0.001),
("Received from peers", 433.3333, 0.001),
("Sent to peers", 18479.9000, 0.001),
]));
messages.extend(average_usage.check_cpu_usage(&[
("availability-distribution", 0.012, 0.05),
("availability-store", 0.153, 0.05),
("bitfield-distribution", 0.026, 0.05),
("availability-distribution", 0.0123, 0.1),
("availability-store", 0.1597, 0.1),
("bitfield-distribution", 0.0223, 0.1),
]));

if messages.is_empty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ use polkadot_subsystem_bench::{
};
use std::io::Write;

const BENCH_COUNT: usize = 5;
const BENCH_COUNT: usize = 10;

fn main() -> Result<(), String> {
let mut messages = vec![];

let options = DataAvailabilityReadOptions { fetch_from_backers: true };
let mut config = TestConfiguration::default();
config.num_blocks = 3;
config.connectivity = 100;
config.latency = None;
config.generate_pov_sizes();

let state = TestState::new(&config);
Expand Down Expand Up @@ -73,10 +71,10 @@ fn main() -> Result<(), String> {
// We expect no variance for received and sent
// but use 0.001 because we operate with floats
messages.extend(average_usage.check_network_usage(&[
("Received from peers", 307200.000, 0.001),
("Sent to peers", 1.667, 0.001),
("Received from peers", 307203.0000, 0.001),
("Sent to peers", 1.6667, 0.001),
]));
messages.extend(average_usage.check_cpu_usage(&[("availability-recovery", 11.500, 0.05)]));
messages.extend(average_usage.check_cpu_usage(&[("availability-recovery", 12.8338, 0.1)]));

if messages.is_empty() {
Ok(())
Expand Down

0 comments on commit 4f125d1

Please sign in to comment.