Prints de progress report. It backs up as many lines as the meters
 depth. Prints the progress as a line of dots, a percentage, time
 spent, and time left. And then goes moves the cursor back to its
 original line. Everything is printed to stderr.
779449
def report

      percent = @current.to_f/ @max.to_f
      percent = 0.001 if percent < 0.001
      if @desc != ""
        indicator = @desc + ": "
      else
        indicator = "Progress "
      end
      indicator += "["
      10.times{|i|
        if i < percent * 10 then
          indicator += "."
        else
          indicator += " "
        end
      }
      indicator += "]   done #{(percent * 100).to_i}% "

      eta =  (Time.now - @time)/percent * (1-percent)
      eta = eta.to_i
      eta = [eta/3600, eta/60 % 60, eta % 60].map{|t| "%02i" % t }.join(':')

      used = (Time.now - @time).to_i
      used = [used/3600, used/60 % 60, used % 60].map{|t|  "%02i" % t }.join(':')

      indicator += " (Time left #{eta} seconds) (Started #{used} seconds ago)"

      STDERR.print("\033[#{@depth + 1}F\033[2K" + indicator + "\n\033[#{@depth + 2}E")
    end
351164
def report(self, string='', level=0, prelude='', progress=False, abbreviate=True):
        ''''''
        if self._mute == False:
            self._prefix = prelude + '{spacing}[{name}] '.format(name = self.nametag, spacing = ' '*level)
            self._prefix = "{0:>16}".format(self._prefix)
            equalspaces = ' '*len(self._prefix)
            toprint = string + ''
            if abbreviate:
                if shortcuts is not None:
                    for k in shortcuts.keys():
                        toprint = toprint.replace(k, shortcuts[k])

            if progress:
                print('\r' + self._prefix + toprint.replace('\n', '\n' + equalspaces),)
            else:
                print(self._prefix + toprint.replace('\n', '\n' + equalspaces))
1146770
function() {
      if (progress.length) {
        SpeedIndex = 0;
        var lastTime = 0;
        var lastProgress = 0;
        for (var i = 0; i < progress.length; i++) {
          var elapsed = progress[i].tm - lastTime;
          if (elapsed > 0 && lastProgress < 1)
            SpeedIndex += (1 - lastProgress) * elapsed;
          lastTime = progress[i].tm;
          lastProgress = progress[i].progress;
        }
      } else {
        SpeedIndex = firstPaint;
      }
    }
1208763
def _print_debug(self, *args):
        
        if self.debuglevel > 1:
            print(datetime.datetime.now().time(), *args, file=sys.stderr)
        else:
            print(*args, file=sys.stderr)
409416
def pretty_print_str(self):
        '''
        
        '''
        retval = ''
        # dfs
        todo = [self.root]
        while todo:
            current = todo.pop()
            for char in reversed(sorted(current.keys())):
                todo.append(current[char])
            indent = ' ' * (current.depth * 2)
            retval += indent + current.__unicode__() + '\n'
        return retval.rstrip('\n')
1362428
public void progress() {
    count++;
    if (count % period == 0 && LOG.isInfoEnabled()) {
      final double percent = 100 * (count / (double) totalIterations);
      final long tock = System.currentTimeMillis();
      final long timeInterval = tock - tick;
      final long linesPerSec = (count - prevCount) * 1000 / timeInterval;
      tick = tock;
      prevCount = count;
      final int etaSeconds = (int) ((totalIterations - count) / linesPerSec);
      final long hours = SECONDS.toHours(etaSeconds);
      final long minutes = SECONDS.toMinutes(etaSeconds - HOURS.toSeconds(hours));
      final long seconds = SECONDS.toSeconds(etaSeconds - MINUTES.toSeconds(minutes));
      LOG.info(String.format("[%3.0f%%] Completed %d iterations of %d total input. %d iters/s. ETA %02d:%02d:%02d",
          percent, count, totalIterations, linesPerSec, hours, minutes, seconds));
    }
  }
1061584
def print_benchmark(elapsed):
    
    print '%-7.2f %s' % (elapsed, 'seconds elapsed')
    keys = ['directories', 'files',
            'logical lines', 'physical lines']
    for key in keys:
        if key in options.counters:
            print '%-7d %s per second (%d total)' % (
                options.counters[key] / elapsed, key,
                options.counters[key])
821430
public static function backTrace() {

        $str = "<br />[backTrace]";
        foreach (debug_backtrace() as $row) {
            $str .= "<br />FILE: "
                    . $row['file'] . " FUNC: " . $row['function']
                    . " LINE: " . $row['line'] . " ARGS: "
                    . print_r($row['args'], true);
        }
        return $str;
    }
218109
function printTimingAndExit(startTime) {
  const execTime = time() - startTime;

  printColumns(chalk.green(`Finished in: ${execTime.toFixed()}ms`));
  process.exit(0);
}
639033
function print() {
        var parts = String(out).split('\n');
        /* istanbul ignore next */
        if (parts.length > 1) {
          out = parts.pop();
          var logging = String(parts.join('\n')).replace(/\r\r/g, '\r');
          slf.log(logging);
        }
        /* istanbul ignore next */
        if (closed === false) {
          setTimeout(function () {
            print();
          }, 50);
        }
      }
1025009
def reportTimes(self):
        

        self.end = _ptime()
        total_time = 0
        print(ProcSteps.__report_header)
        for step in self.order:
            if 'elapsed' in self.steps[step]:
                _time = self.steps[step]['elapsed']
            else:
                _time = 0.0
            total_time += _time
            print('   %20s          %0.4f sec.' % (step, _time))

        print('   %20s          %s' % ('=' * 20, '=' * 20))
        print('   %20s          %0.4f sec.' % ('Total', total_time))
311510
void progress(int cur, int max) {
    StringBuilder out = new StringBuilder();

    if (lastProgress != null) {
      char[] back = new char[lastProgress.length()];
      Arrays.fill(back, '\b');
      out.append(back);
    }

    String progress =
        cur + "/" + (max == -1 ? "?" : "" + max) + " "
            + (max == -1 ? "(??%)"
            : "(" + cur * 100 / (max == 0 ? 1 : max) + "%)");

    if (cur >= max && max != -1) {
      progress += " " + loc("done") + SEPARATOR;
      lastProgress = null;
    } else {
      lastProgress = progress;
    }

    out.append(progress);

    getOutputStream().print(out.toString());
    getOutputStream().flush();
  }
772793
def progress(self, p):
        '''
        
        '''
        self.task_stack[-1] = self.task_stack[-1]._replace(progress=p)
        self.progress_report()
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)
1091296
def progress(self, *restrictions, display=True):
        
        todo = self._jobs_to_do(restrictions)
        total = len(todo)
        remaining = len(todo - self.target)
        if display:
            print('%-20s' % self.__class__.__name__,
                  'Completed %d of %d (%2.1f%%)   %s' % (
                      total - remaining, total, 100 - 100 * remaining / (total+1e-12),
                      datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%d %H:%M:%S')), flush=True)
        return remaining, total
567515
def progress(self, *msg):
        
        label = colors.purple("Progress")
        self._msg(label, *msg)
640046
def update_progress(self, progress, prefix=''):
        
        total_length = 40

        if progress == 1.:
            sys.stderr.write('\r' + ' ' * (total_length + len(prefix) + 50))
            sys.stderr.write('\n')
            sys.stderr.flush()
        else:
            bar_length = int(round(total_length * progress))
            sys.stderr.write('\r%s [%s%s] %.1f %% '
                             % (prefix, '=' * bar_length,
                                ' ' * (total_length - bar_length),
                                progress * 100))
            sys.stderr.flush()