Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: tools/perf/dashboard/download.py

Issue 976823003: [telemetry] DO NOT SUBMIT: WIP: Helper modules for querying buildbot perf data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/dashboard/buildbot.py ('k') | tools/perf/dashboard/query.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/dashboard/download.py
diff --git a/tools/perf/dashboard/download.py b/tools/perf/dashboard/download.py
new file mode 100755
index 0000000000000000000000000000000000000000..acfab1fed17dc450abb0261cad05a9ba5774d46b
--- /dev/null
+++ b/tools/perf/dashboard/download.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+import logging
+import multiprocessing
+import sys
+import time
+import traceback
+
+import buildbot
+
+
+POLL_INTERVAL = 600
+BUILD_HISTORY_COUNT = 200
+BUILD_RESULTS_COUNT = 50
+
+
+def FetchLatestBuildResults(builder):
+ try:
+ builder.FetchRecentBuilds(BUILD_HISTORY_COUNT)
+ print 'Fetching results for', builder
+ for build in builder.LastBuilds(BUILD_RESULTS_COUNT):
+ for step in build.steps.itervalues():
+ step.results # pylint: disable=pointless-statement
+ except: # multiprocessing doesn't give useful stack traces, so print it here.
+ traceback.print_exc(file=sys.stderr)
+ print
+ raise
+
+
+def main():
+ logging.getLogger().setLevel(logging.INFO)
+ builders = buildbot.Builders('chromium.perf')
+
+ process_pool = multiprocessing.Pool(4)
+
+ while True:
+ print 'Refreshing...'
+ buildbot.Update('chromium.perf', builders)
+ process_pool.map(FetchLatestBuildResults, builders.itervalues())
+ print 'Refreshed!'
+ time.sleep(POLL_INTERVAL)
+
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « tools/perf/dashboard/buildbot.py ('k') | tools/perf/dashboard/query.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698