Open itamarst opened 4 years ago
Yup, I completely agree with you! We started working out some of the API over in https://github.com/jonhoo/inferno/issues/30, but no great need ever arose (since the bottleneck is usually in the collection tool anyway) so it never got pushed very far. If you want to pick it up though, I'd be happy to review a PR!
Ah, cool. I already have my own collapsing code, so I would probably just focus on splitting up flamegraph generation.
Hi,
I am attempting to embed source code in my flamegraphs, basically to have inline tracebacks/callstacks, and... it's a little tricky. The requirement for text formatting means I need to escape semicolons, white space apparently needs to be trimmed, numbers at the end of a line confuse it I think...
There's also the waste of time memory of taking in-memory objects, turning them into strings, and then parsing them again.
It would be good to have a structured API for creating flamegraphs, in addition to the existing line-of-text parsing API.