ccfos / ccfos/huatuo

[功能建议]: Python 内存 Profiling 增强

Open
#331 6 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue profiling python
Dominant language
Go
Stars
1.1k
Forks
136
Avg merge
3d 16h
Merged PRs (30d)
18

Description

## 背景

huatuo 已初步支持 Python 内存 Profiling(memray 解码器),但 decoder.go 中存在多处 TODO,功能完整性有待完善。

## 需求描述

完善 Python 内存 Profiling 能力:

1. **完善 memray 解码器**:处理 decoder.go 中的多处 TODO 项
2. **行级分配定位**:支持精确到代码行的内存分配定位
3. **codeObject 元信息**:解析和展示 codeObject 的完整元信息(文件名、函数名、行号等)
4. **二分搜索优化**:对时间戳查找等场景采用二分搜索优化性能
5. **易用性优化**:完善错误处理、日志输出、数据格式兼容性

## 技术要求

- 保持与现有 memray 格式的兼容性
- 性能优化不引入回归问题

## 验收标准

- [ ] decoder.go 中的 TODO 全部解决
- [ ] 行级分配定位可用
- [ ] codeObject 元信息完整展示
- [ ] 性能优化生效

## 意向参与贡献

- [ ] 我有意向参与具体功能的开发实现并将代码贡献回到上游社区

Contributor guide

Open the contributing guide

Research direction

Start in decoder.go and inventory the existing memray decoder TODOs, then trace how decoded timestamps and codeObject metadata are consumed. Define the required line-level allocation output, metadata fields, error handling, logging, compatibility behavior, and binary-search performance checks before implementing. Done means all listed TODOs are resolved and the acceptance criteria work without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
observability-sre, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.