百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tailor

> 编程语言
开源

Tailor 简体中文版说明 Tailor 是由 Xigua 视频 Android 团队开发的通用 hprof 截取和压缩工具。通过它,可以将大型 hprof 文件压缩为小型 hp…

756 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Tailor 简体中文版说明 Tailor 是由 Xigua 视频 Android 团队开发的通用 hprof 截取和压缩工具。通过它,可以将大型 hprof 文件压缩为小型 hp…

定制

Tailor 是一款通用的 hprof 截取和压缩工具,由 Xigua 视频 Android 团队开发。 通过它,可以在异常处理期间直接导出一个小型 hprof 文件。没有任何 文件中包含敏感信息。更重要的是,文件体积小,但数据相对较多。 完整,非常适合对 OOM 和其他异常进行离线分析

使用 Tailor 的应用

开始使用

步骤 1: 将 JitPack 仓库添加到构建文件中

gradle
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

步骤 2: 添加依赖项

gradle
dependencies {
    implementation 'com.github.bytedance:tailor:1.1.6'
}

步骤 3: 添加简单使用的代码

java
if (e instanceof java.lang.OutOfMemoryError) {
    String path = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "mini.hprof";
    try {
        Tailor.dumpHprofData(path, true);
    } catch (IOException ex) {
        ex.printStackTrace();
    }
}
java
// Crop and compress the existing hprof files directly
Tailor.cropHprofData(source, target, true);

步骤 4: 上传数据

bash
## !!! App needs to implement upload logic by itself

步骤 5: 处理数据 (Python 版本 >= 3.5)

bash
## Data recovery
python3 library/src/main/python/decode.py -i mini.hprof -o target.hprof
bash
## Hprof verify
python3 library/src/main/python/verify.py -i source.hprof
bash
## Crop and compress
python3 library/src/main/python/encode.py -i source.hprof -o mini.hprof

Extra

  1. Android Camera 内存问题分析
  2. 西瓜视频稳定性治理体系建设一:Tailor 原理及实践
  3. 西瓜视频稳定性治理体系建设二:Raphael 原理及实践

简体中文版说明 >>>

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言