Prints a progress update if enough time has passed.
353782
def _LogProgressUpdateIfReasonable(self):
    """"""
    next_log_time = (
        self._time_of_last_status_log +
        self.SECONDS_BETWEEN_STATUS_LOG_MESSAGES)
    current_time = time.time()
    if current_time < next_log_time:
      return
    completion_time = time.ctime(current_time + self.EstimateTimeRemaining())
    log_message = (
        '{0:s} hash analysis plugin running. {1:d} hashes in queue, '
        'estimated completion time {2:s}.'.format(
            self.NAME, self.hash_queue.qsize(), completion_time))
    logger.info(log_message)
    self._time_of_last_status_log = current_time
1219662
def update_progress(self, complete=False):
        
        if self.progressbar:
            try:
                self.bar.update(self.transfered)
            except Exception as e:
                logger.debug("{0}: {1}, {2} exceeds memsize {3}".format(
                                 self.remote_addr,
                                 e,
                                 self.transfered,
                                 self.max_size))
            if complete:
                self.bar.update(self.max_size)
                self.bar.finish()
        else:
            percent = int(100 * float(self.transfered) / float(self.max_size))
            # printe a message at 10%, 20%, etc...
            if percent % 10 == 0:
                if self.progress != percent:
                    logger.info("{0}: capture {1}% complete".format(
                                self.remote_addr, percent))
                    self.progress = percent
272922
function progress( _line ){

    messages[ _line ].progress++;

    if( (messages[ _line ].progress + messages[ _line ].diff) > 0 ){

        messages[ _line ].progress = 0;

    }

}
533159
def _print_download_progress_msg(self, msg, flush=False):
    
    if self._interactive_mode():
      # Print progress message to console overwriting previous progress
      # message.
      self._max_prog_str = max(self._max_prog_str, len(msg))
      sys.stdout.write("\r%-{}s".format(self._max_prog_str) % msg)
      sys.stdout.flush()
      if flush:
        print("\n")
    else:
      # Interactive progress tracking is disabled. Print progress to the
      # standard TF log.
      logging.info(msg)
1282740
def update_progress(total, done)
      percentage = total.zero? ? 100 : ((done.to_f / total) * 100).to_i
      progress(percentage)
    end
3393
def update(self, value):
        ""
        if value <= 0.1:
            value = 0
        assert 0 <= value <= self.maxval
        self.currval = value
        if not self._need_update() or self.finished:
            return
        if not self.start_time:
            self.start_time = time.time()
        self.seconds_elapsed = time.time() - self.start_time
        self.prev_percentage = self.percentage()
        if value != self.maxval:
            self.fd.write(self._format_line() + '\r')
        else:
            self.finished = True
            self.fd.write(self._format_line() + '\n')
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)
171539
def progress_status(self):
        """"""

        if self.line % self.freq == 0:
            text = self.statustext.format(nele=self.line,
                                          totalele=self.total_lines)

            if self.main_window.grid.actions.pasting:
                try:
                    post_command_event(self.main_window,
                                       self.main_window.StatusBarMsg,
                                       text=text)
                except TypeError:
                    # The main window does not exist any more
                    pass
            else:
                # Write directly to the status bar because the event queue
                # is not emptied during file access

                self.main_window.GetStatusBar().SetStatusText(text)

            # Now wait for the statusbar update to be written on screen
            if is_gtk():
                try:
                    wx.Yield()
                except:
                    pass

        self.line += 1
48499
def _log_progress(self, bytes_downloaded):
    
    self._total_bytes_downloaded += bytes_downloaded
    now = time.time()
    if (self._interactive_mode() or
        now - self._last_progress_msg_print_time > 15):
      # Print progress message every 15 secs or if interactive progress
      # tracking is enabled.
      self._print_download_progress_msg(
          "Downloading %s: %s" % (self._url,
                                  tf_utils.bytes_to_readable_str(
                                      self._total_bytes_downloaded, True)))
      self._last_progress_msg_print_time = now
