Skip to content

Commit e408067

Browse files
committed
✨ feat(core): added crypto controller times on debug
1 parent d4562de commit e408067

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crypto_controller/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
import argparse
44
import logging
5+
import time
56
from logging.handlers import RotatingFileHandler
67
import shutil
78
import hashlib
@@ -653,6 +654,8 @@ def main():
653654
"""
654655
Main function to execute the Crypto Controller operations.
655656
"""
657+
start_time = time.time()
658+
656659
args = parse_arguments()
657660
configure_logger(args.log_level)
658661

@@ -712,10 +715,12 @@ def main():
712715

713716
elif operation == "status":
714717
crypto.get_status()
715-
716718
except Exception as error:
717719
logger.error(f"Operation '{args.operation}' failed: {error}", exc_info=True)
718-
sys.exit(1)
720+
finally:
721+
end_time = time.time()
722+
time_elapsed = end_time - start_time
723+
logger.debug(f"End. Took: {time_elapsed:.4f} seconds")
719724

720725

721726
if __name__ == "__main__":

0 commit comments

Comments
 (0)