Buildbot/Talos/Profiling: Difference between revisions

Jump to navigation Jump to search
Line 41: Line 41:


There's a known issue with Talos profiling on Windows. See [https://bugzilla.mozilla.org/show_bug.cgi?id=978585 this bug].
There's a known issue with Talos profiling on Windows. See [https://bugzilla.mozilla.org/show_bug.cgi?id=978585 this bug].
== I need to download all the profiles! Help! ==
Try this python script:
<pre>
import urllib2
import json
from pprint import pprint
import re
from StringIO import StringIO
import gzip
import os
import sys
if len(sys.argv) < 2:
  print "usage:" , sys.argv[0] , "<try revision>"
  exit(1)
builds = json.loads(urllib2.urlopen('https://tbpl.mozilla.org/php/getRevisionBuilds.php?branch=try&rev='+ sys.argv[1]).read())
if len(builds) == 0:
  print "No bulids found for this revision"
  exit(1)
i = 0
for build in builds:
  name = build['buildername']
  print i, '/', len(builds), name
  i += 1
  name = name.replace(' ', '_')
  log = gzip.GzipFile(fileobj=StringIO(urllib2.urlopen(build['log']).read())).read()
  zips = re.findall("TinderboxPrint: Uploaded (profile_[a-zA-Z0-9-_]+\.zip) to ([^\n]+)", log)
  for zipp in zips:
    print ' ', zipp[0]
    try:
      os.mkdir(name)
    except OSError:
      pass
    with open(os.path.join(name, zipp[0]), 'w') as out:
      out.write(urllib2.urlopen(zipp[1]).read())
  print
</pre>
12

edits

Navigation menu