<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.internal.story_runner</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<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
><td align=right valign=bottom
><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>
<p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br>
# Use of this source code is governed by a BSD-style license that can be<br>
# found in the LICENSE file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<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>
<a href="catapult_base.cloud_storage.html">catapult_base.cloud_storage</a><br>
<a href="telemetry.internal.util.exception_formatter.html">telemetry.internal.util.exception_formatter</a><br>
<a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br>
<a href="telemetry.value.failure.html">telemetry.value.failure</a><br>
</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
<a href="optparse.html">optparse</a><br>
<a href="os.html">os</a><br>
<a href="telemetry.page.html">telemetry.page</a><br>
<a href="telemetry.internal.actions.page_action.html">telemetry.internal.actions.page_action</a><br>
</td><td width="25%" valign=top><a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br>
<a href="telemetry.internal.results.results_options.html">telemetry.internal.results.results_options</a><br>
<a href="telemetry.value.skip.html">telemetry.value.skip</a><br>
<a href="telemetry.story.html">telemetry.story</a><br>
<a href="telemetry.web_perf.story_test.html">telemetry.web_perf.story_test</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="time.html">time</a><br>
<a href="telemetry.util.wpr_modes.html">telemetry.util.wpr_modes</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.internal.story_runner.html#StoryGroup">StoryGroup</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.internal.story_runner.html#ArchiveError">ArchiveError</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<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>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="telemetry.internal.story_runner.html#ArchiveError">ArchiveError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<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>
<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<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>
<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<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>
<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>
<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>
<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>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="ArchiveError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
<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>
<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>
<dl><dt><a name="ArchiveError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
<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>
<dl><dt><a name="ArchiveError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<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>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="StoryGroup-AddStory"><strong>AddStory</strong></a>(self, story)</dt></dl>
<dl><dt><a name="StoryGroup-__init__"><strong>__init__</strong></a>(self, shared_state_class)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<dl><dt><strong>shared_state_class</strong></dt>
</dl>
<dl><dt><strong>stories</strong></dt>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(parser)</dt></dl>
<dl><dt><a name="-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(parser, args)</dt></dl>
<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>
<br>
Stop execution for unexpected exceptions such as KeyboardInterrupt.<br>
We "white list" certain exceptions for which the story runner<br>
can continue running the remaining stories.</tt></dd></dl>
<dl><dt><a name="-RunBenchmark"><strong>RunBenchmark</strong></a>(benchmark, finder_options)</dt><dd><tt>Run this test with the given options.<br>
<br>
Returns:<br>
The number of failure values (up to 254) or 255 if there is an uncaught<br>
exception.</tt></dd></dl>
<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>
the same shared_state_class.<br>
<br>
Example:<br>
Assume A1, A2, A3 are stories with same shared story class, and<br>
similar for B1, B2.<br>
If their orders in story set is A1 A2 B1 B2 A3, then the grouping will<br>
be [A1 A2] [B1 B2] [A3].<br>
<br>
It's purposefully done this way to make sure that order of<br>
stories are the same of that defined in story_set. It's recommended that<br>
stories with the same states should be arranged next to each others in<br>
story sets to reduce the overhead of setting up & tearing down the<br>
shared story state.</tt></dd></dl>
</td></tr></table>
</body></html>