Add a method for dumping self-contained HTML timeline profiles

This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
This commit is contained in:
Nick Fitzgerald 2016-04-16 11:48:23 -07:00
parent 311dd0f930
commit 9fbb5c720e
17 changed files with 758 additions and 11 deletions

View file

@ -116,7 +116,8 @@ impl Browser {
let (compositor_proxy, compositor_receiver) =
window.create_compositor_channel();
let supports_clipboard = window.supports_clipboard();
let time_profiler_chan = profile_time::Profiler::create(opts.time_profiler_period);
let time_profiler_chan = profile_time::Profiler::create(opts.time_profiler_period,
opts.time_profiler_trace_path.clone());
let mem_profiler_chan = profile_mem::Profiler::create(opts.mem_profiler_period);
let devtools_chan = opts.devtools_port.map(|port| {
devtools::start_server(port)