pub fn render(&mut self) {
    let instance = if let Some(i) = &mut self.instance {
      i
    } else {
      return;
    };

    let num_swimlanes = instance.bars.len();
    let heavy_hitters = self.workunit_store.heavy_hitters(num_swimlanes);
    let tasks_to_display = &mut instance.tasks_to_display;

    // Insert every one in the set of tasks to display.
    // For tasks already here, the durations are overwritten.
    tasks_to_display.extend(heavy_hitters.clone().into_iter());

    // And remove the tasks that no longer should be there.
    for (task, _) in tasks_to_display.clone().into_iter() {
      if !heavy_hitters.contains_key(&task) {
        tasks_to_display.swap_remove(&task);
      }
    }

    for (n, pbar) in instance.bars.iter().enumerate() {
      match Self::get_label_from_heavy_hitters(tasks_to_display, n) {
        Some(ref label) => pbar.set_message(label),
        None => pbar.set_message(""),
      }
    }
  }
///
/// Updates all of the swimlane ProgressBars with new data from the WorkunitStore. For this
/// method to have any effect, the `initialize` method must have been called first.
///
/// *Technically this method does not do the "render"ing: rather, the `MultiProgress` instance
/// running on a background thread is drives rendering, while this method feeds it new data.
///
Updates all of the swimlane ProgressBars with new data from the WorkunitStore. For this
method to have any effect, the `initialize` method must have been called first.

Technically this method does not do the "render"ing: rather, the `MultiProgress` instance
running on a background thread is drives rendering, while this method feeds it new data.
Updates all of the swimlane ProgressBars with new data from the WorkunitStore . For this method to have any effect the ` initialize ` method must have been called first . Technically this method does not do the " render " ing : rather the ` MultiProgress ` instance running on a background thread is drives rendering while this method feeds it new data .
pub fn render(&mut self) {
    let instance = if let Some(i) = &mut self.instance {
      i
    } else {
      return;
    };
    let num_swimlanes = instance.bars.len();
    let heavy_hitters = self.workunit_store.heavy_hitters(num_swimlanes);
    let tasks_to_display = &mut instance.tasks_to_display;
    // Insert every one in the set of tasks to display.
    // For tasks already here, the durations are overwritten.
    tasks_to_display.extend(heavy_hitters.clone().into_iter());
    // And remove the tasks that no longer should be there.
    for (task, _) in tasks_to_display.clone().into_iter() {
      if !heavy_hitters.contains_key(&task) {
        tasks_to_display.swap_remove(&task);
      }
    }
    for (n, pbar) in instance.bars.iter().enumerate() {
      match Self::get_label_from_heavy_hitters(tasks_to_display, n) {
        Some(ref label) => pbar.set_message(label),
        None => pbar.set_message(""),
      }
    }
  }
pub fn render ( & mut self ) { let instance = if let Some ( i ) = & mut self . instance { i } else { return ; } ; let num_swimlanes = instance . bars . len ( ) ; let heavy_hitters = self . workunit_store . heavy_hitters ( num_swimlanes ) ; let tasks_to_display = & mut instance . tasks_to_display ; // Insert every one in the set of tasks to display. // For tasks already here, the durations are overwritten. tasks_to_display . extend ( heavy_hitters . clone ( ) . into_iter ( ) ) ; // And remove the tasks that no longer should be there. for ( task , _ ) in tasks_to_display . clone ( ) . into_iter ( ) { if ! heavy_hitters . contains_key ( & task ) { tasks_to_display . swap_remove ( & task ) ; } } for ( n , pbar ) in instance . bars . iter ( ) . enumerate ( ) { match Self :: get_label_from_heavy_hitters ( tasks_to_display , n ) { Some ( ref label ) => pbar . set_message ( label ) , None => pbar . set_message ( " " ) , } } }
Updates all of the swimlane ProgressBars with new data from the WorkunitStore.
Updates all of the swimlane ProgressBars with new data from the WorkunitStore .
&mut self
&mut self