pub struct CommunicationEvent {
pub event_id: u64,
pub op_type: CommunicationOpType,
pub rank: u32,
pub world_size: u32,
pub data_size_bytes: usize,
pub start_time: SystemTime,
pub duration: Duration,
pub bandwidth_bps: f64,
pub metadata: HashMap<String, String>,
}Expand description
Individual communication event record
Fields§
§event_id: u64Unique event identifier
op_type: CommunicationOpTypeType of communication operation
rank: u32Rank of the process that initiated the operation
world_size: u32World size at the time of operation
data_size_bytes: usizeSize of data transferred in bytes
start_time: SystemTimeStart timestamp
duration: DurationDuration of the operation
bandwidth_bps: f64Bandwidth achieved (bytes per second)
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl CommunicationEvent
impl CommunicationEvent
Sourcepub fn new(
event_id: u64,
op_type: CommunicationOpType,
rank: u32,
world_size: u32,
data_size_bytes: usize,
start_time: SystemTime,
duration: Duration,
) -> Self
pub fn new( event_id: u64, op_type: CommunicationOpType, rank: u32, world_size: u32, data_size_bytes: usize, start_time: SystemTime, duration: Duration, ) -> Self
Create a new communication event
Sourcepub fn with_metadata(self, key: String, value: String) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
Add metadata to the event
Sourcepub fn latency_ms(&self) -> f64
pub fn latency_ms(&self) -> f64
Get latency in milliseconds
Sourcepub fn bandwidth_mbps(&self) -> f64
pub fn bandwidth_mbps(&self) -> f64
Get bandwidth in MB/s
Trait Implementations§
Source§impl Clone for CommunicationEvent
impl Clone for CommunicationEvent
Source§fn clone(&self) -> CommunicationEvent
fn clone(&self) -> CommunicationEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommunicationEvent
impl Debug for CommunicationEvent
Source§impl<'de> Deserialize<'de> for CommunicationEvent
impl<'de> Deserialize<'de> for CommunicationEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommunicationEvent
impl RefUnwindSafe for CommunicationEvent
impl Send for CommunicationEvent
impl Sync for CommunicationEvent
impl Unpin for CommunicationEvent
impl UnsafeUnpin for CommunicationEvent
impl UnwindSafe for CommunicationEvent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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