MCPcopy
hub / github.com/microsoft/qlib / logt

Method logt

qlib/log.py:131–149  ·  view source on GitHub ↗

logt. Log the time of the inside code Parameters ---------- name : name show_start : show_start

(cls, name="", show_start=False)

Source from the content-addressed store, hash-verified

129 @classmethod
130 @contextmanager
131 def logt(cls, name="", show_start=False):
132 """logt.
133 Log the time of the inside code
134
135 Parameters
136 ----------
137 name :
138 name
139 show_start :
140 show_start
141 """
142 if show_start:
143 cls.timer_logger.info(f"{name} Begin")
144 cls.set_time_mark()
145 try:
146 yield None
147 finally:
148 pass
149 cls.log_cost_time(info=f"{name} Done")
150
151
152def set_log_with_config(log_config: Dict[Text, Any]):

Callers 12

test_handler_storageMethod · 0.80
test_cal_sam_minuteMethod · 0.80
data_cache_demo.pyFile · 0.80
__init__Method · 0.80
__init__Method · 0.80
setup_dataMethod · 0.80
fitMethod · 0.80
_run_proc_lMethod · 0.80
setup_dataMethod · 0.80
end_runMethod · 0.80
collectMethod · 0.80

Calls 3

set_time_markMethod · 0.80
log_cost_timeMethod · 0.80
infoMethod · 0.45

Tested by 2

test_handler_storageMethod · 0.64
test_cal_sam_minuteMethod · 0.64