mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
Add depth case
This commit is contained in:
parent
caf1e1a63a
commit
c39a68760d
1 changed files with 4 additions and 3 deletions
|
|
@ -310,9 +310,10 @@ class Tracer:
|
|||
self.target_frames.discard(calling_frame)
|
||||
self.frame_to_local_reprs.pop(calling_frame, None)
|
||||
|
||||
duration = datetime_module.datetime.now() - self.start_time
|
||||
now_string = pycompat.timedelta_isoformat(duration, timespec='microseconds')
|
||||
self.write('Total elapsed time: {now_string}'.format(**locals()))
|
||||
if thread_global.depth == -1:
|
||||
duration = datetime_module.datetime.now() - self.start_time
|
||||
now_string = pycompat.timedelta_isoformat(duration, timespec='microseconds')
|
||||
self.write('Total elapsed time: {now_string}'.format(**locals()))
|
||||
|
||||
def _is_internal_frame(self, frame):
|
||||
return frame.f_code.co_filename == Tracer.__enter__.__code__.co_filename
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue