jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.59k stars 246 forks source link

FeatureRequest: memory chart #245

Open guettli opened 4 years ago

guettli commented 4 years ago

It would be very nice if speedscope would visualize the memory usage, too.

Of course optional. But if the value (memory usage of process) would be available, it would be nice to see it.

What do you think?

jlfwong commented 4 years ago

Most of the kinds of profile formats that speedscope ingests don't contain memory information at all. The Chrome profiles probably do, though the way they're formatted is likely heap size, which would be a line chart, which is a visualization format that speedscope doesn't have at all.

Allocation profiles can be formatted as flamegraphs if callstack information is included with each allocation (e.g. this is sort-of supported for Instruments) https://github.com/jlfwong/speedscope/wiki/Importing-from-Instruments.app#importing-via-deep-copy).

There are lots of different ways of displaying memory usage, but I'm guessing you're talking about the line chart variety?

I think before tackling this, I'd want to tackle #117. Then there would be a bunch of additional work to allow each visualization track to contain a different kind of visualization (e.g. line charts for memory usage, waterfall graphs for network requests or input displays).

Both #117 and the follow-up work to add additional kinds of visualizations is a non-trivial amount of work that if I'm being blunt I don't have specific motivation to pursue at the moment. If you'd like to try doing it yourself, I can provide pointers for where you might start, though I'm also not promising that I'll have the bandwidth to review and merge something of that scale of change since it would require changes nearly everywhere in the codebase.

guettli commented 4 years ago

Thank you for being open to pull-request. I am not JS expert. But maybe someone else has enough time and wisdom.