当前位置:首页>python>W-Agent 一个生产级 Python 智能体开发框架

W-Agent 一个生产级 Python 智能体开发框架

  • 2026-07-02 16:36:01
W-Agent 一个生产级 Python 智能体开发框架

大家好,我是小皮。

Python 企业级智能体框架,提供完整的技术架构方案,支持 AOP、IOC、沙箱安全、弹性模式、可观测性等企业级特性。

项目地址:https://github.com/LuckyStar2456/W-Agent-FrameWork

📚 目录

  • 功能特性
  • 快速开始
  • 项目结构
  • 核心模块
  • 配置指南
  • 示例项目
  • 开发者指南
  • 文档
  • 贡献指南
  • 许可证

✨ 功能特性

特性
描述
AOP 面向切面编程
支持 AspectJ 切点表达式(execution、within、@annotation、bean、args),提供重试、断路器等切面实现
IOC 依赖注入
三级缓存、构造器/字段/setter 注入、@Autowired/@Qualifier 注解,支持组件扫描和自动装配
沙箱安全
Wasm/nsjail 沙箱、seccomp 过滤、资源限制,确保技能执行安全
弹性模式
重试(带退避)、断路器(CLOSED/OPEN/HALF_OPEN 状态)、超时控制,提高系统稳定性
可观测性
OpenTelemetry 集成、链路追踪、指标监控、健康检查,提供完整的可观测性解决方案
RAG 集成
向量检索(Redis/内存)、相似度搜索,支持文档存储和检索增强生成
配置热更新
动态配置管理、配置变更事件,支持运行时配置更新和属性绑定
事件总线
异步事件发布/订阅,支持事件驱动架构
生命周期管理
组件生命周期管理、优雅启动和关闭,支持依赖顺序管理
分布式锁
Redis 分布式锁实现,支持锁续期和超时控制
技能系统
可扩展的技能系统,支持技能注册和执行

🚀 快速开始

安装

# 从 PyPI 安装pip install wagent-framework# 安装可选依赖pip install wagent-framework[fastapi,langchain,redis,opentelemetry]# 从源码安装pip install -e .

创建你的第一个 Agent

import asynciofrom w_agent import BaseAgent, BeanFactory, AgentComponent@AgentComponent(name="hello_agent")classHelloAgent(BaseAgent):asyncdefarun(self, prompt: str) -> str:returnf"Hello, {prompt}!"asyncdefmain():# 创建 Bean 工厂    bean_factory = BeanFactory()# 注册 Agent    agent = HelloAgent()    bean_factory.register_bean("hello_agent", agent)# 使用 Agent    agent = await bean_factory.get_bean("hello_agent")    result = await agent.arun("World")    print(result)  # 输出: Hello, World!asyncio.run(main())

使用配置热更新

import asynciofrom w_agent import DynamicConfigManagerasyncdefmain():    config_manager = DynamicConfigManager()# 设置配置    config_manager.set("api_key""your-api-key")# 绑定配置到属性classMyService:def__init__(self):            self.api_key = None            config_manager.bind("api_key", self, "api_key")asyncdefon_config_change(self, key, new_value, old_value):            print(f"Config changed: {key} = {new_value}")    service = MyService()    print(service.api_key)  # 输出: your-api-key# 动态更新配置await config_manager.update_batch({"api_key""new-api-key"})    print(service.api_key)  # 输出: new-api-keyasyncio.run(main())

使用 AOP 切面编程

import asynciofrom w_agent import Retry, CircuitBreaker# 使用重试装饰器@Retry(max_attempts=3, delay=0.1, backoff=2.0)asyncdefunreliable_operation():    print("执行不稳定操作...")# 模拟失败raise Exception("临时失败")# 使用断路器@CircuitBreaker(failure_threshold=5, recovery_timeout=30.0)asyncdefprotected_operation():    print("执行受保护操作...")# 模拟失败raise Exception("服务不可用")asyncdefmain():try:await unreliable_operation()except Exception as e:        print(f"最终失败: {e}")asyncio.run(main())

使用事件总线

import asynciofrom w_agent import EventBus, Eventevent_bus = EventBus()@event_bus.on("user.created")asyncdefon_user_created(event):    print(f"User created: {event.payload}")@event_bus.on("user.updated")asyncdefon_user_updated(event):    print(f"User updated: {event.payload}")asyncdefmain():# 发布用户创建事件await event_bus.emit(Event("user.created", {"user_id"123"name""John"}))# 发布用户更新事件await event_bus.emit(Event("user.updated", {"user_id"123"name""John Doe"}))asyncio.run(main())

