Update websocket_server.py

This commit is contained in:
Chris 2025-02-18 11:36:09 +08:00 committed by GitHub
parent 0489003dd4
commit 708ea3adf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,7 +66,7 @@ class WebSocketServer:
def _start_perf_monitor(self): def _start_perf_monitor(self):
async def print_stats(): async def print_stats():
while True: while True:
await asyncio.sleep(30) # 每5分钟输出一次 await asyncio.sleep(30) # 性能统计时间设置(秒)
summary = monitor.get_summary() summary = monitor.get_summary()
print("\n=== 模块性能统计 ===") print("\n=== 模块性能统计 ===")
for module, stats in summary.items(): for module, stats in summary.items():