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

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

Issue 2573343002: Roll infra_libs and its dependencies to 066f135 (Closed)
Patch Set: Created 4 years 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 | « client/third_party/infra_libs/ts_mon/common/pb_to_popo.py ('k') | no next file » | 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
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 parser.add_argument( 168 parser.add_argument(
169 '--ts-mon-metric-name-prefix', 169 '--ts-mon-metric-name-prefix',
170 default='/chrome/infra/', 170 default='/chrome/infra/',
171 help='metric name prefix for all metrics (default: %(default)s)') 171 help='metric name prefix for all metrics (default: %(default)s)')
172 172
173 parser.add_argument( 173 parser.add_argument(
174 '--ts-mon-use-new-proto', 174 '--ts-mon-use-new-proto',
175 default=False, action='store_true', 175 default=False, action='store_true',
176 help='use the new proto schema (default: false)') 176 help='use the new proto schema (default: false)')
177 177
178
178 def process_argparse_options(args): 179 def process_argparse_options(args):
179 """Process command line arguments to initialize the global monitor. 180 """Process command line arguments to initialize the global monitor.
180 181
181 Also initializes the default target. 182 Also initializes the default target.
182 183
183 Starts a background thread to automatically flush monitoring metrics if not 184 Starts a background thread to automatically flush monitoring metrics if not
184 disabled by command line arguments. 185 disabled by command line arguments.
185 186
186 Args: 187 Args:
187 args (argparse.Namespace): the result of parsing the command line arguments 188 args (argparse.Namespace): the result of parsing the command line arguments
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 interface.state.flush_mode = args.ts_mon_flush 257 interface.state.flush_mode = args.ts_mon_flush
257 interface.state.use_new_proto = args.ts_mon_use_new_proto 258 interface.state.use_new_proto = args.ts_mon_use_new_proto
258 259
259 if args.ts_mon_flush == 'auto': 260 if args.ts_mon_flush == 'auto':
260 interface.state.flush_thread = interface._FlushThread( 261 interface.state.flush_thread = interface._FlushThread(
261 args.ts_mon_flush_interval_secs) 262 args.ts_mon_flush_interval_secs)
262 interface.state.flush_thread.start() 263 interface.state.flush_thread.start()
263 264
264 standard_metrics.init() 265 standard_metrics.init()
265 266
OLDNEW
« no previous file with comments | « client/third_party/infra_libs/ts_mon/common/pb_to_popo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698