You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an idea a few days ago, what if FlameOn starts and stops tracing on Telemetry events? That would potentially allow removing mocks.
Since telemetry runs in the caller process, we have access to the current pid, and we can use the new :trace module with very minimal effort for flamegraphs (+ with heap alloc stats). Flamecharts (which is what FlameOn is doing now) would require extra effort. With :trace we can also cross process boundary and start tracing the processes that the current process "calls", right now FlameOn just shows sleep when something like GenServer.call is encountered.
The API could be just a telemetry event for which to start tracing, and an optional event for when to stop tracing.
ref=make_ref()# or something like FlameTrace.trace_once([:phoenix, :endpoint, :start]):telemetry.attach("trace-phx-on",[:phoenix,:endpoint,:start],&FlameOn.start_tracing/4,sample: 0.01,ref: ref):telemetry.detach("trace-phx-on")FlameOn.svg(FlameOn.report(ref))
👋
I had an idea a few days ago, what if FlameOn starts and stops tracing on Telemetry events? That would potentially allow removing mocks.
Since telemetry runs in the caller process, we have access to the current pid, and we can use the new
:trace
module with very minimal effort for flamegraphs (+ with heap alloc stats). Flamecharts (which is what FlameOn is doing now) would require extra effort. With:trace
we can also cross process boundary and start tracing the processes that the current process "calls", right now FlameOn just showssleep
when something likeGenServer.call
is encountered.The API could be just a telemetry event for which to start tracing, and an optional event for when to stop tracing.
Context:
trace
, can be used as example to implement flamegraphs with heap alloc statsThe text was updated successfully, but these errors were encountered: