Skip to content

Commit

Permalink
Allow initial MTU to be specified in bulk benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith authored and djc committed Nov 28, 2022
1 parent 78401c6 commit 5c7f7aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub fn transport_config(opt: &Opt) -> quinn::TransportConfig {
// is configurable as a parameter.
let mut config = quinn::TransportConfig::default();
config.max_concurrent_uni_streams(opt.max_streams.try_into().unwrap());
config.initial_max_udp_payload_size(opt.initial_mtu);
config
}

Expand Down Expand Up @@ -181,6 +182,9 @@ pub struct Opt {
/// Valid options are: aes128, aes256, chacha20
#[clap(long = "cipher", default_value = "aes128")]
pub cipher: CipherSuite,
/// Starting guess for maximum UDP payload size
#[clap(long, default_value = "1200")]
pub initial_mtu: u16,
}

fn parse_byte_size(s: &str) -> Result<u64, ParseIntError> {
Expand Down

0 comments on commit 5c7f7aa

Please sign in to comment.