google / google/pprof

Nominate a specific, canonical extension for pprof files

Open
#992 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
9.3k
Forks
671
Avg merge
1d 11h
Merged PRs (30d)
10

Description

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:

```java
private static final ImmutableSet 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.