Replies: 2 comments
-
@bboymimi At the point, Bokeh is a generic plotting/eventing framework, that is suitable for higher level or more specialized projects to build upon. By and large, we do not have any specialized or schematized plots built-in. The only close contender for that is
It's also unclear to me that Bokeh does not already contain all the building blocks necessary to implement flamegraphs. From my quick look, it seems they are comprised of rects, labels, and can respond to events to zoom/filter. I think there are a variety of other avenues that would be more reaonable to explore:
cc @bokeh/dev for any additional thoughts |
Beta Was this translation helpful? Give feedback.
-
HoloViews should let you build such a plot out of Rectangle and Labels elements already, but I don't know how awkward that would be to write, whether there would be performance issues, or how easily you could set up the interactivity you wanted. Worth a try! If that's not practical I could imagine adding a flamegraph element to HoloViews, but even for HoloViews that's a pretty specialized type of graph, so to be considered it would need to be a tidy, tight implementation that does not require much maintenance. You should also consider just wrapping up an existing flamegraph component with Panel, which should pretty easily give you a usable Bokeh component. I don't think that will help you implement the drilldown interactivity you want, though. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Currently, the Bokeh framework is using heavily in our team to visualize the
performance analysis result[1][2][6][7](Please wait a while, it's slow to
open the file). Actually, it helps resolve the Bcache performance issue[8][9].
Thanks for all the fantastic works!
I'm considering using Bokeh in a more flexible context to show more
information with the captured data. I wonder if it's possible to generate
the flamegraph as a figure method. For example:
p.flamegraph(flamegraph.txt)
I've tried to use D3 flamegraph[3], which is implemented by Martin Spier[4].
However, it's hard to maintain as we need to modify the front-end template
when some graphs need to be added to the page. And also, a web server
is required to run to support the frontend framework. This greatly distracts
the original performance analysis work.
I wonder if it's possible to merge the D3 flamegraph into Bokeh(or any
flamegraph javascript framework). With the feature, for example, for a specific
date-time(dot A) having high CPU utilization, by clicking on the dot A, the
flamegraph can be popped out as a review window or opening a new page with
flamegraph, which implements by Bokeh. Currently, I think the workaround is to
open an svg file generated by Brendan Gregg's flamegraph tool. However, if
flamegraph can be a component inside Bokeh. It will be fantastic!
I have a quick look at the commit:
9611f34 Add stacked lines and directed areas (#8873)
It seems the implementation needs to be added to the folder:
bokehjs/src/lib/models/glyphs
And the draw is by using the WebGL. I'm confused and wonder if it's possible to
implement flamegraph inside Bokeh as my background is Linux kernel engineer and lacking
frontend knowledge. Any suggestion or effort estimation is welcomed. Thanks!
[1]. https://people.canonical.com/~gavinguo/flamegraph/summary.html
[2]. https://people.canonical.com/~gavinguo/flamegraph/summary_mem.html
[3]. https://github.com/bboymimi/easy-flamegraph/blob/master/src/components/FlameGraph/FlameGraph.jsx
[4]. https://github.com/Netflix/flamescope
[6]. https://people.canonical.com/~taodd/bcache-stats-master
[7]. https://people.canonical.com/~gavinguo/flamegraph/osd_write_op.html
[8]. https://docs.google.com/document/d/1AmbIEa_2MhB9bqhC3rfga9tp7n9YX9PLn0jSUxscVW0/edit
[9]. [01/20] bcache: consider the fragmentation when update the writeback rate
https://patchwork.kernel.org/project/linux-block/patch/20210210050742.31237-2-colyli@suse.de/
Beta Was this translation helpful? Give feedback.
All reactions