pyroscope
pyroscope copied to clipboard
Support drag-and-drop for pprof in adhoc mode
Currently in adhoc mode there is the ability to drag and drop a JSON file and see the resulting flamegraph. However, currently dragging and dropping a pprof file is not supported

We should add support for this where the flow from a UX perspective is exactly the same. There will have to be some use of the backend.
I think the following approach would work best to support D&D for external formats (both pprof and collapsed):
- When a file is D&D, the file uploader uploads the file to the
/api/adhoc/v1/uploadendpoint. - The API endpoint returns a profile in native JSON format if possible, or an error otherwise.
This will cover both the single and comparison views. For diff view, we need a bit of additional work:
- Once we have both base and diff profiles (either from the file selector or from file upload, following the procedure described above),
the adhoc diff component uploads both profiles to the
/api/adhoc/v1/upload-diffendpoint. - The API endpoint returns a diff profile in native JSON if possible, or an error otherwise.