(self, name_size, source, call_dict, arrow="->")
| 478 | print(" "*name_size + " ncalls tottime cumtime", file=self.stream) |
| 479 | |
| 480 | def print_call_line(self, name_size, source, call_dict, arrow="->"): |
| 481 | print(func_std_string(source).ljust(name_size) + arrow, end=' ', file=self.stream) |
| 482 | if not call_dict: |
| 483 | print(file=self.stream) |
| 484 | return |
| 485 | clist = sorted(call_dict.keys()) |
| 486 | indent = "" |
| 487 | for func in clist: |
| 488 | name = func_std_string(func) |
| 489 | value = call_dict[func] |
| 490 | if isinstance(value, tuple): |
| 491 | nc, cc, tt, ct = value |
| 492 | if nc != cc: |
| 493 | substats = '%d/%d' % (nc, cc) |
| 494 | else: |
| 495 | substats = '%d' % (nc,) |
| 496 | substats = '%s %s %s %s' % (substats.rjust(7+2*len(indent)), |
| 497 | f8(tt), f8(ct), name) |
| 498 | left_width = name_size + 1 |
| 499 | else: |
| 500 | substats = '%s(%r) %s' % (name, value, f8(self.stats[func][3])) |
| 501 | left_width = name_size + 3 |
| 502 | print(indent*left_width + substats, file=self.stream) |
| 503 | indent = " " |
| 504 | |
| 505 | def print_title(self): |
| 506 | print(' ncalls tottime percall cumtime percall', end=' ', file=self.stream) |
no test coverage detected