Commit aaf788fb authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

tools/perf: Expose system health story iterator.

This allows, for example, benchmarks in tools/perf/contrib to use
subsets of the system health stories.

Change-Id: I102722c6c4414e3d3921b288debd2db6a265c04d
Reviewed-on: https://chromium-review.googlesource.com/1125843Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572558}
parent 0790a915
......@@ -25,7 +25,7 @@ class SystemHealthStorySet(story.StorySet):
assert platform in platforms.ALL_PLATFORMS
for story_class in _IterAllSystemHealthStoryClasses():
for story_class in IterAllSystemHealthStoryClasses():
if (story_class.ABSTRACT_STORY or
platform not in story_class.SUPPORTED_PLATFORMS or
case and not story_class.NAME.startswith(case + ':')):
......@@ -67,7 +67,12 @@ class MobileSystemHealthStorySet(SystemHealthStorySet):
'mobile', take_memory_measurement=False)
def _IterAllSystemHealthStoryClasses():
def IterAllSystemHealthStoryClasses():
"""Generator for system health stories.
Yields:
All appropriate SystemHealthStory subclasses defining stories.
"""
start_dir = os.path.dirname(os.path.abspath(__file__))
# Sort the classes by their names so that their order is stable and
# deterministic.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment