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> <br> 10<font color="#ffffff" face="helvetica, arial"> <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 the command line, discovers the appropriate benchmarks, and runs them.<br> 14 <br> 15Handles benchmark configuration, but all the logic for<br> 16actually running the benchmark is in Benchmark and 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> <br> 21<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 22 23<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </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> <br> 43<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 44 45<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </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> <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> </tt></td> 63<td colspan=2><tt>Display help information about a command<br> </tt></td></tr> 64<tr><td> </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> 73Methods defined here:<br> 74<dl><dt><a name="Help-Run"><strong>Run</strong></a>(self, args)</dt></dl> 75 76<hr> 77Data and other attributes defined here:<br> 78<dl><dt><strong>usage</strong> = '[command]'</dl> 79 80<hr> 81Class 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 method to run this command as a standalone script.</tt></dd></dl> 89 90<hr> 91Class 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> 97Data 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 for instance variables (if defined)</tt></dd> 100</dl> 101<dl><dt><strong>__weakref__</strong></dt> 102<dd><tt>list of weak references to the object (if 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> <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> </tt></td> 111<td colspan=2><tt>Lists the available benchmarks<br> </tt></td></tr> 112<tr><td> </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> 121Methods defined here:<br> 122<dl><dt><a name="List-Run"><strong>Run</strong></a>(self, args)</dt></dl> 123 124<hr> 125Class 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> 133Data and other attributes defined here:<br> 134<dl><dt><strong>usage</strong> = '[benchmark_name] [<options>]'</dl> 135 136<hr> 137Class 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 method to run this command as a standalone script.</tt></dd></dl> 139 140<hr> 141Class 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> 147Data 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 for instance variables (if defined)</tt></dd> 150</dl> 151<dl><dt><strong>__weakref__</strong></dt> 152<dd><tt>list of weak references to the object (if 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> <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> </tt></td> 161<td colspan=2><tt><a href="#Run">Run</a> one or more benchmarks (default)<br> </tt></td></tr> 162<tr><td> </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> 171Methods defined here:<br> 172<dl><dt><a name="Run-Run"><strong>Run</strong></a>(self, args)</dt></dl> 173 174<hr> 175Class 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> 183Data and other attributes defined here:<br> 184<dl><dt><strong>usage</strong> = 'benchmark_name [page_set] [<options>]'</dl> 185 186<hr> 187Class 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 method to run this command as a standalone script.</tt></dd></dl> 189 190<hr> 191Class 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> 197Data 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 for instance variables (if defined)</tt></dd> 200</dl> 201<dl><dt><strong>__weakref__</strong></dt> 202<dd><tt>list of weak references to the object (if 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> <br> 208<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 209 210<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </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">=<open file '<stdout>', mode 'w'></font>)</dt><dd><tt>Print benchmarks that are not filtered in the same order of benchmarks in<br> 213the |benchmarks| list.<br> 214 <br> 215Args:<br> 216 benchmarks: the list of benchmarks to be printed (in the same order of the<br> 217 list).<br> 218 possible_browser: the possible_browser instance that's used for checking<br> 219 which benchmarks are enabled.<br> 220 output_pipe: the stream in which benchmarks are printed on.</tt></dd></dl> 221 <dl><dt><a name="-main"><strong>main</strong></a>(environment)</dt></dl> 222</td></tr></table> 223</body></html>