grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
9.79k stars 583 forks source link

Add support for uploading pprof and collapsed format in adhoc mode #1317

Closed Rperry2174 closed 2 years ago

Rperry2174 commented 2 years ago

currently adhoc only supports uploading pyroscope JSON files, but we should make it so that it supports collapsed format and pprof format similar to flamegraph.com.

Currently, iirc the uploaded flamegraph does not "touch" the backend. In order to implement this properly the steps will likely be something like:

eh-am commented 2 years ago

I think it may be easier to just update the existing endpoint to take any arbitrary data, similar to flamegraph.com?

Something like this https://github.com/pyroscope-io/pyroscope/blob/main/pkg/adhoc/server/model.go#L42

converter, err := model.Converter()
fb, err := converter(m.Profile, name, u.maxNodes)