Open KnorpelSenf opened 9 months ago
We may be able to better integrate the v8 profiler to remove a lot of the required steps to get a profiling trace.
For starters, as Matt pointed out we need to be able to acquire the profiling data from V8.
To do that we need to write out structures for types listed here: https://chromedevtools.github.io/devtools-protocol/tot/Profiler/#type-Profile This should be done in https://github.com/denoland/deno/blob/main/cli/cdp.rs.
Once we have that, it should be easy to collect a profile when a flag/env var is specified. Then the real fun begins where we need to provide a visualization for that data.
In order to analyse application performance, it can be useful to view a flamegraph, much like what
cargo flamegraph
is doing (https://github.com/flamegraph-rs/flamegraph). I suggest to havedeno flamegraph
that outputs a similar SVG file for the JavaScript side.Deno can already do benchmarks with
deno bench
and perhaps someone has a good idea how to integrate these two related features?