diff options
author | Nicholas Nethercote <nnethercote@mozilla.com> | 2015-03-22 15:20:31 -0700 |
---|---|---|
committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2015-03-25 16:00:23 -0700 |
commit | ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6 (patch) | |
tree | f414f6c9095ccebaa241bac7a030cc41f8bd5b52 /components/util/opts.rs | |
parent | 7f587f6cb56b1dae1a56dec36754007ef4d376ac (diff) | |
download | servo-ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6.tar.gz servo-ce36e574f4f404d7b0c8d15d3d55ea62fca8deb6.zip |
Rename lots of profiling-related things.
------------------------------------------------------------------------
BEFORE AFTER
------------------------------------------------------------------------
util::memory util::mem
- heap_size_of - heap_size_of (unchanged)
- SizeOf - HeapSizeOf
- size_of_excluding_self - heap_size_of_children
prof::mem prof::mem
- MemoryProfilerChan - ProfilerChan
- MemoryReport - Report
- MemoryReportsChan - ReportsChan
- MemoryReporter - Reporter
- MemoryProfilerMsg - ProfilerMsg
- {R,UnR}egisterMemoryReporter - {R,UnR}egisterReporter
- MemoryProfiler - Prof
- ReportsForest - ReportsForest (unchanged)
- ReportsTree - ReportsTree (unchanged)
- SystemMemoryReporter - SystemReporter
prof::time prof::time
- TimeProfilerChan - ProfilerChan
- TimerMetadata - TimerMetadata (unchanged)
- Formatable - Formattable [spelling!]
- TimeProfilerMsg - ProfilerMsg
- TimeProfilerCategory - ProfilerCategory
- TimeProfilerBuckets - ProfilerBuckets
- TimeProfiler - Profiler
- TimerMetadataFrameType - TimerMetadataFrameType (unchanged)
- TimerMetadataReflowType - TimerMetadataReflowType (unchanged)
- ProfilerMetadata - ProfilerMetadata (unchanged)
In a few places both prof::time and prof::mem are used, and so
module-qualification is needed to avoid overlap, e.g. time::Profiler and
mem::Profiler. Likewise with std::mem and prof::mem. This is not a big
deal.
Diffstat (limited to 'components/util/opts.rs')
-rw-r--r-- | components/util/opts.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/util/opts.rs b/components/util/opts.rs index 24b945dfcf7..25bd06e61f4 100644 --- a/components/util/opts.rs +++ b/components/util/opts.rs @@ -47,7 +47,7 @@ pub struct Opts { /// `None` to disable the memory profiler or `Some` with an interval in seconds to enable it /// and cause it to produce output on that interval (`-m`). - pub memory_profiler_period: Option<f64>, + pub mem_profiler_period: Option<f64>, /// Enable experimental web features (`-e`). pub enable_experimental: bool, @@ -176,7 +176,7 @@ pub fn default_opts() -> Opts { tile_size: 512, device_pixels_per_px: None, time_profiler_period: None, - memory_profiler_period: None, + mem_profiler_period: None, enable_experimental: false, layout_threads: 1, nonincremental_layout: false, @@ -286,7 +286,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool { let time_profiler_period = opt_match.opt_default("p", "5").map(|period| { period.parse().unwrap() }); - let memory_profiler_period = opt_match.opt_default("m", "5").map(|period| { + let mem_profiler_period = opt_match.opt_default("m", "5").map(|period| { period.parse().unwrap() }); @@ -330,7 +330,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool { tile_size: tile_size, device_pixels_per_px: device_pixels_per_px, time_profiler_period: time_profiler_period, - memory_profiler_period: memory_profiler_period, + mem_profiler_period: mem_profiler_period, enable_experimental: opt_match.opt_present("e"), layout_threads: layout_threads, nonincremental_layout: nonincremental_layout, |