Skip to content

Commit

Permalink
[status] show time on thread completion
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Aug 31, 2024
1 parent 9e3fab1 commit 9979479
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions visidata/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ def __exit__(self, exc_type, exc_val, tb):
if elapsed_s(self.thread) < min_thread_time_s:
vd.threads.remove(self.thread)
else:
if self.thread.sheet:
if vd.options.disp_expert or vd.options.profile:
vd.status(f'[:bold]{self.thread.sheet.name[:32]}.{self.thread.name}[/] finished in {elapsed_s(self.thread):.1f}s')
if vd.options.profile:
self.thread.profile.dump_stats(f'{self.thread.name}.pyprof')

Expand Down

0 comments on commit 9979479

Please sign in to comment.