MCPcopy Index your code
hub / github.com/nodejs/node / PrintProgress

Method PrintProgress

tools/test.py:489–503  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

487 return str
488
489 def PrintProgress(self, name):
490 self.ClearLine(self.last_status_length)
491 elapsed = time.time() - self.start_time
492 status = self.templates['status_line'] % {
493 'passed': self.succeeded,
494 'remaining': (((self.total - self.remaining) * 100) // self.total),
495 'failed': len(self.failed),
496 'test': name,
497 'mins': int(elapsed) / 60,
498 'secs': int(elapsed) % 60
499 }
500 status = self.Truncate(status, 78)
501 self.last_status_length = len(status)
502 print(status, end='')
503 sys.stdout.flush()
504
505
506class ColorProgressIndicator(CompactProgressIndicator):

Callers 2

DoneMethod · 0.95
AboutToRunMethod · 0.95

Calls 6

TruncateMethod · 0.95
intFunction · 0.85
flushMethod · 0.65
printFunction · 0.50
ClearLineMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected