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

Side by Side Diff: tools/perf/list_system_health_stories

Issue 2422533003: [tools/perf] Add script that lists out all the system health stories (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import sys
7
8 from core import path_util
9 sys.path.insert(1, path_util.GetTelemetryDir()) # To resolve telemetry imports
10
11 import page_sets
12
perezju 2016/10/17 08:28:54 nit: these should be 2 blank lines.
nednguyen 2016/10/21 11:34:48 Done.
13 def IterAllSystemHealthStories():
14 for s in page_sets.SystemHealthStorySet(platform='desktop'):
15 yield s
16 for s in page_sets.SystemHealthStorySet(platform='mobile'):
17 if len(s.SUPPORTED_PLATFORMS) < 2:
18 yield s
perezju 2016/10/17 08:28:54 There are some stories that have support for both
nednguyen 2016/10/21 11:34:48 They are listed differently because the workflow a
perezju 2016/10/21 11:50:39 To me sounds like an implementation detail leaking
19
perezju 2016/10/17 08:28:54 nit: 2 blank lines
nednguyen 2016/10/21 11:34:48 Done.
20 def main():
21 system_health_stories = list(IterAllSystemHealthStories())
22 system_health_stories.sort(key=lambda s: s.name)
23 print '{0:60} {1}'.format('Story name', 'Supported platform')
24 print '-' * 79
25 for s in system_health_stories:
26 p = s.SUPPORTED_PLATFORMS
27 if len(p) == 2:
28 p = 'all'
29 else:
30 p = list(p)[0]
31 print '{0:60} {1}'.format(s.name, p)
32 return 0
33
34
35 if __name__ == '__main__':
36 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698