1120856
private void showProgress() {

        CmsFileInfo fileInfo = m_fileInput.getFiles()[0];
        m_progressInfo = new CmsUploadProgressInfo(Collections.singletonList(fileInfo.getFileName()));
        m_progressInfo.setContentLength(fileInfo.getFileSize());
        m_mainPanel.setContainerWidget(m_progressInfo);
        m_updateProgressTimer = new Timer() {

            @Override
            public void run() {

                updateProgress();
            }
        };
        m_updateProgressTimer.scheduleRepeating(1000);

    }
323227
@Override
    public void indicateProgress(int number, int total) {
        progressIndicatorActive = true;
        String currMsg = lastMessage;
        try {
            updateStatus(currMsg + ' ' + number + " of " + total);
        } finally {
            lastMessage = currMsg;
        }
    }
736714
def done_waiting(self):
        
        if self.waiting:
            self.waiting = False
            self.progress_bar.show_running()
1370089
public void updateProgress(long latestProgress, long expectedProgress) {
        lastProgress = progress;
        progress = latestProgress;
        expected = expectedProgress;

        if (connected() == false)
            state = State.CONNECTED;
        else
            state = State.UPDATE;

        // The threshold effectively divides the progress into
        // different set of ranges:
        //
        //      Range 0: 0..threshold-1,
        //      Range 1: threshold .. 2*threshold-1
        //      ....
        //      Range n: n*threshold .. (n+1)*threshold-1
        //
        // To determine which range the progress belongs to, it
        // would be calculated as follow:
        //
        //      range number = progress / threshold
        //
        // Notification should only be triggered when the current
        // progress and the last progress are in different ranges,
        // i.e. they have different range numbers.
        //
        // Using this range scheme, notification will be generated
        // only once when the progress reaches each range.
        //
        if (lastProgress / threshold != progress / threshold)   {
            progressMonitor.updateProgress(this);
        }

        // Detect read overrun
        if (expected != -1) {
            if (progress >= expected && progress != 0)
                close();
        }
    }
6658
def print_update(self):
        
        print("\r\n")
        now = datetime.datetime.now()
        print("Update info: (from: %s)" % now.strftime("%c"))

        current_total_size = self.total_stined_bytes + self.total_new_bytes

        if self.total_errored_items:
            print(" * WARNING: %i omitted files!" % self.total_errored_items)

        print(" * fast backup: %i files" % self.total_fast_backup)

        print(
            " * new content saved: %i files (%s %.1f%%)"
            % (
                self.total_new_file_count,
                human_filesize(self.total_new_bytes),
                to_percent(self.total_new_bytes, current_total_size),
            )
        )

        print(
            " * stint space via hardlinks: %i files (%s %.1f%%)"
            % (
                self.total_file_link_count,
                human_filesize(self.total_stined_bytes),
                to_percent(self.total_stined_bytes, current_total_size),
            )
        )

        duration = default_timer() - self.start_time
        performance = current_total_size / duration / 1024.0 / 1024.0
        print(" * present performance: %.1fMB/s\n" % performance)
284348
public boolean notifyProgress(int value, int maximum) {
    this.progress = (double) value / (double) maximum;
    this.value = value;
    this.maximum = maximum;
    this.printProgressBar();
    return true;
  }
922770
public function update_progress() {
        // If we haven't started yet, consider starting.
        if ($this->starttime) {
            if (time() > $this->starttime) {
                $this->starttime = 0;
            } else {
                // Do nothing until start time.
                return;
            }
        }

        // We have started, so handle as default.
        parent::update_progress();
    }
633519
def finish(self):
        
        pct = floor(round(self.progress/self.size, 2)*100)
        pr = floor(pct*.33)
        bar = "".join([" " for x in range(pr-1)] + ["↦"])
        subprogress = self.format_parent_bar() if self.parent_bar else ""
        fin = "Loading{} ={}{} ({}%)".format(subprogress, bar, "ӿ", pct)
        print(fin.ljust(len(fin)+5), end="\r")
        time.sleep(0.10)
        print("\033[K\033[1A")
        self.progress = 0