Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: telemetry/telemetry/story/story.py

Issue 2153513002: [Telemetry] Ensure that story display names are unique (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: fix typo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « telemetry/telemetry/page/page_run_end_to_end_unittest.py ('k') | telemetry/telemetry/story/story_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698