Show More
@@ -630,6 +630,30 python-profiler package from non-free.""") | |||
|
630 | 630 | return stats |
|
631 | 631 | |
|
632 | 632 | def _run_with_debugger(self, code, code_ns, break_point, filename): |
|
633 | """ | |
|
634 | Run `code` in debugger with a break point. | |
|
635 | ||
|
636 | Parameters | |
|
637 | ---------- | |
|
638 | code : str | |
|
639 | Code to execute. | |
|
640 | code_ns : dict | |
|
641 | A namespace in which `code` is executed. | |
|
642 | break_point : str | |
|
643 | Line number in the file specified by `filename` argument | |
|
644 | or a string in the format ``file:line``. In the latter | |
|
645 | case, `filename` is ignored. | |
|
646 | See also :func:`.parse_breakpoint`. | |
|
647 | filename : str | |
|
648 | Path to the file in which break point is specified. | |
|
649 | ||
|
650 | Raises | |
|
651 | ------ | |
|
652 | UsageError | |
|
653 | If no meaningful break point is given by `break_point` and | |
|
654 | `filename`. | |
|
655 | ||
|
656 | """ | |
|
633 | 657 | deb = debugger.Pdb(self.shell.colors) |
|
634 | 658 | # reset Breakpoint state, which is moronically kept |
|
635 | 659 | # in a class |
@@ -675,6 +699,17 python-profiler package from non-free.""") | |||
|
675 | 699 | |
|
676 | 700 | @staticmethod |
|
677 | 701 | def _run_with_timing(run, nruns): |
|
702 | """ | |
|
703 | Run function `run` and print timing information. | |
|
704 | ||
|
705 | Parameters | |
|
706 | ---------- | |
|
707 | run : callable | |
|
708 | Any callable object which takes no argument. | |
|
709 | nruns : int | |
|
710 | Number of times to execute `run`. | |
|
711 | ||
|
712 | """ | |
|
678 | 713 | twall0 = time.time() |
|
679 | 714 | if nruns == 1: |
|
680 | 715 | t0 = clock2() |
General Comments 0
You need to be logged in to leave comments.
Login now