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

Side by Side Diff: infra_libs/ts_mon/common/monitors.py

Issue 1588623002: ts_mon: remove dependency on apiclient. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Remove gae_ts_mon/third_party Created 4 years, 11 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 | « appengine_module/gae_ts_mon/uritemplate ('k') | infra_libs/ts_mon/common/test/monitors_test.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 """Classes representing the monitoring interface for tasks or devices.""" 5 """Classes representing the monitoring interface for tasks or devices."""
6 6
7 7
8 import base64 8 import base64
9 import json 9 import json
10 import logging 10 import logging
11 11
12 from apiclient import discovery 12 from googleapiclient import discovery
13 from oauth2client import gce 13 from oauth2client import gce
14 from oauth2client.client import GoogleCredentials 14 from oauth2client.client import GoogleCredentials
15 from oauth2client.file import Storage 15 from oauth2client.file import Storage
16 import httplib2 16 import httplib2
17 17
18 from infra_libs import httplib2_utils 18 from infra_libs import httplib2_utils
19 from infra_libs.ts_mon.common import http_metrics 19 from infra_libs.ts_mon.common import http_metrics
20 from infra_libs.ts_mon.protos import metrics_pb2 20 from infra_libs.ts_mon.protos import metrics_pb2
21 21
22 22
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 logging.info('Flushing monitoring metrics:\n%s', text) 163 logging.info('Flushing monitoring metrics:\n%s', text)
164 if self._fh is not None: 164 if self._fh is not None:
165 self._fh.write(text + '\n\n') 165 self._fh.write(text + '\n\n')
166 self._fh.flush() 166 self._fh.flush()
167 167
168 168
169 class NullMonitor(Monitor): 169 class NullMonitor(Monitor):
170 """Class that doesn't send metrics anywhere.""" 170 """Class that doesn't send metrics anywhere."""
171 def send(self, metric_pb): 171 def send(self, metric_pb):
172 pass 172 pass
OLDNEW
« no previous file with comments | « appengine_module/gae_ts_mon/uritemplate ('k') | infra_libs/ts_mon/common/test/monitors_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698