fn stage_stats(&self, stage: PipelineStages) -> (f64, f64, f64) {
        let mut duration_sec =
            self.stage_duration[stage.stage_number()] as f64 / 1_000_000_000 as f64;
        let duration_ns = self.stage_duration[stage.stage_number()];

        if duration_sec == 0.0 {
            warn!("Stage duration is zero for {:?}", stage);
            duration_sec = 1.0;
        }
        let latency_us = (duration_ns as f64 / 1_000 as f64) / self.io_count as f64;
        let write_bandwidth = (self.write_size / 1_000_000) as f64 / (duration_sec as f64);
        let iops_per_sec = self.io_count as f64 / (duration_sec as f64);
        (latency_us, write_bandwidth, iops_per_sec)
    }
/// Returns latency, bandwidth and IO per second for a given stage
Returns latency, bandwidth and IO per second for a given stage
Returns latency bandwidth and IO per second for a given stage
fn stage_stats(&self, stage: PipelineStages) -> (f64, f64, f64) {
        let mut duration_sec =
            self.stage_duration[stage.stage_number()] as f64 / 1_000_000_000 as f64;
        let duration_ns = self.stage_duration[stage.stage_number()];
        if duration_sec == 0.0 {
            warn!("Stage duration is zero for {:?}", stage);
            duration_sec = 1.0;
        }
        let latency_us = (duration_ns as f64 / 1_000 as f64) / self.io_count as f64;
        let write_bandwidth = (self.write_size / 1_000_000) as f64 / (duration_sec as f64);
        let iops_per_sec = self.io_count as f64 / (duration_sec as f64);
        (latency_us, write_bandwidth, iops_per_sec)
    }
fn stage_stats ( & self , stage : PipelineStages ) -> ( f64 , f64 , f64 ) { let mut duration_sec = self . stage_duration [ stage . stage_number ( ) ] as f64 / 1_000_000_000 as f64 ; let duration_ns = self . stage_duration [ stage . stage_number ( ) ] ; if duration_sec == 0.0 { warn ! ( " " stage ) ; duration_sec = 1.0 ; } let latency_us = ( duration_ns as f64 / 1_000 as f64 ) / self . io_count as f64 ; let write_bandwidth = ( self . write_size / 1_000_000 ) as f64 / ( duration_sec as f64 ) ; let iops_per_sec = self . io_count as f64 / ( duration_sec as f64 ) ; ( latency_us , write_bandwidth , iops_per_sec ) }
Returns latency, bandwidth and IO per second for a given stage
Returns latency bandwidth and IO per second for a given stage
&self
stage
PipelineStages
&self
stage
PipelineStages