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

Unified Diff: tools/telemetry/telemetry/page/result_data_type.py

Issue 22754003: Refactor BenchmarkResult.Add to take enum for data_type (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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: tools/telemetry/telemetry/page/result_data_type.py
===================================================================
--- tools/telemetry/telemetry/page/result_data_type.py (revision 0)
+++ tools/telemetry/telemetry/page/result_data_type.py (revision 0)
@@ -0,0 +1,18 @@
+# Copyright (c) 2012 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.
+
+DEFAULT = "default"
dtu 2013/08/16 00:40:02 nit: single quotes
+UNIMPORTANT = "unimportant"
+HISTOGRAM = "histogram"
+UNIMPORTANT_HISTOGRAM = "unimportant-histogram"
+INFORMATIONAL = "informational"
+
+ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM,
+ INFORMATIONAL]
dtu 2013/08/16 00:40:02 nit: align indent
+
+def IsValidType(datatype):
+ return datatype in ALL_TYPES
+
+def IsHistogram(datatype):
+ return (datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM)

Powered by Google App Engine
This is Rietveld 408576698