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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « tools/perf/dashboard/buildbot.py ('k') | tools/perf/dashboard/query.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 import logging
4 import multiprocessing
5 import sys
6 import time
7 import traceback
8
9 import buildbot
10
11
12 POLL_INTERVAL = 600
13 BUILD_HISTORY_COUNT = 200
14 BUILD_RESULTS_COUNT = 50
15
16
17 def FetchLatestBuildResults(builder):
18 try:
19 builder.FetchRecentBuilds(BUILD_HISTORY_COUNT)
20 print 'Fetching results for', builder
21 for build in builder.LastBuilds(BUILD_RESULTS_COUNT):
22 for step in build.steps.itervalues():
23 step.results # pylint: disable=pointless-statement
24 except: # multiprocessing doesn't give useful stack traces, so print it here.
25 traceback.print_exc(file=sys.stderr)
26 print
27 raise
28
29
30 def main():
31 logging.getLogger().setLevel(logging.INFO)
32 builders = buildbot.Builders('chromium.perf')
33
34 process_pool = multiprocessing.Pool(4)
35
36 while True:
37 print 'Refreshing...'
38 buildbot.Update('chromium.perf', builders)
39 process_pool.map(FetchLatestBuildResults, builders.itervalues())
40 print 'Refreshed!'
41 time.sleep(POLL_INTERVAL)
42
43
44 if __name__ == '__main__':
45 main()
OLDNEW
« 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