Bug 1334667 - Distinguish nightlies for all build metrics, not just build times. r=wlach draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 27 Jan 2017 13:44:48 -0800
changeset 467499 618b5ac52e65be2d92a814d31cf0b38b1de124d0
parent 467480 cbe8c9a09d5014def6e01aea0472c24915309a87
child 543695 fb72af0a8d88f58cb26a8c3e98d4db466020a6db
push id43186
push userbmo:cmanchester@mozilla.com
push dateFri, 27 Jan 2017 21:45:17 +0000
reviewerswlach
bugs1334667
milestone54.0a1
Bug 1334667 - Distinguish nightlies for all build metrics, not just build times. r=wlach MozReview-Commit-ID: IfSgjT5oDVY
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1861,24 +1861,20 @@ or run without that action (ie: --no-{ac
 
         with open(p, 'rb') as fh:
             resources = json.load(fh)
 
         if 'duration' not in resources:
             self.info('resource usage lacks duration; ignoring')
             return None
 
-        extra_options = self.perfherder_resource_options()
-        if self.query_is_nightly():
-            extra_options = ['nightly'] + extra_options
-
         data = {
             'name': 'build times',
             'value': resources['duration'],
-            'extraOptions': extra_options,
+            'extraOptions': self.perfherder_resource_options(),
             'subtests': [],
         }
 
         for phase in resources['phases']:
             if 'duration' not in phase:
                 continue
             data['subtests'].append({
                 'name': phase['name'],
@@ -1997,16 +1993,23 @@ or run without that action (ie: --no-{ac
                 "alertThreshold": 0.25,
                 "subtests": size_measurements
             })
 
         build_metrics = self._load_build_resources()
         if build_metrics:
             perfherder_data['suites'].append(build_metrics)
 
+        if self.query_is_nightly:
+            for suite in perfherder_data['suites']:
+                if 'extraOptions' in suite:
+                    suite['extraOptions'] = ['nightly'] + suite['extraOptions']
+                else:
+                    suite['extraOptions'] = ['nightly']
+
         if perfherder_data["suites"]:
             self.info('PERFHERDER_DATA: %s' % json.dumps(perfherder_data))
 
     def sendchange(self):
         if os.environ.get('TASK_ID'):
             self.info("We are not running this in buildbot; skipping")
             return