Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update subsystem-benchmark params #4201

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading