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

Unified Diff: infra/tools/metric_tool/test/data/metric_name_not_a_string.py

Issue 1368583005: Create metric_tool to deal with metric definitions (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 5 years, 3 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/tools/metric_tool/test/data/metric_name_not_a_string.py
diff --git a/infra/tools/metric_tool/test/data/metric_name_not_a_string.py b/infra/tools/metric_tool/test/data/metric_name_not_a_string.py
new file mode 100644
index 0000000000000000000000000000000000000000..933c579d18ac9d64a48f9f768832244647b5099b
--- /dev/null
+++ b/infra/tools/metric_tool/test/data/metric_name_not_a_string.py
@@ -0,0 +1,12 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Example containing metrics whose name is set using a variable
+
+Don't do that, it's just to make sure the parsing is robust.
+"""
+from infra_libs import ts_mon
+
+metric_name = '/my/metric1'
+ts_mon.BooleanMetric(metric_name, description='metric1')
« no previous file with comments | « infra/tools/metric_tool/test/data/PLACEHOLDER ('k') | infra/tools/metric_tool/test/data/missing_descriptions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698