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

Unified Diff: infra_libs/ts_mon/common/standard_metrics.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
Index: infra_libs/ts_mon/common/standard_metrics.py
diff --git a/infra_libs/ts_mon/standard_metrics.py b/infra_libs/ts_mon/common/standard_metrics.py
similarity index 59%
rename from infra_libs/ts_mon/standard_metrics.py
rename to infra_libs/ts_mon/common/standard_metrics.py
index 673e6cd38c550c3cf9da77f124ba8827718be1a8..2e7baf35b13bb2f8119dc30d9bd858449b40ddc5 100644
--- a/infra_libs/ts_mon/standard_metrics.py
+++ b/infra_libs/ts_mon/common/standard_metrics.py
@@ -4,12 +4,16 @@
"""Metrics common to all tasks and devices."""
-from infra_libs.ts_mon import metrics
+try:
+ from infra_libs.ts_mon.common import metrics
+except ImportError:
+ from common import metrics
+
-# TODO(dsansome): Add more metrics for git revision, cipd package version,
-# uptime, etc.
up = metrics.BooleanMetric('presence/up')
def init():
+ # TODO(dsansome): Add more metrics for git revision, cipd package version,
+ # uptime, etc.
up.set(True)

Powered by Google App Engine
This is Rietveld 408576698