Skip to content

Nominate a specific, canonical extension for pprof files #992

@mhansen

Description

@mhansen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions