mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #10694 - fitzgen:profile-traces-to-file, r=SimonSapin
Add a method for dumping profiles as self-contained HTML w/ timeline visualization 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 Gantt-chart style timeline. Example output HTML file: http://media.fitzgeraldnick.com/dumping-grounds/trace-reddit.html Mostly I made this because I wanted to see what kind of data the profiler has, and thought that this might be useful for others as well. I'm happy to add tests if we can figure out how to integrate them into CI, but I'm not sure how that would work. Thoughts? <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10694) <!-- Reviewable:end -->
This commit is contained in:
commit
b8e2fa58d6
17 changed files with 758 additions and 11 deletions
|
@ -7,7 +7,7 @@ use profile_traits::time::ProfilerMsg;
|
|||
|
||||
#[test]
|
||||
fn time_profiler_smoke_test() {
|
||||
let chan = time::Profiler::create(None);
|
||||
let chan = time::Profiler::create(None, None);
|
||||
assert!(true, "Can create the profiler thread");
|
||||
|
||||
chan.send(ProfilerMsg::Exit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue