Package for tracing Julia programs and writing those traces out as Chrome Trace Viewer JSON files.
using ChromeTracing
stream_trace("trace.json"; flush_interval=0.05)
@trace_event "startup" cat="app" args=Dict("msg" => "boot")
@trace_event "work" cat="compute" begin
# your code
sleep(0.01)
end
stop_streaming!() # flushes and finalizes trace.jsonOpen trace.json in chrome://tracing.
You can also drag-and-drop it into perfetto at https://ui.perfetto.dev.
julia --threads=auto --project=. example.jl