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.Source§impl Parser for Opt
impl Parser for Opt
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
impl Copy for Opt
Auto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnwindSafe for Opt
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more