Bug 1149164 - Log Android file sizes in perfherder-compatible form;r=gbrown
authorWilliam Lachance <wlachance@mozilla.com>
Mon, 26 Oct 2015 15:32:54 -0400
changeset 270480 db39f79d33efeeb1f0be775d9a0b513c1e5834ec
parent 270479 2925adfe7ed00389ec47f20a05651861728dd59c
child 270481 5d7835c1e572bd4ec4e9d09c19f3c47833bee104
push id29612
push userkwierso@gmail.com
push dateFri, 30 Oct 2015 23:36:00 +0000
treeherderautoland@1596ab6985cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1149164
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1149164 - Log Android file sizes in perfherder-compatible form;r=gbrown
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1600,19 +1600,33 @@ or run without that action (ie: --no-{ac
             if libxul:
                 break
 
         if libxul:
             paths.append(libxul)
         else:
             paths.append( ('libxul.so', os.path.join(dirs['abs_obj_dir'], 'dist', 'bin', 'libxul.so')) )
 
+        size_measurements = []
         for (name, path) in paths:
+            # FIXME: Remove the tinderboxprints when bug 1161249 is fixed and
+            # we're displaying perfherder data for each job automatically
             if os.path.exists(path):
-                self.info('TinderboxPrint: Size of %s<br/>%s bytes\n' % (name, self.query_filesize(path)))
+                if 'apk' in name:
+                    name = 'apk'
+                filesize = self.query_filesize(path)
+                self.info('TinderboxPrint: Size of %s<br/>%s bytes\n' % (
+                    name, filesize))
+                size_measurements.append({'name': name, 'value': filesize})
+        if size_measurements:
+            self.info('PERFHERDER_DATA: %s' % (json.dumps({
+                "framework": {"name": "build_metrics"},
+                "suites": [{"name": "file sizes",
+                            "subtests": size_measurements}]
+            })))
 
     def _set_file_properties(self, file_name, find_dir, prop_type,
                              error_level=ERROR):
         c = self.config
         dirs = self.query_abs_dirs()
 
         # windows fix. even bash -c loses two single slashes.
         find_dir = find_dir.replace('\\', '\\\\\\\\')