Chromium Code Reviews| Index: build/util/lib/common/perf_result_data_type.py |
| =================================================================== |
| --- build/util/lib/common/perf_result_data_type.py (revision 0) |
| +++ build/util/lib/common/perf_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' |
| +UNIMPORTANT = 'unimportant' |
| +HISTOGRAM = 'histogram' |
| +UNIMPORTANT_HISTOGRAM = 'unimportant-histogram' |
| +INFORMATIONAL = 'informational' |
| + |
| +ALL_TYPES = [DEFAULT, UNIMPORTANT, HISTOGRAM, UNIMPORTANT_HISTOGRAM, |
| + INFORMATIONAL] |
| + |
|
bulach
2013/09/13 10:31:18
nit: another \n here and 15 below (i.e., two new l
|
| +def IsValidType(datatype): |
| + return datatype in ALL_TYPES |
| + |
| +def IsHistogram(datatype): |
| + return (datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM) |