Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 740853 - Additions to tegras-per-foopy. r=armenzg

Shuffle the tegras attached to foopies to reduce load
  • Loading branch information...
commit da4782c62178e074ec7d5738c875d14d0a7913c5 1 parent f5e9018
callek@mozilla.com authored
Showing with 40 additions and 4 deletions.
  1. +40 −4 buildfarm/mobile/tegras_per_foopy.py
View
44 buildfarm/mobile/tegras_per_foopy.py
@@ -2,21 +2,57 @@
f = open('tegras.json', 'r')
j = json.load(f)
foopies = {}
+nofoopy = {}
for key in j:
foopy = j[key]["foopy"]
- if foopies.has_key(foopy):
- foopies[foopy].append(key)
+ if foopy != "None":
+ if foopies.has_key(foopy):
+ foopies[foopy].append(key)
+ else:
+ foopies[foopy] = [key]
else:
- foopies[foopy] = [key]
+ if j[key].has_key("_comment"):
+ newkey = j[key]["_comment"]
+ else:
+ newkey = "None"
+ if nofoopy.has_key(newkey):
+ nofoopy[newkey] += 1
+ else:
+ nofoopy[newkey] = 1
prod_tegras = 0
prod_foopies = 0
+prod_text = []
+stage_text = []
+stage_tegras = 0
+stage_foopies = 0
for foopy in sorted(foopies.keys()):
# exclude staging foopies
if not foopy in ("foopy05", "foopy06"):
- print "%s contains %s tegras" % (foopy, len(foopies[foopy]))
+ prod_text.append(" %s contains %s tegras" % (foopy, len(foopies[foopy])))
prod_tegras += len(foopies[foopy])
prod_foopies += 1
+ if foopy in ("foopy05", "foopy06"):
+ stage_text.append(" %s contains %s tegras" % (foopy, len(foopies[foopy])))
+ stage_tegras += len(foopies[foopy])
+ stage_foopies += 1
+unassigned_text = []
+for unassigned in sorted(nofoopy.keys()):
+ if unassigned is "None":
+ unassigned_text.append("%4ld (With no Comment)" % nofoopy[unassigned])
+ else:
+ unassigned_text.append("%4ld With Comment: %s" % (nofoopy[unassigned], unassigned))
+
+print "PRODUCTION:"
+print "\n".join(prod_text)
print "We have %s tegras in %s foopies which means a ratio of %s tegras per foopy" % \
(prod_tegras, prod_foopies, prod_tegras/prod_foopies)
+print
+print "STAGING:"
+print "\n".join(stage_text)
+print "We have %s tegras in %s foopies which means a ratio of %s tegras per foopy" % \
+ (stage_tegras, stage_foopies, stage_tegras/stage_foopies)
+print
+print "UNASSIGNED"
+print "\n".join(unassigned_text)
Please sign in to comment.
Something went wrong with that request. Please try again.