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

Side by Side Diff: infra_libs/ts_mon/config.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: add noncululativedistribution metric to ts_mon imports Created 5 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 | « infra_libs/ts_mon/common/test/targets_test.py ('k') | infra_libs/ts_mon/distribution.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 json 5 import json
6 import logging 6 import logging
7 import os 7 import os
8 import socket 8 import socket
9 import sys 9 import sys
10 import urlparse 10 import urlparse
11 import re 11 import re
12 12
13 import requests 13 import requests
14 14
15 from infra_libs.ts_mon import interface 15 from infra_libs.ts_mon import interface
16 from infra_libs.ts_mon import monitors 16 from infra_libs.ts_mon import monitors
17 from infra_libs.ts_mon import standard_metrics 17 from infra_libs.ts_mon.common import standard_metrics
18 from infra_libs.ts_mon import targets 18 from infra_libs.ts_mon.common import targets
19 19
20 20
21 def load_machine_config(filename): 21 def load_machine_config(filename):
22 if not os.path.exists(filename): 22 if not os.path.exists(filename):
23 logging.info('Configuration file does not exist, ignoring: %s', filename) 23 logging.info('Configuration file does not exist, ignoring: %s', filename)
24 return {} 24 return {}
25 25
26 try: 26 try:
27 with open(filename) as fh: 27 with open(filename) as fh:
28 return json.load(fh) 28 return json.load(fh)
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 args.ts_mon_task_hostname, 217 args.ts_mon_task_hostname,
218 args.ts_mon_task_number) 218 args.ts_mon_task_number)
219 219
220 interface.state.flush_mode = args.ts_mon_flush 220 interface.state.flush_mode = args.ts_mon_flush
221 221
222 if args.ts_mon_flush == 'auto': 222 if args.ts_mon_flush == 'auto':
223 interface.state.flush_thread = interface._FlushThread( 223 interface.state.flush_thread = interface._FlushThread(
224 args.ts_mon_flush_interval_secs) 224 args.ts_mon_flush_interval_secs)
225 interface.state.flush_thread.start() 225 interface.state.flush_thread.start()
226 226
227 print "ts_mon registering standard metrics"
227 standard_metrics.init() 228 standard_metrics.init()
228 229
OLDNEW
« no previous file with comments | « infra_libs/ts_mon/common/test/targets_test.py ('k') | infra_libs/ts_mon/distribution.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698