Update the current progress on the task at the top of the stack.

        :param int p: The current subtask number, between 0 and `size`
            (passed to `start_task`), inclusive.
772793
def progress(self, p):
        '''
        
        '''
        self.task_stack[-1] = self.task_stack[-1]._replace(progress=p)
        self.progress_report()
562126
synchronized void statusUpdate(TaskStatus status) {
    setProgress(status.getProgress());
    this.runState = status.getRunState();
    this.stateString = status.getStateString();
    this.nextRecordRange = status.getNextRecordRange();

    setDiagnosticInfo(status.getDiagnosticInfo());
    
    if (status.getStartTime() > 0) {
      this.startTime = status.getStartTime(); 
    }
    if (status.getFinishTime() > 0) {
      setFinishTime(status.getFinishTime()); 
    }
    
    this.phase = status.getPhase();
    this.counters = status.getCounters();
    this.outputSize = status.outputSize;
  }
421985
public void setProgress(float progress) {
    if (isSpinning) {
      mProgress = 0.0f;
      isSpinning = false;

      runCallback();
    }

    if (progress > 1.0f) {
      progress -= 1.0f;
    } else if (progress < 0) {
      progress = 0;
    }

    if (progress == mTargetProgress) {
      return;
    }

    // If we are currently in the right position
    // we set again the last time animated so the
    // animation starts smooth from here
    if (mProgress == mTargetProgress) {
      lastTimeAnimated = SystemClock.uptimeMillis();
    }

    mTargetProgress = Math.min(progress * 360.0f, 360.0f);

    invalidate();
  }
377609
def progress(self):
        
        now = time()
        if now - self.last_progress_t > 1:
            self.last_progress_t = now
            if self.status:
                self.uplink.status(self.status)
                self.status = None
            self.__spill_counters()
            self.uplink.progress(self.progress_value)
            self.uplink.flush()
617546
public void updateProgress(ProgressInfo newProgress)
    {
        assert peer.equals(newProgress.peer);

        Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN
                                                    ? receivingFiles : sendingFiles;
        currentFiles.put(newProgress.fileName, newProgress);
    }
1039179
public void setInstantProgress(float progress) {
    if (isSpinning) {
      mProgress = 0.0f;
      isSpinning = false;
    }

    if (progress > 1.0f) {
      progress -= 1.0f;
    } else if (progress < 0) {
      progress = 0;
    }

    if (progress == mTargetProgress) {
      return;
    }

    mTargetProgress = Math.min(progress * 360.0f, 360.0f);
    mProgress = mTargetProgress;
    lastTimeAnimated = SystemClock.uptimeMillis();
    invalidate();
  }
1285152
def setTotal( self, amount ):
        
        self._primaryProgressBar.setValue(0)
        self._primaryProgressBar.setMaximum(amount)
        
        if amount:
            self.setCurrentMode(XLoaderWidget.Mode.Progress)
506317
public synchronized void addProgress(Progress p) {
    // Don't add more than once.
    Iterator<WeakReference<Progress>> iter = progresses.iterator();
    while(iter.hasNext()) {
      WeakReference<Progress> ref = iter.next();
      // since we are at it anyway, remove old links.
      if(ref.get() == null) {
        iter.remove();
      }
      else {
        if(ref.get() == p) {
          return;
        }
      }
    }
    progresses.add(new WeakReference<>(p));
  }
1056016
@Override
  public synchronized void onProgressUpdate(float progress) {
    if (mIsFinished) {
      return;
    }
    try {
      onProgressUpdateImpl(progress);
    } catch (Exception e) {
      onUnhandledException(e);
    }
  }
589131
protected void updateProgressBar(CmsUploadProgessInfo info) {

        switch (info.getState()) {
            case notStarted:
                break;
            case running:
                m_progressInfo.setProgress(info);
                stopLoadingAnimation();
                break;
            case finished:
                m_progressInfo.finish();
                m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_UPLOAD_INFO_FINISHING_0), false);
                startLoadingAnimation(Messages.get().key(Messages.GUI_UPLOAD_INFO_CREATING_RESOURCES_0), 1500);
                break;
            default:
                break;
        }
    }
1281731
def update_progress(opts, progress, progress_iter, out):
    '''
    
    '''
    # Look up the outputter
    try:
        progress_outputter = salt.loader.outputters(opts)[out]
    except KeyError:  # Outputter is not loaded
        log.warning('Progress outputter not available.')
        return False
    progress_outputter(progress, progress_iter)
1233299
def addTask(self, task):
        
        # Try to start task first.  If it fails then we don't need to
        # undo adding it to taskset
        task.initialize(self)
        task.start()

        with self._lock_c:
            self.numtasks += 1
            self.taskset.append(task)
477731
def current_task(self, args):
        
        ctask = self.nice_name if self.nice_name is not None else self.name
        if args is not None:
            if args.update:
                ctask = ctask.replace('%pre', 'Updating')
            else:
                ctask = ctask.replace('%pre', 'Loading')
        return ctask
230305
public void updateProgressRate(long currentTime) {

    double bestProgressRate = 0;

    for (TaskStatus ts : taskStatuses.values()){
      if (ts.getRunState() == TaskStatus.State.RUNNING  || 
          ts.getRunState() == TaskStatus.State.SUCCEEDED ||
          ts.getRunState() == TaskStatus.State.COMMIT_PENDING) {

        double tsProgressRate = ts.getProgress()/Math.max(1,
            currentTime - getDispatchTime(ts.getTaskID()));
        if (tsProgressRate > bestProgressRate){
          bestProgressRate = tsProgressRate;
        }
      }
    }

    DataStatistics taskStats = job.getRunningTaskStatistics(isMapTask());
    taskStats.updateStatistics(progressRate, bestProgressRate);

    progressRate = bestProgressRate;
  }
475702
def progress(self, value, new_status=None):
    
    space_fillers = 0

    if new_status is not None:
      # if new text is shorter, then we need fill previously used place
      space_fillers = len(self._status_msg) - len(new_status) if self._status_msg and len(self._status_msg) - len(new_status) > 0 else 0
      self._status_msg = new_status

    if not self._infinite_mode and value > self._max:
      self._infinite_mode = True
      self._fill_empty()

    self._timer.tick(value)

    if not self._infinite_mode:
      percent_done = self._calc_percent_done(value)
      filled = self._options.fill_char * int(self._calc_filled_space(percent_done))
      empty = self._options.blank_char * int(self._calc_empty_space(percent_done))
    else:
      percent_done = 100
      self._infinite_position = 1 if self._infinite_position + self._infinite_width >= self._width else self._infinite_position + 1
      filled = "%s%s" % (self._options.blank_char * (self._infinite_position - self._infinite_width), self._options.fill_char * self._infinite_width)
      empty = self._options.blank_char * int(self._width - self._infinite_position)

    kwargs = {
      "begin_line": self._begin_line_character,
      "text": self._text,
      "status": self._status_msg,
      "end_line": " " * space_fillers,
      "filled": filled,
      "reverse_filled": filled[::-1],
      "empty": empty,
      "value": int(value),
      "max": int(self._max),
      "items_per_sec": self._timer.unit_per_sec,
      "percents_done": percent_done
    }

    self.stdout.write(safe_format(self._options.progress_format.value, **kwargs))
    self.stdout.flush()
955037
def run_progress
      if counts_set? && total_count > 0
        sum = output.values_at(:success_count, :cancelled_count, :failed_count).reduce(:+)
        sum.to_f / total_count
      else
        0.1
      end
    end
750048
def p_task(self, p):
        ''
        p[0] = Task(p[2], p[4], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))