pub struct Opt {
pub clients: usize,
pub streams: usize,
pub max_streams: usize,
pub download_size: u64,
pub upload_size: u64,
pub stats: bool,
pub metrics: bool,
pub read_unordered: bool,
pub initial_mtu: u16,
pub only_relay: bool,
pub use_ipv6: bool,
pub workers_per_ep: usize,
}Fields§
§clients: usizeThe total number of clients which should be created
streams: usizeThe total number of streams which should be created
max_streams: usizeThe amount of concurrent streams which should be used
download_size: u64Number of bytes to transmit from server to client
This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10G will transfer 10GiB.
upload_size: u64Number of bytes to transmit from client to server
This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10G will transfer 10GiB.
stats: boolShow connection stats the at the end of the benchmark
metrics: boolShow iroh library counter metrics at the end of the benchmark
These metrics are process-wide, so contain metrics for clients and the server all summed up.
read_unordered: boolWhether to use the unordered read API
initial_mtu: u16Starting guess for maximum UDP payload size
only_relay: boolWhether to run a local relay and have the server and clients connect to that. This will force all traffic over the relay and can be used to test throughput for relay-only traffic.
use_ipv6: bool§workers_per_ep: usizeHow many tokio worker threads to use for each endpoint in the benchmark.
Defaults to 1, a single-threaded runtime. Set this to 0 to have each endpoint use a full multi-threaded tokio runtime with as many workers as CPU parallelism detected.
Setting this to 2 is a very reasonable value. When quinn runs a single connection, it can run one task (the EndpointDriver) for all receive-based work, and one task (the ConnectionDriver) for all send-based tasks. If quinn is only given a single worker, then work distribution may be unfair, resulting in acknowledgements not being processed timely enough, causing congestion control issues, although ideally that problem is fixed in some other way in quinn.
Trait Implementations§
Source§impl Args for Opt
impl Args for Opt
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Opt
impl FromArgMatches for Opt
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.