mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
replacing commas with tabs; changing from CSV to TSV profiling
This commit is contained in:
parent
051a749e0d
commit
7591e1327a
2 changed files with 7 additions and 7 deletions
|
@ -47,7 +47,7 @@ impl Formattable for Option<TimerMetadata> {
|
||||||
TimerMetadataFrameType::RootWindow => "yes",
|
TimerMetadataFrameType::RootWindow => "yes",
|
||||||
TimerMetadataFrameType::IFrame => "no",
|
TimerMetadataFrameType::IFrame => "no",
|
||||||
};
|
};
|
||||||
format!(" {}, {}, {}", incremental, iframe, url)
|
format!(" {}\t{}\t{}", incremental, iframe, url)
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
/* The profiling output is the terminal */
|
/* The profiling output is the terminal */
|
||||||
|
@ -71,7 +71,7 @@ impl Formattable for Option<TimerMetadata> {
|
||||||
None => {
|
None => {
|
||||||
match *output {
|
match *output {
|
||||||
Some(OutputOptions::FileName(_)) => {
|
Some(OutputOptions::FileName(_)) => {
|
||||||
format!(" {}, {}, {}", " N/A", " N/A", " N/A")
|
format!(" {}\t{}\t{}", " N/A", " N/A", " N/A")
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
format!(" {:14} {:9} {:30}", " N/A", " N/A", " N/A")
|
format!(" {:14} {:9} {:30}", " N/A", " N/A", " N/A")
|
||||||
|
@ -336,8 +336,8 @@ impl Profiler {
|
||||||
Error::description(&e)),
|
Error::description(&e)),
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
};
|
};
|
||||||
write!(file, "_category_, _incremental?_, _iframe?_, _url_, _mean (ms)_, _median (ms)_, _min (ms)_, \
|
write!(file, "_category_\t_incremental?_\t_iframe?_\t_url_\t_mean (ms)_\t\
|
||||||
_max (ms)_, _events_\n").unwrap();
|
_median (ms)_\t_min (ms)_\t_max (ms)_\t_events_\n").unwrap();
|
||||||
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
|
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
|
||||||
data.sort_by(|a, b| {
|
data.sort_by(|a, b| {
|
||||||
if a < b {
|
if a < b {
|
||||||
|
@ -353,7 +353,7 @@ impl Profiler {
|
||||||
data[data_len / 2],
|
data[data_len / 2],
|
||||||
data.iter().fold(f64::INFINITY, |a, &b| a.min(b)),
|
data.iter().fold(f64::INFINITY, |a, &b| a.min(b)),
|
||||||
data.iter().fold(-f64::INFINITY, |a, &b| a.max(b)));
|
data.iter().fold(-f64::INFINITY, |a, &b| a.max(b)));
|
||||||
write!(file, "{}, {}, {:15.4}, {:15.4}, {:15.4}, {:15.4}, {:15}\n",
|
write!(file, "{}\t{}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15}\n",
|
||||||
category.format(&self.output), meta.format(&self.output),
|
category.format(&self.output), meta.format(&self.output),
|
||||||
mean, median, min, max, data_len).unwrap();
|
mean, median, min, max, data_len).unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,9 +539,9 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
||||||
opts.optopt("s", "size", "Size of tiles", "512");
|
opts.optopt("s", "size", "Size of tiles", "512");
|
||||||
opts.optopt("", "device-pixel-ratio", "Device pixels per px", "");
|
opts.optopt("", "device-pixel-ratio", "Device pixels per px", "");
|
||||||
opts.optopt("t", "threads", "Number of paint threads", "1");
|
opts.optopt("t", "threads", "Number of paint threads", "1");
|
||||||
opts.optflagopt("p", "profile", "Time profiler flag and either a CSV output filename \
|
opts.optflagopt("p", "profile", "Time profiler flag and either a TSV output filename \
|
||||||
OR an interval for output to Stdout (blank for Stdout with interval of 5s)", "10 \
|
OR an interval for output to Stdout (blank for Stdout with interval of 5s)", "10 \
|
||||||
OR time.csv");
|
OR time.tsv");
|
||||||
opts.optflagopt("", "profiler-trace-path",
|
opts.optflagopt("", "profiler-trace-path",
|
||||||
"Path to dump a self-contained HTML timeline of profiler traces",
|
"Path to dump a self-contained HTML timeline of profiler traces",
|
||||||
"");
|
"");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue