Nominate a specific, canonical extension for pprof files

未关闭
#992 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
42/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
go

调研方向

使用 PerfettoMatchUtil.java 作为参考示例,然后查找当前使用 .pb 或 .pb.gz 示例的 pprof 文档。将相关示例更新为建议的 .pprof 和 .pprof.gz 扩展名,并在文档始终将它们作为规范且具有区分性的扩展名呈现时标记为完成。

由索引模型根据 Issue 内容生成。

描述

Hi, over on internal bug b/487062289 I'm working on benchmarks that output a .pprof file into sponge.

I'd like to have a button where you can click from the benchmark results to go to the pprof web UI. We already have this for Perfetto, it's nice.

I need to match for pprof files. For Perfetto, we have a PerfettoMatchUtil.java:

  private static final ImmutableSet<String> PERFETTO_EXTENSIONS =
      ImmutableSet.of(
          ".pftrace.gz", // UTP Perfetto Plugin
          ".pftrace",
          "_perfetto.pb.gz",
          "_perfetto.pb",
          ".perfetto-trace.gz", // Extension used in Perfetto docs
          ".perfetto-trace");

It's a bit of a mess (indicating they could have chosen a canonical extension earlier), but it works.

I'd like a canonical, distinguishing file extension for pprof profiles. But I need a file extension matcher that doesn't give me too many false positives.

There's a lot of talk in pprof about outputting .pb and .pb.gz. These are perhaps canonical, but not distinct from the myriad other wireformat protocol buffer formats.

Not distinct enough to offer a 'open in pprof' link from generic testing infrastructure; they'd probably have too many false positives.

I propose we just declare that pprof files canonically use extensions:

  • foo.pprof
  • foo.pprof.gz

And we update the docs that talk about .pb .pb.gz to use these as examples.

Thoughts?

主要语言
Go
星标
9.3k
派生
687
平均合并
2 天 2 小时
30 天内合并 PR
9

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google/pprof 的其他 Issue

查看 google/pprof 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。