Bug 1239296 - Use telemetry_handler to store build resource data r?gps
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -488,16 +488,21 @@ class Build(MachCommandBase):
if monitor.have_resource_usage:
excessive, swap_in, swap_out = monitor.have_excessive_swapping()
# if excessive:
# print(EXCESSIVE_SWAP_MESSAGE)
print('To view resource usage of the build, run |mach '
'resource-usage|.')
+ telemetry_handler = getattr(self._mach_context,
+ 'telemetry_handler', None)
+ usage = monitor.record_resource_usage()
+ telemetry_handler(self._mach_context, usage)
+
# Only for full builds because incremental builders likely don't
# need to be burdened with this.
if not what:
try:
# Fennec doesn't have useful output from just building. We should
# arguably make the build action useful for Fennec. Another day...
if self.substs['MOZ_BUILD_APP'] != 'mobile/android':
print('To take your build for a test drive, run: |mach run|')