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

Unified Diff: infra_libs/ts_mon/interface.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: fix remaining test problems 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra_libs/ts_mon/helpers.py ('k') | infra_libs/ts_mon/metrics.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/ts_mon/interface.py
diff --git a/infra_libs/ts_mon/interface.py b/infra_libs/ts_mon/interface.py
index e24bf14d120309f21c77e967f35908a3c5d31741..2e3d498375bd32dd2a273ed2b602a346215df379 100644
--- a/infra_libs/ts_mon/interface.py
+++ b/infra_libs/ts_mon/interface.py
@@ -39,7 +39,7 @@ import time
from monacq.proto import metrics_pb2
-from infra_libs.ts_mon import errors
+from infra_libs.ts_mon.common import errors
# The maximum number of MetricsData messages to include in each HTTP request.
# MetricsCollections larger than this will be split into multiple requests.
@@ -116,8 +116,9 @@ def register(metric):
"""
# If someone is registering the same metric object twice, that's okay, but
# registering two different metric objects with the same metric name is not.
- if metric in state.metrics:
- return
+ for m in state.metrics:
+ if metric == m:
+ return
agable 2015/08/19 01:14:42 I don't think this does what we want: This means t
if any([metric._name == m._name for m in state.metrics]):
raise errors.MonitoringDuplicateRegistrationError(metric._name)
« no previous file with comments | « infra_libs/ts_mon/helpers.py ('k') | infra_libs/ts_mon/metrics.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698