Skip to content

Commit

Permalink
chore: Refactor Step class to improve logging of step duration
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbobo2021 committed May 18, 2024
1 parent 53dc010 commit fa8058b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/chatmark/step.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from contextlib import AbstractContextManager
import time
from contextlib import AbstractContextManager

from lib.ide_service import IDEService


class Step(AbstractContextManager):
"""
Show a running step in the TUI.
Expand Down Expand Up @@ -30,7 +31,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
# close the step
end_time = time.time()
IDEService().ide_logging(
"debug",
f"Step {self.title} took {end_time - self.enter_time:.2f} seconds"
"debug", f"Step {self.title} took {end_time - self.enter_time:.2f} seconds"
)
print("\n```", flush=True)

0 comments on commit fa8058b

Please sign in to comment.