优化:推理性能日志改为周期汇总输出
This commit is contained in:
@@ -222,15 +222,6 @@ class StructuredLogger:
|
||||
duration_ms: Optional[float] = None, **tags):
|
||||
"""记录性能指标"""
|
||||
self._performance_logger.record(metric_name, value, tags)
|
||||
|
||||
perf_data = {
|
||||
"metric": metric_name,
|
||||
"value": value,
|
||||
"duration_ms": duration_ms,
|
||||
"tags": tags
|
||||
}
|
||||
|
||||
self.info(f"性能指标: {metric_name} = {value}", **perf_data)
|
||||
|
||||
def log_inference_latency(self, latency_ms: float, batch_size: int = 1):
|
||||
"""记录推理延迟"""
|
||||
|
||||
Reference in New Issue
Block a user