aboutsummaryrefslogtreecommitdiff
path: root/catapult/telemetry/telemetry/util/perf_result_data_type.py
blob: dbaf7949e29e51553db7fc2ea5c2276d0bc60051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Copyright 2013 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]


def IsValidType(datatype):
  return datatype in ALL_TYPES


def IsHistogram(datatype):
  return datatype == HISTOGRAM or datatype == UNIMPORTANT_HISTOGRAM