OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import re | 5 import re |
6 | 6 |
7 from telemetry.story import shared_state as shared_state_module | 7 from telemetry.story import shared_state as shared_state_module |
8 | 8 |
9 _next_story_id = 0 | 9 _next_story_id = 0 |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return self._id | 79 return self._id |
80 | 80 |
81 @property | 81 @property |
82 def name(self): | 82 def name(self): |
83 return self._name | 83 return self._name |
84 | 84 |
85 @property | 85 @property |
86 def grouping_keys(self): | 86 def grouping_keys(self): |
87 return self._grouping_keys | 87 return self._grouping_keys |
88 | 88 |
| 89 @property |
| 90 def display_name_and_grouping_key_tuple(self): |
| 91 return self.display_name, tuple(self.grouping_keys.iteritems()) |
89 | 92 |
90 def AsDict(self): | 93 def AsDict(self): |
91 """Converts a story object to a dict suitable for JSON output.""" | 94 """Converts a story object to a dict suitable for JSON output.""" |
92 d = { | 95 d = { |
93 'id': self._id, | 96 'id': self._id, |
94 } | 97 } |
95 if self._name: | 98 if self._name: |
96 d['name'] = self._name | 99 d['name'] = self._name |
97 return d | 100 return d |
98 | 101 |
(...skipping 24 matching lines...) Expand all Loading... |
123 def serving_dir(self): | 126 def serving_dir(self): |
124 """Returns the absolute path to a directory with hash files to data that | 127 """Returns the absolute path to a directory with hash files to data that |
125 should be updated from cloud storage, or None if no files need to be | 128 should be updated from cloud storage, or None if no files need to be |
126 updated. | 129 updated. |
127 """ | 130 """ |
128 return None | 131 return None |
129 | 132 |
130 @property | 133 @property |
131 def make_javascript_deterministic(self): | 134 def make_javascript_deterministic(self): |
132 return self._make_javascript_deterministic | 135 return self._make_javascript_deterministic |
OLD | NEW |