pub struct CommunicationProfiler { /* private fields */ }Expand description
Thread-safe communication profiler
Implementations§
Source§impl CommunicationProfiler
impl CommunicationProfiler
Sourcepub fn with_config(config: ProfilingConfig) -> Self
pub fn with_config(config: ProfilingConfig) -> Self
Create a new profiler with custom configuration
Sourcepub fn start_timing(&self) -> ProfilingTimer
pub fn start_timing(&self) -> ProfilingTimer
Start timing a communication operation
Sourcepub fn record_event(
&self,
op_type: CommunicationOpType,
rank: u32,
world_size: u32,
data_size_bytes: usize,
timer: ProfilingTimer,
) -> TorshResult<()>
pub fn record_event( &self, op_type: CommunicationOpType, rank: u32, world_size: u32, data_size_bytes: usize, timer: ProfilingTimer, ) -> TorshResult<()>
Record a communication event
Sourcepub fn get_operation_stats(
&self,
op_type: CommunicationOpType,
) -> TorshResult<Option<OperationStats>>
pub fn get_operation_stats( &self, op_type: CommunicationOpType, ) -> TorshResult<Option<OperationStats>>
Get statistics for a specific operation type
Sourcepub fn get_all_operation_stats(
&self,
) -> TorshResult<HashMap<CommunicationOpType, OperationStats>>
pub fn get_all_operation_stats( &self, ) -> TorshResult<HashMap<CommunicationOpType, OperationStats>>
Get all operation statistics
Sourcepub fn get_rank_stats(
&self,
rank: u32,
) -> TorshResult<Option<HashMap<CommunicationOpType, OperationStats>>>
pub fn get_rank_stats( &self, rank: u32, ) -> TorshResult<Option<HashMap<CommunicationOpType, OperationStats>>>
Get statistics for a specific rank
Sourcepub fn get_recent_events(
&self,
count: usize,
) -> TorshResult<Vec<CommunicationEvent>>
pub fn get_recent_events( &self, count: usize, ) -> TorshResult<Vec<CommunicationEvent>>
Get recent events (last N events)
Sourcepub fn get_all_events(&self) -> TorshResult<Vec<CommunicationEvent>>
pub fn get_all_events(&self) -> TorshResult<Vec<CommunicationEvent>>
Get all events
Sourcepub fn get_failed_operations_count(&self) -> u64
pub fn get_failed_operations_count(&self) -> u64
Get the count of failed operations across all ranks and operation types
Sourcepub fn clear(&self) -> TorshResult<()>
pub fn clear(&self) -> TorshResult<()>
Clear all profiling data
Sourcepub fn update_config(&self, config: ProfilingConfig) -> TorshResult<()>
pub fn update_config(&self, config: ProfilingConfig) -> TorshResult<()>
Update configuration
Sourcepub fn export_json(&self) -> TorshResult<String>
pub fn export_json(&self) -> TorshResult<String>
Export profiling data to JSON
Sourcepub fn generate_summary(&self) -> TorshResult<String>
pub fn generate_summary(&self) -> TorshResult<String>
Generate a summary report
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CommunicationProfiler
impl RefUnwindSafe for CommunicationProfiler
impl Send for CommunicationProfiler
impl Sync for CommunicationProfiler
impl Unpin for CommunicationProfiler
impl UnsafeUnpin for CommunicationProfiler
impl UnwindSafe for CommunicationProfiler
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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