refactor(managers): 重构单例管理器实现并优化代码结构
feat(ws_pool): 新增 WebSocket 连接池实现 perf(json): 使用 orjson 替代标准 json 库提升性能 style: 清理未使用的导入和冗余代码 docs: 更新架构文档和开发规范 test: 添加 WebSocket 连接池测试用例 fix(plugins): 修复自动审批插件 API 调用参数格式
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
import asyncio
|
||||
import time
|
||||
import pytest
|
||||
from typing import Optional
|
||||
|
||||
# 导入性能分析工具
|
||||
from core.utils.performance import (
|
||||
@@ -66,7 +65,6 @@ class TestProfileContextManager:
|
||||
"""测试同步代码的性能分析"""
|
||||
# 捕获标准输出
|
||||
import io
|
||||
import sys
|
||||
from contextlib import redirect_stdout
|
||||
|
||||
f = io.StringIO()
|
||||
@@ -254,7 +252,7 @@ if __name__ == "__main__":
|
||||
async_result = asyncio.run(test_async())
|
||||
slow_result = slow_func()
|
||||
|
||||
print(f"\n测试结果:")
|
||||
print("\n测试结果:")
|
||||
print(f"sync_result: {sync_result}")
|
||||
print(f"async_result: {async_result}")
|
||||
print(f"slow_result: {slow_result}")
|
||||
|
||||
Reference in New Issue
Block a user