TimeLogger
logger = get_logger(__name__)
module-attribute
For the latency
If it is model, the name will start with model_xx, and it is a duration If it is transfer time, the name will start with transfer_xx, and it is a duration If it is just to log the timestamp, the name will start with ts_xx, and it is a timestamp
TimeLogger
Source code in Agent/utils/time_logger.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
log(profile, name)
staticmethod
Log the time taken to execute a block of code Args: profile (dict): The profile to store the time name (str): The name of the block
Returns:
Source code in Agent/utils/time_logger.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
log_task(task, name)
staticmethod
Log the time taken to execute a block of code Args: task (Task): The task to store the time name (str): The name of the block
Returns:
Source code in Agent/utils/time_logger.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|