5 Commits

Author SHA1 Message Date
xfy
8b382606df Merge branch 'lint-fix' - resolve sendfile.go conflict
Conflict: sendfile.go (!linux build tag) was incorrectly modified to
include linuxSendfile and getSocketFd functions which already exist
in sendfile_linux.go.

Resolution: Keep HEAD version (simple fallback returning ENOTSUP) as
Linux implementation is properly separated in sendfile_linux.go.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:26:48 +08:00
xfy
a10377f76d refactor(config): 提取常量并删除未使用代码
- 新增 DefaultPprofPath 常量替代硬编码路径
- 删除 validate.go 中未使用的 parseSize() 函数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 11:20:27 +08:00
xfy
3711b12fad docs(server/pprof): 添加详细函数文档注释,修复注释错字
- 为 pprof.go 和 pprof_impl.go 的所有公开函数添加文档注释
- 包含参数说明、返回值描述、使用示例和注意事项
- 修复注释错字"厉止"→"停止"
- 补充包级文档说明核心功能和用途

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-08 13:30:00 +08:00
xfy
d482e44bec refactor(server/pprof): 简化 switch 语句并移除未使用变量
- 将 switch 语句改为更简洁的 case 匹配形式
- 移除未使用的 cpuProfileWriter 变量
- 忽略 Flush/WriteTo 等无关的错误返回值

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-08 09:58:11 +08:00
xfy
766e9255fa feat(config,server,makefile): 新增 pprof 性能分析端点支持
- 新增 PprofConfig 配置结构,支持路径和 IP 访问控制
- 实现 PprofHandler 处理器,提供 CPU/heap/goroutine/block/mutex profile
- Makefile 新增 build-perf、build-pgo、pgo-collect 目标
- 支持 PGO (Profile-Guided Optimization) 构建

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-07 18:21:03 +08:00