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

Unified Diff: infra_libs/ts_mon/common/metrics.py

Issue 2109393002: Make test_net_info a bit more robust. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 6 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/metrics.py
diff --git a/infra_libs/ts_mon/common/metrics.py b/infra_libs/ts_mon/common/metrics.py
index 28969e5f64c60a7a47a3fb69ae7f368621a29e39..4596f4c90885aa259ca405e8b60c7448017330ee 100644
--- a/infra_libs/ts_mon/common/metrics.py
+++ b/infra_libs/ts_mon/common/metrics.py
@@ -185,6 +185,9 @@ class Metric(object):
return interface.state.store.get(
self.name, self._normalize_fields(fields), target_fields)
+ def get_all(self):
+ return interface.state.store.iter_field_values(self.name)
+
def reset(self):
"""Clears the values of this metric. Useful in unit tests.
« infra/services/sysmon/test/system_metrics_test.py ('K') | « infra_libs/ts_mon/common/metric_store.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698