📁 项目结构

w_agent/├── aop/                    # 面向切面编程│   ├── aspects.py          # 切面实现(重试、断路器)│   ├── joinpoint.py        # 连接点│   ├── pointcut.py         # 切点表达式解析│   └── proxy_factory.py    # 代理工厂├── config/                 # 配置管理│   └── dynamic_config.py   # 动态配置├── container/              # 依赖注入容器│   ├── bean_factory.py     # Bean 工厂│   └── reflection_cache.py # 反射缓存├── core/                   # 核心功能│   ├── agent.py           # Agent 基类│   ├── decorators.py      # 装饰器│   ├── doctor.py          # 系统检查│   └── event_bus.py       # 事件总线├── deployment/             # 部署相关│   └── fastapi_depends.py  # FastAPI 依赖注入├── distributed/            # 分布式功能│   ├── lock.py            # 分布式锁│   └── lock_pool.py       # 锁池管理├── exceptions/             # 异常处理│   └── framework_errors.py # 框架错误定义├── lifecycle/              # 生命周期管理│   ├── graceful_shutdown.py # 优雅关闭│   ├── manager.py         # 生命周期管理器│   └── order.py           # 生命周期顺序├── observability/          # 可观测性│   ├── health.py          # 健康检查│   ├── logging.py         # 日志管理│   ├── metrics.py         # 指标监控│   └── tracing.py         # 链路追踪├── resilience/             # 弹性模式│   ├── bulkhead.py        # 隔离舱模式│   └── timeout.py         # 超时控制├── scanner/                # 组件扫描│   ├── cache.py           # 扫描缓存│   └── parallel_scanner.py # 并行扫描├── security/               # 安全相关│   └── mcp_auth.py        # MCP 认证├── skills/                # 技能系统│   ├── sandbox/           # 沙箱│   │   ├── nsjail_sandbox.py│   │   └── wasm_sandbox.py│   ├── signature.py       # 技能签名│   └── skill.py           # 技能基类├── testing/                # 测试工具│   └── mock_utils.py       # 模拟工具├── tools/                  # 工具类│   └── langchain_adapter.py # LangChain 适配器├── __init__.py            # 包初始化├── __main__.py            # 主入口└── cli.py                 # 命令行工具

🔧 核心模块

AOP 切面编程

AOP (Aspect-Oriented Programming) 允许你在不修改原有代码的情况下,为代码添加横切关注点。

from w_agent import AspectJPointcut, BeforeAdvice, AfterAdvice, AroundAdvice, ProxyFactory# 定义目标类classTarget:defdo_something(self, value):returnf"Result: {value}"# 创建通知execution_order = []asyncdefbefore_advice(joinpoint):    execution_order.append("before")asyncdefafter_advice(joinpoint, result):    execution_order.append("after")asyncdefaround_advice(joinpoint, proceed):    execution_order.append("around_before")    result = await proceed()    execution_order.append("around_after")return result# 创建代理proxy_factory = ProxyFactory()target = Target()advices = [    BeforeAdvice(before_advice),    AroundAdvice(around_advice),    AfterAdvice(after_advice)]proxy = proxy_factory.create_proxy(target, {"do_something": advices})# 调用方法result = await proxy.do_something("test")print(f"Result: {result}")print(f"Execution order: {execution_order}")

依赖注入

IOC (Inversion of Control) 容器提供了依赖注入功能,简化了组件之间的依赖管理。

from w_agent import BeanFactory, ServiceComponent, Autowired, Qualifier@ServiceComponent(name="user_repository")classUserRepository:defget_user(self, user_id):return {"id": user_id, "name""John"}@ServiceComponent(name="user_service")classUserService:    @Autowired    @Qualifier(name="user_repository")defset_repository(self, repository):        self.repository = repositorydefget_user(self, user_id):return self.repository.get_user(user_id)asyncdefmain():# 创建 Bean 工厂    bean_factory = BeanFactory()# 注册组件    repository = UserRepository()    bean_factory.register_bean("user_repository", repository)    service = UserService()    bean_factory.register_bean("user_service", service)# 自动注入依赖await bean_factory.autowire_all()# 使用服务    user = service.get_user(123)    print(f"User: {user}")asyncio.run(main())

事件总线

事件总线提供了异步事件发布/订阅机制,支持事件驱动架构。

