Skip to main content

BenchmarkSession

Trait BenchmarkSession 

Source
pub trait BenchmarkSession: Send + Sync {
    // Required methods
    fn endpoints(&self) -> &HashMap<String, String>;
    fn shutdown<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

A temporary, isolated proxy instance exposing one local proxy URL per outbound tag so all profiles can be probed concurrently without restarting the live service.

Required Methods§

Source

fn endpoints(&self) -> &HashMap<String, String>

Map of outbound_tag -> local proxy URL (e.g. socks5h://127.0.0.1:24501).

Source

fn shutdown<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Gracefully stop the temporary proxy instance and remove temporary files.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§