OLD | NEW |
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 from infra_libs.ts_mon import interface | |
14 from infra_libs.ts_mon import monitors | 13 from infra_libs.ts_mon import monitors |
15 from infra_libs.ts_mon import standard_metrics | 14 from infra_libs.ts_mon.gae import interface |
16 from infra_libs.ts_mon import targets | 15 from infra_libs.ts_mon.gae import standard_metrics |
| 16 from infra_libs.ts_mon.gae import targets |
17 | 17 |
18 | 18 |
19 def load_machine_config(filename): | 19 def load_machine_config(filename): |
20 if not os.path.exists(filename): | 20 if not os.path.exists(filename): |
21 logging.info('Configuration file does not exist, ignoring: %s', filename) | 21 logging.info('Configuration file does not exist, ignoring: %s', filename) |
22 return {} | 22 return {} |
23 | 23 |
24 try: | 24 try: |
25 with open(filename) as fh: | 25 with open(filename) as fh: |
26 return json.load(fh) | 26 return json.load(fh) |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 interface.state.flush_mode = args.ts_mon_flush | 194 interface.state.flush_mode = args.ts_mon_flush |
195 | 195 |
196 if args.ts_mon_flush == 'auto': | 196 if args.ts_mon_flush == 'auto': |
197 interface.state.flush_thread = interface._FlushThread( | 197 interface.state.flush_thread = interface._FlushThread( |
198 args.ts_mon_flush_interval_secs) | 198 args.ts_mon_flush_interval_secs) |
199 interface.state.flush_thread.start() | 199 interface.state.flush_thread.start() |
200 | 200 |
201 standard_metrics.init() | 201 standard_metrics.init() |
202 | 202 |
OLD | NEW |