OLD | NEW |
---|---|
(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()) | |
OLD | NEW |