summaryrefslogtreecommitdiff
path: root/deps/v8/build/util/lib/common/perf_result_data_type.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/build/util/lib/common/perf_result_data_type.py')
-rw-r--r--deps/v8/build/util/lib/common/perf_result_data_type.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/v8/build/util/lib/common/perf_result_data_type.py b/deps/v8/build/util/lib/common/perf_result_data_type.py
new file mode 100644
index 0000000000..67b550a46c
--- /dev/null
+++ b/deps/v8/build/util/lib/common/perf_result_data_type.py
@@ -0,0 +1,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)