bug 1237619: save resource usage for "what" builds r?gps draft
authorDan Minor <dminor@mozilla.com>
Thu, 07 Jan 2016 14:18:36 -0500
changeset 321372 04ddf6347773a042ffb888182c562e67dc143255
parent 321369 531d1f6d1cde1182e9f7f9dff81a4fc5abc0a601
child 321373 f6833ac20a24f92ca16da2ec14c63ba8ac039f4e
push id9364
push userdminor@mozilla.com
push dateWed, 13 Jan 2016 13:08:09 +0000
reviewersgps
bugs1237619
milestone46.0a1
bug 1237619: save resource usage for "what" builds r?gps This moves monitor start/end recording so it also occurs for "what" builds rather than only for full builds.
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -320,16 +320,18 @@ class Build(MachCommandBase):
                 return 1
 
             if directory is not None:
                 disable_extra_make_dependencies=True
                 directory = mozpath.normsep(directory)
                 if directory.startswith('/'):
                     directory = directory[1:]
 
+            status = None
+            monitor.start_resource_recording()
             if what:
                 top_make = os.path.join(self.topobjdir, 'Makefile')
                 if not os.path.exists(top_make):
                     print('Your tree has not been configured yet. Please run '
                         '|mach build| with no arguments.')
                     return 1
 
                 # Collect target pairs.
@@ -412,17 +414,16 @@ class Build(MachCommandBase):
                     # need to run configure.  The client.mk invocation below
                     # will configure, which will run config.status, which will
                     # invoke |mach artifact install| itself before continuing
                     # the build.  Therefore, we needn't install artifacts
                     # ourselves.
                     self.log(logging.DEBUG, 'artifact',
                              {}, "Not running |mach artifact install| -- it will be run by client.mk.")
 
-                monitor.start_resource_recording()
                 status = self._run_make(srcdir=True, filename='client.mk',
                     line_handler=output.on_line, log=False, print_directory=False,
                     allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
                     silent=not verbose)
 
                 make_extra = self.mozconfig['make_extra'] or []
                 make_extra = dict(m.split('=', 1) for m in make_extra)