Skip to content

Commit

Permalink
Update test execution time debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
mtache committed Aug 8, 2023
1 parent 5052085 commit b3d279c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions anta/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ def format_td(seconds: float, digits: int = 3) -> str:
if self.result.result != "unset":
return self.result

collect_time = time.time()
self.logger.debug(f"Collecting commands took {format_td(collect_time-start_time)}")

try:
if cmds := self.get_failed_commands():
self.result.is_error(
Expand All @@ -312,8 +309,8 @@ def format_td(seconds: float, digits: int = 3) -> str:
anta_log_exception(e, message, self.logger)
self.result.is_error(exc_to_str(e))

test_time = time.time()
self.logger.debug(f"Executing test took {format_td(test_time-start_time)}")
test_duration = time.time() - start_time
self.logger.debug(f"Executing test {self.name} on device {self.device.name} took {format_td(test_duration)}")

AntaTest.update_progress()
return self.result
Expand Down

0 comments on commit b3d279c

Please sign in to comment.