refactor: 移除重复的性能日志输出以简化日志记录
This commit is contained in:
1 parent
cc2d81c9ad
commit
238241b0dc
1 file changed
+50
-45
@@ -779,15 +779,16 @@ def get_fudai_contain(analyser, renwu: int = 2) -> Tuple[str, str, int, int, flo
|
||||
dur = round((time.time() - start) * 1000, 1)
|
||||
with perf_task_lock:
|
||||
perf_task_durations["ocr_task_list"] = dur
|
||||
try:
|
||||
analyser._log_kv(
|
||||
"性能",
|
||||
"并行OCR子任务单项耗时(ms)",
|
||||
field="task_list",
|
||||
duration_ms=dur,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# 移除单独的性能日志输出,避免日志重复
|
||||
# try:
|
||||
# analyser._log_kv(
|
||||
# "性能",
|
||||
# "并行OCR子任务单项耗时(ms)",
|
||||
# field="task_list",
|
||||
# duration_ms=dur,
|
||||
# )
|
||||
# except Exception:
|
||||
# pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -844,15 +845,16 @@ def get_fudai_contain(analyser, renwu: int = 2) -> Tuple[str, str, int, int, flo
|
||||
dur = round((time.time() - start) * 1000, 1)
|
||||
with perf_task_lock:
|
||||
perf_task_durations["ocr_content"] = dur
|
||||
try:
|
||||
analyser._log_kv(
|
||||
"性能",
|
||||
"并行OCR子任务单项耗时(ms)",
|
||||
field="content",
|
||||
duration_ms=dur,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# 移除单独的性能日志输出,避免日志重复
|
||||
# try:
|
||||
# analyser._log_kv(
|
||||
# "性能",
|
||||
# "并行OCR子任务单项耗时(ms)",
|
||||
# field="content",
|
||||
# duration_ms=dur,
|
||||
# )
|
||||
# except Exception:
|
||||
# pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -880,15 +882,16 @@ def get_fudai_contain(analyser, renwu: int = 2) -> Tuple[str, str, int, int, flo
|
||||
dur = round((time.time() - start) * 1000, 1)
|
||||
with perf_task_lock:
|
||||
perf_task_durations["ocr_countdown_mm"] = dur
|
||||
try:
|
||||
analyser._log_kv(
|
||||
"性能",
|
||||
"并行OCR子任务单项耗时(ms)",
|
||||
field="countdown_mm",
|
||||
duration_ms=dur,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# 移除单独的性能日志输出,避免日志重复
|
||||
# try:
|
||||
# analyser._log_kv(
|
||||
# "性能",
|
||||
# "并行OCR子任务单项耗时(ms)",
|
||||
# field="countdown_mm",
|
||||
# duration_ms=dur,
|
||||
# )
|
||||
# except Exception:
|
||||
# pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -916,15 +919,16 @@ def get_fudai_contain(analyser, renwu: int = 2) -> Tuple[str, str, int, int, flo
|
||||
dur = round((time.time() - start) * 1000, 1)
|
||||
with perf_task_lock:
|
||||
perf_task_durations["ocr_countdown_ss"] = dur
|
||||
try:
|
||||
analyser._log_kv(
|
||||
"性能",
|
||||
"并行OCR子任务单项耗时(ms)",
|
||||
field="countdown_ss",
|
||||
duration_ms=dur,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# 移除单独的性能日志输出,避免日志重复
|
||||
# try:
|
||||
# analyser._log_kv(
|
||||
# "性能",
|
||||
# "并行OCR子任务单项耗时(ms)",
|
||||
# field="countdown_ss",
|
||||
# duration_ms=dur,
|
||||
# )
|
||||
# except Exception:
|
||||
# pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -964,15 +968,16 @@ def get_fudai_contain(analyser, renwu: int = 2) -> Tuple[str, str, int, int, flo
|
||||
dur = round((time.time() - start) * 1000, 1)
|
||||
with perf_task_lock:
|
||||
perf_task_durations["ocr_value"] = dur
|
||||
try:
|
||||
analyser._log_kv(
|
||||
"性能",
|
||||
"并行OCR子任务单项耗时(ms)",
|
||||
field="value",
|
||||
duration_ms=dur,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# 移除单独的性能日志输出,避免日志重复
|
||||
# try:
|
||||
# analyser._log_kv(
|
||||
# "性能",
|
||||
# "并行OCR子任务单项耗时(ms)",
|
||||
# field="value",
|
||||
# duration_ms=dur,
|
||||
# )
|
||||
# except Exception:
|
||||
# pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in new issue
Block a user