/// Aggregate stats from multiple stats into one. We consider longest running
/// thread for duration of the run.
Aggregate stats from multiple stats into one. We consider longest running
thread for duration of the run.
Aggregate stats from multiple stats into one . We consider longest running thread for duration of the run .
pub fn aggregate_summary(&mut self, stat1: &Stats) {
        // We consider longest running thread.
        if self.start_instant > stat1.start_instant {
            self.start_instant = stat1.start_instant;
        }
        // We consider longest running thread.
        if self.end_instant < stat1.end_instant {
            self.end_instant = stat1.end_instant;
        }
        // bytes transferred is additive.
        self.write_size += stat1.write_size;
        // bytes transferred is additive.
        self.io_count += stat1.io_count;
        // This is debatable whether to consider adding or taking the
        // smallest/largest run. For start_instant/end_instant we chose longest run and for
        // stage duration we choose some of all time spent to get a different
        // perspective about the performance.
        for stage in PipelineStages::iterator() {
            self.stage_duration[stage.stage_number()] += stat1.stage_duration[stage.stage_number()];
        }
    }
pub fn aggregate_summary ( & mut self , stat1 : & Stats ) { // We consider longest running thread. if self . start_instant > stat1 . start_instant { self . start_instant = stat1 . start_instant ; } // We consider longest running thread. if self . end_instant < stat1 . end_instant { self . end_instant = stat1 . end_instant ; } // bytes transferred is additive. self . write_size += stat1 . write_size ; // bytes transferred is additive. self . io_count += stat1 . io_count ; // This is debatable whether to consider adding or taking the // smallest/largest run. For start_instant/end_instant we chose longest run and for // stage duration we choose some of all time spent to get a different // perspective about the performance. for stage in PipelineStages :: iterator ( ) { self . stage_duration [ stage . stage_number ( ) ] += stat1 . stage_duration [ stage . stage_number ( ) ] ; } }
Aggregate stats from multiple stats into one.
Aggregate stats from multiple stats into one .
&mut self
stat1
&Stats