Home | History | Annotate | Download | only in pydoc
      1 
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      3 <html><head><title>Python: module telemetry.benchmark_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>&nbsp;<br>
     10 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.benchmark_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/benchmark_runner.py">telemetry/benchmark_runner.py</a></font></td></tr></table>
     13     <p><tt>Parses&nbsp;the&nbsp;command&nbsp;line,&nbsp;discovers&nbsp;the&nbsp;appropriate&nbsp;benchmarks,&nbsp;and&nbsp;runs&nbsp;them.<br>
     14 &nbsp;<br>
     15 Handles&nbsp;benchmark&nbsp;configuration,&nbsp;but&nbsp;all&nbsp;the&nbsp;logic&nbsp;for<br>
     16 actually&nbsp;running&nbsp;the&nbsp;benchmark&nbsp;is&nbsp;in&nbsp;Benchmark&nbsp;and&nbsp;PageRunner.</tt></p>
     17 <p>
     18 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     19 <tr bgcolor="#aa55cc">
     20 <td colspan=3 valign=bottom>&nbsp;<br>
     21 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     22     
     23 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     24 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.benchmark.html">telemetry.benchmark</a><br>
     25 <a href="telemetry.internal.util.binary_manager.html">telemetry.internal.util.binary_manager</a><br>
     26 <a href="telemetry.internal.browser.browser_finder.html">telemetry.internal.browser.browser_finder</a><br>
     27 <a href="telemetry.internal.browser.browser_options.html">telemetry.internal.browser.browser_options</a><br>
     28 </td><td width="25%" valign=top><a href="telemetry.internal.util.command_line.html">telemetry.internal.util.command_line</a><br>
     29 <a href="telemetry.decorators.html">telemetry.decorators</a><br>
     30 <a href="telemetry.core.discover.html">telemetry.core.discover</a><br>
     31 <a href="hashlib.html">hashlib</a><br>
     32 </td><td width="25%" valign=top><a href="inspect.html">inspect</a><br>
     33 <a href="json.html">json</a><br>
     34 <a href="logging.html">logging</a><br>
     35 <a href="os.html">os</a><br>
     36 </td><td width="25%" valign=top><a href="telemetry.project_config.html">telemetry.project_config</a><br>
     37 <a href="telemetry.internal.util.ps_util.html">telemetry.internal.util.ps_util</a><br>
     38 <a href="sys.html">sys</a><br>
     39 </td></tr></table></td></tr></table><p>
     40 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     41 <tr bgcolor="#ee77aa">
     42 <td colspan=3 valign=bottom>&nbsp;<br>
     43 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
     44     
     45 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     46 <td width="100%"><dl>
     47 <dt><font face="helvetica, arial"><a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>(<a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a>)
     48 </font></dt><dd>
     49 <dl>
     50 <dt><font face="helvetica, arial"><a href="telemetry.benchmark_runner.html#Help">Help</a>
     51 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.benchmark_runner.html#List">List</a>
     52 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.benchmark_runner.html#Run">Run</a>
     53 </font></dt></dl>
     54 </dd>
     55 </dl>
     56  <p>
     57 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     58 <tr bgcolor="#ffc8d8">
     59 <td colspan=3 valign=bottom>&nbsp;<br>
     60 <font color="#000000" face="helvetica, arial"><a name="Help">class <strong>Help</strong></a>(<a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>)</font></td></tr>
     61     
     62 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
     63 <td colspan=2><tt>Display&nbsp;help&nbsp;information&nbsp;about&nbsp;a&nbsp;command<br>&nbsp;</tt></td></tr>
     64 <tr><td>&nbsp;</td>
     65 <td width="100%"><dl><dt>Method resolution order:</dt>
     66 <dd><a href="telemetry.benchmark_runner.html#Help">Help</a></dd>
     67 <dd><a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a></dd>
     68 <dd><a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a></dd>
     69 <dd><a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a></dd>
     70 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
     71 </dl>
     72 <hr>
     73 Methods defined here:<br>
     74 <dl><dt><a name="Help-Run"><strong>Run</strong></a>(self, args)</dt></dl>
     75 
     76 <hr>
     77 Data and other attributes defined here:<br>
     78 <dl><dt><strong>usage</strong> = '[command]'</dl>
     79 
     80 <hr>
     81 Class methods inherited from <a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>:<br>
     82 <dl><dt><a name="Help-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(cls, parser, environment)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
     83 
     84 <dl><dt><a name="Help-CreateParser"><strong>CreateParser</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
     85 
     86 <dl><dt><a name="Help-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(cls, parser, args, environment)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
     87 
     88 <dl><dt><a name="Help-main"><strong>main</strong></a>(cls, args<font color="#909090">=None</font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Main&nbsp;method&nbsp;to&nbsp;run&nbsp;this&nbsp;command&nbsp;as&nbsp;a&nbsp;standalone&nbsp;script.</tt></dd></dl>
     89 
     90 <hr>
     91 Class methods inherited from <a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a>:<br>
     92 <dl><dt><a name="Help-Description"><strong>Description</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
     93 
     94 <dl><dt><a name="Help-Name"><strong>Name</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
     95 
     96 <hr>
     97 Data descriptors inherited from <a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a>:<br>
     98 <dl><dt><strong>__dict__</strong></dt>
     99 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    100 </dl>
    101 <dl><dt><strong>__weakref__</strong></dt>
    102 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    103 </dl>
    104 </td></tr></table> <p>
    105 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    106 <tr bgcolor="#ffc8d8">
    107 <td colspan=3 valign=bottom>&nbsp;<br>
    108 <font color="#000000" face="helvetica, arial"><a name="List">class <strong>List</strong></a>(<a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>)</font></td></tr>
    109     
    110 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
    111 <td colspan=2><tt>Lists&nbsp;the&nbsp;available&nbsp;benchmarks<br>&nbsp;</tt></td></tr>
    112 <tr><td>&nbsp;</td>
    113 <td width="100%"><dl><dt>Method resolution order:</dt>
    114 <dd><a href="telemetry.benchmark_runner.html#List">List</a></dd>
    115 <dd><a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a></dd>
    116 <dd><a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a></dd>
    117 <dd><a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a></dd>
    118 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
    119 </dl>
    120 <hr>
    121 Methods defined here:<br>
    122 <dl><dt><a name="List-Run"><strong>Run</strong></a>(self, args)</dt></dl>
    123 
    124 <hr>
    125 Class methods defined here:<br>
    126 <dl><dt><a name="List-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(cls, parser, _)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    127 
    128 <dl><dt><a name="List-CreateParser"><strong>CreateParser</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    129 
    130 <dl><dt><a name="List-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(cls, parser, args, environment)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    131 
    132 <hr>
    133 Data and other attributes defined here:<br>
    134 <dl><dt><strong>usage</strong> = '[benchmark_name] [&lt;options&gt;]'</dl>
    135 
    136 <hr>
    137 Class methods inherited from <a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>:<br>
    138 <dl><dt><a name="List-main"><strong>main</strong></a>(cls, args<font color="#909090">=None</font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Main&nbsp;method&nbsp;to&nbsp;run&nbsp;this&nbsp;command&nbsp;as&nbsp;a&nbsp;standalone&nbsp;script.</tt></dd></dl>
    139 
    140 <hr>
    141 Class methods inherited from <a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a>:<br>
    142 <dl><dt><a name="List-Description"><strong>Description</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    143 
    144 <dl><dt><a name="List-Name"><strong>Name</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    145 
    146 <hr>
    147 Data descriptors inherited from <a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a>:<br>
    148 <dl><dt><strong>__dict__</strong></dt>
    149 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    150 </dl>
    151 <dl><dt><strong>__weakref__</strong></dt>
    152 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    153 </dl>
    154 </td></tr></table> <p>
    155 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    156 <tr bgcolor="#ffc8d8">
    157 <td colspan=3 valign=bottom>&nbsp;<br>
    158 <font color="#000000" face="helvetica, arial"><a name="Run">class <strong>Run</strong></a>(<a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>)</font></td></tr>
    159     
    160 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
    161 <td colspan=2><tt><a href="#Run">Run</a>&nbsp;one&nbsp;or&nbsp;more&nbsp;benchmarks&nbsp;(default)<br>&nbsp;</tt></td></tr>
    162 <tr><td>&nbsp;</td>
    163 <td width="100%"><dl><dt>Method resolution order:</dt>
    164 <dd><a href="telemetry.benchmark_runner.html#Run">Run</a></dd>
    165 <dd><a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a></dd>
    166 <dd><a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a></dd>
    167 <dd><a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a></dd>
    168 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
    169 </dl>
    170 <hr>
    171 Methods defined here:<br>
    172 <dl><dt><a name="Run-Run"><strong>Run</strong></a>(self, args)</dt></dl>
    173 
    174 <hr>
    175 Class methods defined here:<br>
    176 <dl><dt><a name="Run-AddCommandLineArgs"><strong>AddCommandLineArgs</strong></a>(cls, parser, environment)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    177 
    178 <dl><dt><a name="Run-CreateParser"><strong>CreateParser</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    179 
    180 <dl><dt><a name="Run-ProcessCommandLineArgs"><strong>ProcessCommandLineArgs</strong></a>(cls, parser, args, environment)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    181 
    182 <hr>
    183 Data and other attributes defined here:<br>
    184 <dl><dt><strong>usage</strong> = 'benchmark_name [page_set] [&lt;options&gt;]'</dl>
    185 
    186 <hr>
    187 Class methods inherited from <a href="telemetry.internal.util.command_line.html#OptparseCommand">telemetry.internal.util.command_line.OptparseCommand</a>:<br>
    188 <dl><dt><a name="Run-main"><strong>main</strong></a>(cls, args<font color="#909090">=None</font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Main&nbsp;method&nbsp;to&nbsp;run&nbsp;this&nbsp;command&nbsp;as&nbsp;a&nbsp;standalone&nbsp;script.</tt></dd></dl>
    189 
    190 <hr>
    191 Class methods inherited from <a href="telemetry.internal.util.command_line.html#Command">telemetry.internal.util.command_line.Command</a>:<br>
    192 <dl><dt><a name="Run-Description"><strong>Description</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    193 
    194 <dl><dt><a name="Run-Name"><strong>Name</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    195 
    196 <hr>
    197 Data descriptors inherited from <a href="telemetry.internal.util.command_line.html#ArgumentHandlerMixIn">telemetry.internal.util.command_line.ArgumentHandlerMixIn</a>:<br>
    198 <dl><dt><strong>__dict__</strong></dt>
    199 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    200 </dl>
    201 <dl><dt><strong>__weakref__</strong></dt>
    202 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    203 </dl>
    204 </td></tr></table></td></tr></table><p>
    205 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    206 <tr bgcolor="#eeaa77">
    207 <td colspan=3 valign=bottom>&nbsp;<br>
    208 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    209     
    210 <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
    211 <td width="100%"><dl><dt><a name="-GetBenchmarkByName"><strong>GetBenchmarkByName</strong></a>(name, environment)</dt></dl>
    212  <dl><dt><a name="-PrintBenchmarkList"><strong>PrintBenchmarkList</strong></a>(benchmarks, possible_browser, output_pipe<font color="#909090">=&lt;open file '&lt;stdout&gt;', mode 'w'&gt;</font>)</dt><dd><tt>Print&nbsp;benchmarks&nbsp;that&nbsp;are&nbsp;not&nbsp;filtered&nbsp;in&nbsp;the&nbsp;same&nbsp;order&nbsp;of&nbsp;benchmarks&nbsp;in<br>
    213 the&nbsp;|benchmarks|&nbsp;list.<br>
    214 &nbsp;<br>
    215 Args:<br>
    216 &nbsp;&nbsp;benchmarks:&nbsp;the&nbsp;list&nbsp;of&nbsp;benchmarks&nbsp;to&nbsp;be&nbsp;printed&nbsp;(in&nbsp;the&nbsp;same&nbsp;order&nbsp;of&nbsp;the<br>
    217 &nbsp;&nbsp;&nbsp;&nbsp;list).<br>
    218 &nbsp;&nbsp;possible_browser:&nbsp;the&nbsp;possible_browser&nbsp;instance&nbsp;that's&nbsp;used&nbsp;for&nbsp;checking<br>
    219 &nbsp;&nbsp;&nbsp;&nbsp;which&nbsp;benchmarks&nbsp;are&nbsp;enabled.<br>
    220 &nbsp;&nbsp;output_pipe:&nbsp;the&nbsp;stream&nbsp;in&nbsp;which&nbsp;benchmarks&nbsp;are&nbsp;printed&nbsp;on.</tt></dd></dl>
    221  <dl><dt><a name="-main"><strong>main</strong></a>(environment)</dt></dl>
    222 </td></tr></table>
    223 </body></html>