Disable the profiler if the number of disable requests matches the number of enable requests.
(self)
| 780 | self.enable_count += 1 |
| 781 | |
| 782 | def disable_by_count(self): |
| 783 | """ Disable the profiler if the number of disable requests matches the |
| 784 | number of enable requests. |
| 785 | """ |
| 786 | if self.enable_count > 0: |
| 787 | self.enable_count -= 1 |
| 788 | if self.enable_count == 0: |
| 789 | self.disable() |
| 790 | |
| 791 | def trace_memory_usage(self, frame, event, arg): |
| 792 | """Callback for sys.settrace""" |
no test coverage detected