mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Consolidate ProfilerMetadata and TimerMetadata.
There is no good reason to have the two types. This also means that the result of LayoutTask::profiler_metadata no longer borrows the LayoutTask, which I'll need later.
This commit is contained in:
parent
3780fb7fe0
commit
ff0acccc06
8 changed files with 28 additions and 37 deletions
|
@ -8,6 +8,7 @@ use heartbeats;
|
|||
use ipc_channel::ipc::{self, IpcReceiver};
|
||||
use profile_traits::energy::{energy_interval_ms, read_energy_uj};
|
||||
use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, TimerMetadata};
|
||||
use profile_traits::time::{TimerMetadataReflowType, TimerMetadataFrameType};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::BTreeMap;
|
||||
|
@ -31,8 +32,14 @@ impl Formattable for Option<TimerMetadata> {
|
|||
} else {
|
||||
url
|
||||
};
|
||||
let incremental = if meta.incremental { " yes" } else { " no " };
|
||||
let iframe = if meta.iframe { " yes" } else { " no " };
|
||||
let incremental = match meta.incremental {
|
||||
TimerMetadataReflowType::Incremental => " yes",
|
||||
TimerMetadataReflowType::FirstReflow => " no ",
|
||||
};
|
||||
let iframe = match meta.iframe {
|
||||
TimerMetadataFrameType::RootWindow => " yes",
|
||||
TimerMetadataFrameType::IFrame => " no ",
|
||||
};
|
||||
format!(" {:14} {:9} {:30}", incremental, iframe, url)
|
||||
},
|
||||
None =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue