[+] Debug mode

This commit is contained in:
Hykilpikonna
2021-11-27 21:44:18 -05:00
parent ecfe76a231
commit 770d4345c4
4 changed files with 41 additions and 20 deletions
+4 -3
View File
@@ -12,7 +12,7 @@ import json5
import numpy as np
from tabulate import tabulate
from constants import REPORT_DIR
from constants import REPORT_DIR, DEBUG
@dataclass
@@ -61,8 +61,9 @@ def debug(msg: object) -> None:
:param msg: Message
"""
caller = inspect.stack()[1].function
print(f'[DEBUG] {caller}: {msg}')
if DEBUG:
caller = inspect.stack()[1].function
print(f'[DEBUG] {caller}: {msg}')
def calculate_rate_delay(rate_limit: float) -> float: