OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 class _Info(object): | 5 class _Info(object): |
6 | 6 |
7 def __init__(self, name, _type=None, entry_type=None): | 7 def __init__(self, name, _type=None, entry_type=None): |
8 self._name = name | 8 self._name = name |
9 self._type = _type | 9 self._type = _type |
10 if entry_type is not None and self._type != 'GenericSet': | 10 if entry_type is not None and self._type != 'GenericSet': |
(...skipping 23 matching lines...) Expand all Loading... |
34 BUILDS = _Info('builds', 'GenericSet', int) | 34 BUILDS = _Info('builds', 'GenericSet', int) |
35 CATAPULT_REVISIONS = _Info('catapultRevisions', 'GenericSet', str) | 35 CATAPULT_REVISIONS = _Info('catapultRevisions', 'GenericSet', str) |
36 CHROMIUM_COMMIT_POSITIONS = _Info('chromiumCommitPositions', 'GenericSet', int) | 36 CHROMIUM_COMMIT_POSITIONS = _Info('chromiumCommitPositions', 'GenericSet', int) |
37 CHROMIUM_REVISIONS = _Info('chromiumRevisions', 'GenericSet', str) | 37 CHROMIUM_REVISIONS = _Info('chromiumRevisions', 'GenericSet', str) |
38 GPUS = _Info('gpus', 'GenericSet', str) | 38 GPUS = _Info('gpus', 'GenericSet', str) |
39 GROUPING_PATH = _Info('groupingPath') | 39 GROUPING_PATH = _Info('groupingPath') |
40 LABELS = _Info('labels', 'GenericSet', str) | 40 LABELS = _Info('labels', 'GenericSet', str) |
41 LOG_URLS = _Info('logUrls', 'GenericSet', str) | 41 LOG_URLS = _Info('logUrls', 'GenericSet', str) |
42 MASTERS = _Info('masters', 'GenericSet', str) | 42 MASTERS = _Info('masters', 'GenericSet', str) |
43 MEMORY_AMOUNTS = _Info('memoryAmounts', 'GenericSet', int) | 43 MEMORY_AMOUNTS = _Info('memoryAmounts', 'GenericSet', int) |
44 MERGED_FROM = _Info('mergedFrom', 'RelatedHistogramMap') | |
45 MERGED_TO = _Info('mergedTo', 'RelatedHistogramMap') | |
46 OS_NAMES = _Info('osNames', 'GenericSet', str) | 44 OS_NAMES = _Info('osNames', 'GenericSet', str) |
47 OS_VERSIONS = _Info('osVersions', 'GenericSet', str) | 45 OS_VERSIONS = _Info('osVersions', 'GenericSet', str) |
48 OWNERS = _Info('owners', 'GenericSet', str) | 46 OWNERS = _Info('owners', 'GenericSet', str) |
49 PRODUCT_VERSIONS = _Info('productVersions', 'GenericSet', str) | 47 PRODUCT_VERSIONS = _Info('productVersions', 'GenericSet', str) |
50 RELATED_NAMES = _Info('relatedNames', 'GenericSet', str) | 48 RELATED_NAMES = _Info('relatedNames', 'GenericSet', str) |
51 SKIA_REVISIONS = _Info('skiaRevisions', 'GenericSet', str) | 49 SKIA_REVISIONS = _Info('skiaRevisions', 'GenericSet', str) |
52 STORIES = _Info('stories', 'GenericSet', str) | 50 STORIES = _Info('stories', 'GenericSet', str) |
53 STORYSET_REPEATS = _Info('storysetRepeats', 'GenericSet', int) | 51 STORYSET_REPEATS = _Info('storysetRepeats', 'GenericSet', int) |
54 STORY_TAGS = _Info('storyTags', 'GenericSet', str) | 52 STORY_TAGS = _Info('storyTags', 'GenericSet', str) |
55 TAG_MAP = _Info('tagmap', 'TagMap') | 53 TAG_MAP = _Info('tagmap', 'TagMap') |
56 TRACE_START = _Info('traceStart', 'DateRange') | 54 TRACE_START = _Info('traceStart', 'DateRange') |
57 TRACE_URLS = _Info('traceUrls', 'GenericSet', str) | 55 TRACE_URLS = _Info('traceUrls', 'GenericSet', str) |
58 V8_COMMIT_POSITIONS = _Info('v8CommitPositions', 'DateRange') | 56 V8_COMMIT_POSITIONS = _Info('v8CommitPositions', 'DateRange') |
59 V8_REVISIONS = _Info('v8Revisions', 'GenericSet', str) | 57 V8_REVISIONS = _Info('v8Revisions', 'GenericSet', str) |
60 WEBRTC_REVISIONS = _Info('webrtcRevisions', 'GenericSet', str) | 58 WEBRTC_REVISIONS = _Info('webrtcRevisions', 'GenericSet', str) |
61 | 59 |
62 def GetTypeForName(name): | 60 def GetTypeForName(name): |
63 for info in globals().itervalues(): | 61 for info in globals().itervalues(): |
64 if isinstance(info, _Info) and info.name == name: | 62 if isinstance(info, _Info) and info.name == name: |
65 return info.type | 63 return info.type |
OLD | NEW |