1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.internal.story_runner</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.story_runner</strong></big></big></font></td 11><td align=right valign=bottom 12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/story_runner.py">telemetry/internal/story_runner.py</a></font></td></tr></table> 13 <p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#aa55cc"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.browser.browser_finder.html">telemetry.internal.browser.browser_finder</a><br> 24<a href="catapult_base.cloud_storage.html">catapult_base.cloud_storage</a><br> 25<a href="telemetry.internal.util.exception_formatter.html">telemetry.internal.util.exception_formatter</a><br> 26<a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> 27<a href="telemetry.value.failure.html">telemetry.value.failure</a><br> 28</td><td width="25%" valign=top><a href="logging.html">logging</a><br> 29<a href="optparse.html">optparse</a><br> 30<a href="os.html">os</a><br> 31<a href="telemetry.page.html">telemetry.page</a><br> 32<a href="telemetry.internal.actions.page_action.html">telemetry.internal.actions.page_action</a><br> 33</td><td width="25%" valign=top><a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> 34<a href="telemetry.internal.results.results_options.html">telemetry.internal.results.results_options</a><br> 35<a href="telemetry.value.skip.html">telemetry.value.skip</a><br> 36<a href="telemetry.story.html">telemetry.story</a><br> 37<a href="telemetry.web_perf.story_test.html">telemetry.web_perf.story_test</a><br> 38</td><td width="25%" valign=top><a href="sys.html">sys</a><br> 39<a href="time.html">time</a><br> 40<a href="telemetry.util.wpr_modes.html">telemetry.util.wpr_modes</a><br> 41</td></tr></table></td></tr></table><p> 42<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 43<tr bgcolor="#ee77aa"> 44<td colspan=3 valign=bottom> <br> 45<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 46 47<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 48<td width="100%"><dl> 49<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 50</font></dt><dd> 51<dl> 52<dt><font face="helvetica, arial"><a href="telemetry.internal.story_runner.html#StoryGroup">StoryGroup</a> 53</font></dt></dl> 54</dd> 55<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) 56</font></dt><dd> 57<dl> 58<dt><font face="helvetica, arial"><a href="telemetry.internal.story_runner.html#ArchiveError">ArchiveError</a> 59</font></dt></dl> 60</dd> 61</dl> 62 <p> 63<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 64<tr bgcolor="#ffc8d8"> 65<td colspan=3 valign=bottom> <br> 66<font color="#000000" face="helvetica, arial"><a name="ArchiveError">class <strong>ArchiveError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 67 68<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 69<td width="100%"><dl><dt>Method resolution order:</dt> 70<dd><a href="telemetry.internal.story_runner.html#ArchiveError">ArchiveError</a></dd> 71<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 72<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 73<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 74</dl> 75<hr> 76Data descriptors defined here:<br> 77<dl><dt><strong>__weakref__</strong></dt> 78<dd><tt>list of weak references to the object (if defined)</tt></dd> 79</dl> 80<hr> 81Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 82<dl><dt><a name="ArchiveError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 83 84<hr> 85Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 86<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#ArchiveError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 87 88<hr> 89Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 90<dl><dt><a name="ArchiveError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 91 92<dl><dt><a name="ArchiveError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 93 94<dl><dt><a name="ArchiveError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 95 96<dl><dt><a name="ArchiveError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 97 <br> 98Use of negative indices is not supported.</tt></dd></dl> 99 100<dl><dt><a name="ArchiveError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 101 102<dl><dt><a name="ArchiveError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 103 104<dl><dt><a name="ArchiveError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 105 106<dl><dt><a name="ArchiveError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 107 108<dl><dt><a name="ArchiveError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 109 110<dl><dt><a name="ArchiveError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 111 112<hr> 113Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 114<dl><dt><strong>__dict__</strong></dt> 115</dl> 116<dl><dt><strong>args</strong></dt> 117</dl> 118<dl><dt><strong>message</strong></dt> 119</dl> 120</td></tr></table> <p> 121<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 122<tr bgcolor="#ffc8d8"> 123<td colspan=3 valign=bottom> <br> 124<font color="#000000" face="helvetica, arial"><a name="StoryGroup">class <strong>StoryGroup</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 125 126<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 127<td width="100%">Methods defined here:<br> 128<dl><dt><a name="StoryGroup-AddStory"><strong>AddStory</strong></a>(self, story)</dt></dl> 129 130<dl><dt><a name="StoryGroup-__init__"><strong>__init__</strong></a>(self, shared_state_class)</dt></dl> 131 132<hr> 133Data descriptors defined here:<br> 134<dl><dt><strong>__dict__</strong></dt> 135<dd><tt>dictionary for instance variables (if defined)</tt></dd> 136</dl> 137<dl><dt><strong>__weakref__</strong></dt> 138<dd><tt>list of weak references to the object (if defined)</tt></dd> 139</dl> 140<dl><dt><strong>shared_state_class</strong></dt> 141</dl> 142<dl><dt><strong>stories</strong></dt> 143</dl> 144</td></tr></table></td></tr></table><p> 145<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 146<tr bgcolor="#eeaa77"> 147<td colspan=3 valign=bottom> <br> 148<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 149 150<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> 151<td width="100%"><dl><dt><a name="-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(parser)</dt></dl> 152 <dl><dt><a name="-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(parser, args)</dt></dl> 153 <dl><dt><a name="-Run"><strong>Run</strong></a>(test, story_set, finder_options, results, max_failures<font color="#909090">=None</font>)</dt><dd><tt>Runs a given test against a given page_set with the given options.<br> 154 <br> 155Stop execution for unexpected exceptions such as KeyboardInterrupt.<br> 156We "white list" certain exceptions for which the story runner<br> 157can continue running the remaining stories.</tt></dd></dl> 158 <dl><dt><a name="-RunBenchmark"><strong>RunBenchmark</strong></a>(benchmark, finder_options)</dt><dd><tt>Run this test with the given options.<br> 159 <br> 160Returns:<br> 161 The number of failure values (up to 254) or 255 if there is an uncaught<br> 162 exception.</tt></dd></dl> 163 <dl><dt><a name="-StoriesGroupedByStateClass"><strong>StoriesGroupedByStateClass</strong></a>(story_set, allow_multiple_groups)</dt><dd><tt>Returns a list of story groups which each contains stories with<br> 164the same shared_state_class.<br> 165 <br> 166Example:<br> 167 Assume A1, A2, A3 are stories with same shared story class, and<br> 168 similar for B1, B2.<br> 169 If their orders in story set is A1 A2 B1 B2 A3, then the grouping will<br> 170 be [A1 A2] [B1 B2] [A3].<br> 171 <br> 172It's purposefully done this way to make sure that order of<br> 173stories are the same of that defined in story_set. It's recommended that<br> 174stories with the same states should be arranged next to each others in<br> 175story sets to reduce the overhead of setting up & tearing down the<br> 176shared story state.</tt></dd></dl> 177</td></tr></table> 178</body></html>