pub struct LoadGenerator { /* private fields */ }Implementations§
Source§impl LoadGenerator
impl LoadGenerator
pub fn new(config: LoadConfig) -> Result<Self>
pub fn new_loaded_connection( &self, direction: Direction, conn_type: ConnectionType, network: Arc<dyn Network>, time: Arc<dyn Time>, shutdown: CancellationToken, ) -> Result<OneshotResult<LoadedConnection>>
pub fn connections(&self) -> impl Iterator<Item = &LoadedConnection>
pub fn random_connection(&self) -> Option<Arc<RwLock<EstablishedConnection>>>
pub fn push(&mut self, loaded_connection: LoadedConnection)
pub fn update(&mut self)
Sourcepub fn ongoing_loads(&self) -> impl Iterator<Item = &LoadedConnection>
pub fn ongoing_loads(&self) -> impl Iterator<Item = &LoadedConnection>
Connections still transferring: neither completed nor terminated early.
Excluding failed connections is what lets the ramp replace them and keeps self probes off dead connections.
pub fn count_loads(&self) -> usize
Sourcepub fn count_failed_loads(&self) -> usize
pub fn count_failed_loads(&self) -> usize
Number of load-generating connections that terminated early with an error.
pub fn into_connections(self) -> Vec<LoadedConnection>
Auto Trait Implementations§
impl !RefUnwindSafe for LoadGenerator
impl !UnwindSafe for LoadGenerator
impl Freeze for LoadGenerator
impl Send for LoadGenerator
impl Sync for LoadGenerator
impl Unpin for LoadGenerator
impl UnsafeUnpin for LoadGenerator
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more