diff options
author | Rohit Zambre <RZ13@dhcp-v058-081.mobile.uci.edu> | 2016-05-19 15:07:18 -0700 |
---|---|---|
committer | Rohit Zambre <RZ13@dhcp-v058-081.mobile.uci.edu> | 2016-05-19 15:07:18 -0700 |
commit | 7591e1327acab2d375bb20742ae4ba620f4d2d72 (patch) | |
tree | decae8db46dae989299c60979078bfd12e52649e | |
parent | 051a749e0d0ff298a3cbce8c6284386dc0d67f24 (diff) | |
download | servo-7591e1327acab2d375bb20742ae4ba620f4d2d72.tar.gz servo-7591e1327acab2d375bb20742ae4ba620f4d2d72.zip |
replacing commas with tabs; changing from CSV to TSV profiling
-rw-r--r-- | components/profile/time.rs | 10 | ||||
-rw-r--r-- | components/util/opts.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/components/profile/time.rs b/components/profile/time.rs index 487b9d8905b..6498f85b30b 100644 --- a/components/profile/time.rs +++ b/components/profile/time.rs @@ -47,7 +47,7 @@ impl Formattable for Option<TimerMetadata> { TimerMetadataFrameType::RootWindow => "yes", TimerMetadataFrameType::IFrame => "no", }; - format!(" {}, {}, {}", incremental, iframe, url) + format!(" {}\t{}\t{}", incremental, iframe, url) }, _ => { /* The profiling output is the terminal */ @@ -71,7 +71,7 @@ impl Formattable for Option<TimerMetadata> { None => { match *output { 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") @@ -336,8 +336,8 @@ impl Profiler { Error::description(&e)), Ok(file) => file, }; - write!(file, "_category_, _incremental?_, _iframe?_, _url_, _mean (ms)_, _median (ms)_, _min (ms)_, \ - _max (ms)_, _events_\n").unwrap(); + write!(file, "_category_\t_incremental?_\t_iframe?_\t_url_\t_mean (ms)_\t\ + _median (ms)_\t_min (ms)_\t_max (ms)_\t_events_\n").unwrap(); for (&(ref category, ref meta), ref mut data) in &mut self.buckets { data.sort_by(|a, b| { if a < b { @@ -353,7 +353,7 @@ impl Profiler { data[data_len / 2], data.iter().fold(f64::INFINITY, |a, &b| a.min(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), mean, median, min, max, data_len).unwrap(); } diff --git a/components/util/opts.rs b/components/util/opts.rs index e2259bbe373..b882cdbbdf5 100644 --- a/components/util/opts.rs +++ b/components/util/opts.rs @@ -539,9 +539,9 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult { opts.optopt("s", "size", "Size of tiles", "512"); opts.optopt("", "device-pixel-ratio", "Device pixels per px", ""); 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 time.csv"); + OR time.tsv"); opts.optflagopt("", "profiler-trace-path", "Path to dump a self-contained HTML timeline of profiler traces", ""); |