from w_agent import EventBus, Event, ConfigChangedEventevent_bus = EventBus()# 订阅配置变更事件@event_bus.on("config_changed")asyncdefon_config_changed(event):    print(f"Config changed: {event.payload}")asyncdefmain():# 发布自定义事件await event_bus.emit(Event("custom_event", {"data""test"}))# 发布配置变更事件await event_bus.emit(ConfigChangedEvent(key="api_key", old_value="old", new_value="new"))asyncio.run(main())

生命周期管理

生命周期管理器负责组件的初始化和销毁,支持依赖顺序管理。

from w_agent import LifecycleManager, LifecycleOrder, PostConstruct, PreDestroyclassDatabaseService:    @PostConstruct(order=1)asyncdefinit_db(self):        print("初始化数据库连接")    @PreDestroy(order=1)asyncdefclose_db(self):        print("关闭数据库连接")classUserService:    @PostConstruct(order=2)asyncdefinit_service(self):        print("初始化用户服务")    @PreDestroy(order=2)asyncdefcleanup_service(self):        print("清理用户服务")asyncdefmain():# 创建生命周期管理器    lifecycle_manager = LifecycleManager()# 注册组件    db_service = DatabaseService()    lifecycle_manager.register(db_service, LifecycleOrder.INFRASTRUCTURE)    user_service = UserService()    lifecycle_manager.register(user_service, LifecycleOrder.SERVICE)# 执行初始化await lifecycle_manager.post_construct_all()# 执行销毁await lifecycle_manager.pre_destroy_all()asyncio.run(main())

配置管理

动态配置管理器支持配置热更新和属性绑定。

from w_agent import DynamicConfigManagerasyncdefmain():    config_manager = DynamicConfigManager()# 加载配置文件await config_manager.load_from_file("config.json")# 设置配置    config_manager.set("service.port"8080)    config_manager.set("service.host""localhost")# 绑定配置到对象classServiceConfig:def__init__(self):            self.port = None            self.host = None            config_manager.bind("service.port", self, "port")            config_manager.bind("service.host", self, "host")asyncdefon_config_change(self, key, new_value, old_value):            print(f"Config changed: {key} = {new_value}")    service_config = ServiceConfig()    print(f"Initial config: host={service_config.host}, port={service_config.port}")# 动态更新配置await config_manager.update_batch({"service.port"8081"service.host""0.0.0.0"})    print(f"Updated config: host={service_config.host}, port={service_config.port}")asyncio.run(main())

沙箱安全

沙箱提供了安全的技能执行环境,支持 Wasm 和 nsjail 沙箱。

from w_agent import WasmSkillSandbox, NsJailSkillSandbox, Skillfrom pathlib import Path# 创建技能skill = Skill(    name="test_skill",    description="Test skill",    scripts={"test": Path("test.py")})# 使用 Wasm 沙箱wasm_sandbox = WasmSkillSandbox()result = await wasm_sandbox.execute(skill, "test", {"name""World"})print(f"Wasm sandbox result: {result}")# 使用 nsjail 沙箱nsjail_sandbox = NsJailSkillSandbox()result = await nsjail_sandbox.execute(skill, "test", {"name""World"})print(f"NsJail sandbox result: {result}")

⚙️ 配置指南

可配置项一览

配置项
类型
默认值
描述
logging.level
string
"INFO"
日志级别
logging.format
string
"json"
日志格式
container.scan_paths
list
["."]
组件扫描路径
container.skip_paths
list
["pycache", ".git"]
跳过的扫描路径
sandbox.enabled
bool
true
是否启用沙箱
sandbox.type
string
"wasm"
沙箱类型:wasm/nsjail
resilience.retry.max_attempts
int
3
最大重试次数
resilience.retry.delay
float
0.1
重试延迟(秒)
resilience.retry.backoff
float
2.0
重试退避系数
resilience.circuit_breaker.failure_threshold
int
5
断路器失败阈值
resilience.circuit_breaker.recovery_timeout
float
30.0
断路器恢复超时(秒)
distributed.lock.redis.url
string
"redis://localhost:6379"
Redis 连接 URL
distributed.lock.redis.db
int
0
Redis 数据库编号
observability.tracing.enabled
bool
true
是否启用链路追踪
observability.tracing.exporter
string
"otlp"
追踪导出器
observability.metrics.enabled
bool
true
是否启用指标监控

配置文件

创建 config.json

{"logging": {"level""INFO","format""json"  },"container": {"scan_paths": ["src"],"skip_paths": ["__pycache__"".git"]  },"sandbox": {"enabled"true,"type""wasm"  },"resilience": {"retry": {"max_attempts"3,"delay"0.1,"backoff"2.0    },"circuit_breaker": {"failure_threshold"5,"recovery_timeout"30.0    }  }}

