telemetry.story.story_set | index telemetry/story/story_set.py

`# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |
telemetry.wpr.archive_info | inspect | os | telemetry.story.story

Classes
`` |  | __builtin__.object StorySet
class StorySet(__builtin__.object)
`` | `A collection of stories. A typical usage of StorySet would be to subclass it and then call AddStory for each Story.`
| Methods defined here: AddStory(self, story) RemoveStory(self, story) `Removes a Story. Allows the stories to be filtered.` WprFilePathForStory(self, story) `Convenient function to retrieve WPR archive file path. Args: story: The Story to look up. Returns: The WPR archive file path for the given Story, if found. Otherwise, None.` __getitem__(self, key) __init__(self, archive_data_file='', cloud_storage_bucket=None, base_dir=None, serving_dirs=None) `Creates a new StorySet. Args: archive_data_file: The path to Web Page Replay's archive data, relative to self.base_dir. cloud_storage_bucket: The cloud storage bucket used to download Web Page Replay's archive data. Valid values are: None, story.PUBLIC_BUCKET, story.PARTNER_BUCKET, or story.INTERNAL_BUCKET (defined in telemetry.util.cloud_storage). serving_dirs: A set of paths, relative to self.base_dir, to directories containing hash files for non-wpr archive data stored in cloud storage.` __iter__(self) __len__(self) __setitem__(self, key, value) Class methods defined here: Description(cls) from __builtin__.type `Return a string explaining in human-understandable terms what this story represents. Note that this should be a classmethod so the benchmark_runner script can display stories' names along with their descriptions in the list command.` Name(cls) from __builtin__.type `Returns the string name of this StorySet. Note that this should be a classmethod so the benchmark_runner script can match the story class with its name specified in the run command: 'Run <User story test name> <User story class name>'` Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` allow_mixed_story_states `True iff Stories are allowed to have different StoryState classes. There are no checks in place for determining if SharedStates are being assigned correctly to all Stories in a given StorySet. The majority of test cases should not need the ability to have multiple SharedStates, which usually implies you should be writing multiple benchmarks instead. We provide errors to avoid accidentally assigning or defaulting to the wrong SharedState. Override at your own risk. Here be dragons.` archive_data_file base_dir `The base directory to resolve archive_data_file. This defaults to the directory containing the StorySet instance's class.` bucket file_path serving_dirs wpr_archive_info `Lazily constructs wpr_archive_info if it's not set and returns it.`