# cachegrind_to_tsv **Repository Path**: Ultron2018/cachegrind_to_tsv ## Basic Information - **Project Name**: cachegrind_to_tsv - **Description**: 将PHP 性能分析文件 Valgrind的Cachegrind输出转换为TSV格式,便于数据分析与可视化。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-10 - **Last Updated**: 2026-07-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Cachegrind 在线解析工具 上传 `cachegrind.out.*` 性能剖析文件,在线解析并导出为 TSV / JSON / TXT 格式,支持 AI 智能分析性能瓶颈与对话。 ## 快速启动 ```bash # 1. 复制配置并填入 API Key cp config.example.py config.py # 编辑 config.py 填入你的 NVIDIA API Key # 2. 启动 python app.py ``` 或双击 `webui.bat`,打开浏览器访问 `http://127.0.0.1:5001`。 ## 功能特性 - **文件上传**:支持拖拽或点击选择 `.out` / `.gz` 文件 - **数据解析**:自动解析 events、file、function、calls 等结构,展示摘要统计、文件函数树、行级数据预览 - **格式导出**:一键下载 TSV / JSON / TXT 三种格式 - **AI 分析**:接入 NVIDIA GPT OSS 120B 大模型,自动识别业务热点函数,分析性能瓶颈并给出优化建议 - **AI 对话**:支持多轮连续对话,上下文保持 - **历史记录**:所有会话(解析数据 + AI 聊天记录)持久化存储,支持查看、切换、删除 ## 技术栈 - Python / Flask 后端 - Bootstrap 5 前端 - NVIDIA API(`openai/gpt-oss-120b`) ## 项目结构 ``` ├── app.py # Flask 应用入口,路由与 API ├── cachegrind_parser.py # 核心解析器与导出函数 ├── data/ # 会话数据与聊天记录存储目录 ├── templates/index.html # Web 界面 ├── static/style.css # 样式 └── webui.bat # Windows 快捷启动脚本 ```