环境变量

环境变量优先级高于配置文件:

export W_AGENT_LOGGING_LEVEL=DEBUGexport W_AGENT_CONTAINER_SCAN_PATHS=src,componentsexport W_AGENT_SANDBOX_ENABLED=trueexport W_AGENT_RESILIENCE_RETRY_MAX_ATTEMPTS=5

📖 示例项目

基本 Agent 示例

查看 examples/basic_agent.py 获取基本 Agent 实现示例,展示了:

  • Agent 和 Service 组件的创建
  • 依赖注入
  • 配置绑定和热更新
  • 生命周期管理

聊天 Agent 示例

查看 chat-agent 目录获取完整的聊天智能体示例项目,包含:

  • Agent 实现
  • LLM 服务集成
  • 技能系统
  • RAG 检索增强
  • Redis/MySQL 集成
  • OpenTelemetry 可观测性
  • 系统健康检查

👨‍💻 开发者指南

核心概念

  1. Agent:智能体基类,所有智能体都继承自 BaseAgent
  2. Component:组件,使用 @AgentComponent@ServiceComponent 等注解标记
  3. Bean:由容器管理的组件实例
  4. Aspect:切面,用于横切关注点
  5. Event:事件,用于组件间通信
  6. Lifecycle:生命周期,管理组件的初始化和销毁
  7. Skill:技能,可被 Agent 调用的功能模块

开发流程

  1. 创建 Agent:继承 BaseAgent 并实现 arun 方法
  2. 创建服务:使用 @ServiceComponent 标记服务类
  3. 配置依赖:使用 @Autowired 和 @Qualifier 注入依赖
  4. 添加生命周期:使用 @PostConstruct 和 @PreDestroy 标记生命周期方法
  5. 添加 AOP 切面:使用 @Retry@CircuitBreaker 等注解添加切面
  6. 注册 Bean:使用 BeanFactory 注册组件
  7. 启动应用:执行 post_construct_all 初始化组件

最佳实践

  1. 组件设计:将功能拆分为小而专注的组件
  2. 依赖管理:使用依赖注入而非硬编码依赖
  3. 错误处理:使用 AOP 切面处理重试和断路器
  4. 配置管理:使用动态配置管理,避免硬编码配置
  5. 可观测性:添加适当的日志、指标和追踪
  6. 安全性:使用沙箱执行外部代码
  7. 测试:为组件编写单元测试和集成测试

常见问题

依赖注入失败

  • 确保组件已正确注册到 BeanFactory
  • 确保依赖项已注册且名称正确
  • 检查依赖类型是否匹配

配置不生效

  • 检查配置文件路径是否正确
  • 检查环境变量是否覆盖了配置文件
  • 检查配置键名是否正确

沙箱执行失败

  • 检查 Wasm 或 nsjail 是否已正确安装
  • 检查技能脚本是否符合沙箱要求
  • 检查资源限制是否合理

📄 文档

  • 架构设计文档:详细介绍框架架构和设计理念
  • API 文档:完整的 API 参考
  • 使用指南:详细的使用教程
  • 开发者文档:开发者级别的使用说明

感谢大家阅读,个人观点仅供参考,欢迎在评论区发表不同观点。


欢迎关注、分享、点赞、收藏、在看,我是微信公众号「PHP驿站」作者小皮。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 12:00:06 HTTP/2.0 GET : https://f.mffb.com.cn/a/495017.html
  2. 运行时间 : 0.142965s [ 吞吐率:6.99req/s ] 内存消耗:4,873.26kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=0d4bd275f7333a02f213f1091165e8b9
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000760s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000842s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000308s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000326s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000471s ]
  6. SELECT * FROM `set` [ RunTime:0.000208s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000553s ]
  8. SELECT * FROM `article` WHERE `id` = 495017 LIMIT 1 [ RunTime:0.001073s ]
  9. UPDATE `article` SET `lasttime` = 1783051206 WHERE `id` = 495017 [ RunTime:0.013117s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000750s ]
  11. SELECT * FROM `article` WHERE `id` < 495017 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001263s ]
  12. SELECT * FROM `article` WHERE `id` > 495017 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001222s ]
  13. SELECT * FROM `article` WHERE `id` < 495017 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002346s ]
  14. SELECT * FROM `article` WHERE `id` < 495017 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002931s ]
  15. SELECT * FROM `article` WHERE `id` < 495017 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.004643s ]
0.147001s