@jumar has joined the channel
@domagala.lukas did you try to visualize the flamegraph with Oz? I can't make it work although I think it should work after a superficial look:
(oz/view! [:div [:vega-lite (o/rooted-flamegraph 'my.ns/my-fn)]])
This doesn't show anything and also doesn't produce any error.I haven't yet, but I'm guessing it's going to be the same problem as in clerk, namely that the flame graph has no height / width set by default. Try assoc height /width before passing it on. I'll try it myself today, wanted to play with Oz anyway
Thanks for the tip but it didn't help. I don't know Oz much so might be something I'm missing there. I tried a few variations including this:
(oz/view! (assoc (o/rooted-flamegraph 'clojure-experiments.aws.logs/get-all-data)
:width 2000
:height 1200)
:mode :vega)
I just tried it with the newest version, it had two problems: transit can’t send namespace data + the width problem. so this is working for me:
(require '[cyrik.omni-trace.graph :as flame])
(oz/view! (assoc (flame/flamegraph (map #(update-in % [:meta :ns] (constantly nil))
(flame/flamedata @i/workspace 'advent.day1/run)))
:width 1200
:height 1200))
have you tried looking at the output of o/rooted-flamegraph or into the i/workspace directly? is there actually a trace?ah, what also seems to work nicely is to set the width on the element that contains the vega view, like this:
(oz/view! [:vega (o/rooted-flamegraph 'advent.day1/run) {:width 800 :height 800}])
I’m not sure yet if I want to include a default size for the flamegraph, but I’m guessing it’s easier to remove when you know what you want than to set it when you don’t understand why there is nothing to see.oh and i also just found a big bug in my rooted-flamegraph code … try using o/flamegraph instead for now. i’ll try to fix it today i really do need more tests
Thanks for looking into this. I'll try some more experiments tomorrow
rooted-flamegraph is fixed and I got it working with oz, here is the result: https://cyrik.github.io/day1.html. The code for that is in the dev folder.