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

Side by Side Diff: scripts/master/master_utils.py

Issue 2268073003: Re-land "Make Buildbot masters send ts_mon metrics, and add standard HTTP server metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 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 | « masters/buildbot.tac ('k') | scripts/master/monitoring_status_receiver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import ctypes 5 import ctypes
6 import ctypes.util 6 import ctypes.util
7 import os 7 import os
8 import random 8 import random
9 import re 9 import re
10 import sys 10 import sys
(...skipping 10 matching lines...) Expand all
21 21
22 from master.autoreboot_buildslave import AutoRebootBuildSlave 22 from master.autoreboot_buildslave import AutoRebootBuildSlave
23 from buildbot.status.web.authz import Authz 23 from buildbot.status.web.authz import Authz
24 from buildbot.status.web.baseweb import WebStatus 24 from buildbot.status.web.baseweb import WebStatus
25 25
26 import master.chromium_status_bb8 as chromium_status 26 import master.chromium_status_bb8 as chromium_status
27 27
28 from common import chromium_utils 28 from common import chromium_utils
29 from master import buildbucket 29 from master import buildbucket
30 from master import cbe_json_status_push 30 from master import cbe_json_status_push
31 from master import monitoring_status_receiver
31 from master import pubsub_json_status_push 32 from master import pubsub_json_status_push
32 from master import status_logger 33 from master import status_logger
33 import config 34 import config
34 35
35 36
36 # CQ uses this service account to authenticate to other services, including 37 # CQ uses this service account to authenticate to other services, including
37 # buildbucket. 38 # buildbucket.
38 CQ_SERVICE_ACCOUNT = ( 39 CQ_SERVICE_ACCOUNT = (
39 '5071639625-1lppvbtck1morgivc6sq4dul7klu27sd@developer.gserviceaccount.com') 40 '5071639625-1lppvbtck1morgivc6sq4dul7klu27sd@developer.gserviceaccount.com')
40 41
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 active_master.master_port_alt, 422 active_master.master_port_alt,
422 tagComparator=tagComparator, 423 tagComparator=tagComparator,
423 customEndpoints=customEndpoints, 424 customEndpoints=customEndpoints,
424 num_events_max=3000, 425 num_events_max=3000,
425 templates=templates, 426 templates=templates,
426 console_repo_filter=console_repo_filter, 427 console_repo_filter=console_repo_filter,
427 console_builder_filter=console_builder_filter, 428 console_builder_filter=console_builder_filter,
428 web_template_globals=web_template_globals, 429 web_template_globals=web_template_globals,
429 **kwargs)) 430 **kwargs))
430 431
431 # Add a status logger. 432 # Add a status logger and a ts_mon flushing receiver.
432 c['status'].append(status_logger.StatusEventLogger()) 433 c['status'].append(status_logger.StatusEventLogger())
434 c['status'].append(monitoring_status_receiver.MonitoringStatusReceiver())
433 435
434 # Keep last build logs, the default is too low. 436 # Keep last build logs, the default is too low.
435 c['buildHorizon'] = 1000 437 c['buildHorizon'] = 1000
436 c['logHorizon'] = 500 438 c['logHorizon'] = 500
437 # Must be at least 2x the number of slaves. 439 # Must be at least 2x the number of slaves.
438 c['eventHorizon'] = 200 440 c['eventHorizon'] = 200
439 # Tune cache sizes to speed up web UI. 441 # Tune cache sizes to speed up web UI.
440 c['caches'] = { 442 c['caches'] = {
441 'BuildRequests': 1000, 443 'BuildRequests': 1000,
442 'Changes': 1000, 444 'Changes': 1000,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 # Pad the cmdline string to the required length. If it's longer than the 691 # Pad the cmdline string to the required length. If it's longer than the
690 # currentl commandline, truncate it. 692 # currentl commandline, truncate it.
691 if len(cmdline) >= cmdlen: 693 if len(cmdline) >= cmdlen:
692 new_cmdline = ctypes.c_char_p(cmdline[:cmdlen-1] + '\0') 694 new_cmdline = ctypes.c_char_p(cmdline[:cmdlen-1] + '\0')
693 else: 695 else:
694 new_cmdline = ctypes.c_char_p(cmdline.ljust(cmdlen, '\0')) 696 new_cmdline = ctypes.c_char_p(cmdline.ljust(cmdlen, '\0'))
695 697
696 # Replace the old commandline. 698 # Replace the old commandline.
697 libc = ctypes.CDLL(ctypes.util.find_library('c')) 699 libc = ctypes.CDLL(ctypes.util.find_library('c'))
698 libc.memcpy(argv.contents, new_cmdline, cmdlen) 700 libc.memcpy(argv.contents, new_cmdline, cmdlen)
OLDNEW
« no previous file with comments | « masters/buildbot.tac ('k') | scripts/master/monitoring_status_receiver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698