Open bjorn3 opened 5 years ago
Iiinteresting.
So format itself shows before/after values for each call stack?
Before implementing this (and if I'm being frank, I haven't been doing much work on speedscope in a while beyond bugfixes and don't know when I will again), I'd want to think about how this would be represented in speedscope's own file format.
It could be potentially really nice if there was some way of dropping a profile into speedscope then dropping a second one and having it diff with the first, which would entail not only supporting import of differential flame graphs, but also creating them from two existing profile objects.
How this would work for the left heavy view is reasonably clear to me, though how it would work for the time order view and sandwich view is less clear to me. Maybe it just shouldn't and only the left heavy view should be visible for differential flame graphs.
In any case, any of those changes + the changes to rendering are all pretty non-trivial changes to make in speedscope, so this would likely be quite a lot of work.
If someone else is interesting in tackling this, or tackling a subset of it, please let me know I can provide some guidance around some approaches you might take.
@jlfwong would you consider a bounty for this? After search this is the second most important feature for our organization, as we currently heavily rely on analyzing flame graph diffs.
I think unfortunately not. This is a lot of work that touches everything from the file format, to the way that application state is stored, to how profiles are stored, to the renderer. This is the kind of thing I would consider doing if I had a few weeks of free time to dig into, and I just don't have that for the foreseeable future.
http://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html
Format example: