Skip to content

Show additional information in hover/elsewhere #539

@delins

Description

@delins

It would be very useful if speedscope could show additional information / metadata for each block. For instance, I've collected both call counts and duration for functions. I've written the data out in the stackcollapse format with the duration as weight, but to my knowledge there's no way to push call counts into the UI. Currently I have to go back and forth between the UI and the source data, which is time consuming.

I'm thinking this metadata could be either key-value or some tree structure to be as agnostic about the contents as possible. For instance, this would be very helpful:

Image

The metadata wouldn't be used in the algorithm to join blocks, it's purely added back in at the end. I know difficulties may arise when two blocks in the input are joined. The key-value pairs and/or trees could be joined but you lose origin information. Perhaps add some origin block identifier as a header in those cases?

Other use cases I can think of:

As tg-solidat points out just having the information in the hover pop up doesn't allow for copying, so it would be nice if the data was shown somewhere with the summary statistics pane as well.

In terms of file format, the easiest I can think of would be to define an extension to the stackcollapse format where whatever additional information comes after the weight. But a custom file format based on JSON would be great as well, as it's widely supported and would allow for text that needs escaping characters, newlines, etc

If such an "additional information" showing feature exists, other existing format parsers for speedscope could put the information they currently throw away from the source format in there as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions