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.value.trace</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>.<a href="telemetry.value.html"><font color="#ffffff">value</font></a>.trace</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/value/trace.py">telemetry/value/trace.py</a></font></td></tr></table>
     13     <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
     14 #&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
     15 #&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;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>&nbsp;<br>
     20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     21     
     22 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
     24 <a href="catapult_base.cloud_storage.html">catapult_base.cloud_storage</a><br>
     25 <a href="datetime.html">datetime</a><br>
     26 <a href="telemetry.internal.util.file_handle.html">telemetry.internal.util.file_handle</a><br>
     27 </td><td width="25%" valign=top><a href="logging.html">logging</a><br>
     28 <a href="os.html">os</a><br>
     29 <a href="random.html">random</a><br>
     30 <a href="shutil.html">shutil</a><br>
     31 </td><td width="25%" valign=top><a href="sys.html">sys</a><br>
     32 <a href="tempfile.html">tempfile</a><br>
     33 <a href="tracing_build.trace2html.html">tracing_build.trace2html</a><br>
     34 <a href="telemetry.timeline.trace_data.html">telemetry.timeline.trace_data</a><br>
     35 </td><td width="25%" valign=top><a href="telemetry.value.html">telemetry.value</a><br>
     36 </td></tr></table></td></tr></table><p>
     37 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     38 <tr bgcolor="#ee77aa">
     39 <td colspan=3 valign=bottom>&nbsp;<br>
     40 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
     41     
     42 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     43 <td width="100%"><dl>
     44 <dt><font face="helvetica, arial"><a href="telemetry.value.html#Value">telemetry.value.Value</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
     45 </font></dt><dd>
     46 <dl>
     47 <dt><font face="helvetica, arial"><a href="telemetry.value.trace.html#TraceValue">TraceValue</a>
     48 </font></dt></dl>
     49 </dd>
     50 </dl>
     51  <p>
     52 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     53 <tr bgcolor="#ffc8d8">
     54 <td colspan=3 valign=bottom>&nbsp;<br>
     55 <font color="#000000" face="helvetica, arial"><a name="TraceValue">class <strong>TraceValue</strong></a>(<a href="telemetry.value.html#Value">telemetry.value.Value</a>)</font></td></tr>
     56     
     57 <tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     58 <td width="100%"><dl><dt>Method resolution order:</dt>
     59 <dd><a href="telemetry.value.trace.html#TraceValue">TraceValue</a></dd>
     60 <dd><a href="telemetry.value.html#Value">telemetry.value.Value</a></dd>
     61 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
     62 </dl>
     63 <hr>
     64 Methods defined here:<br>
     65 <dl><dt><a name="TraceValue-AsDict"><strong>AsDict</strong></a>(self)</dt></dl>
     66 
     67 <dl><dt><a name="TraceValue-CleanUp"><strong>CleanUp</strong></a>(self)</dt><dd><tt>Cleans&nbsp;up&nbsp;tempfile&nbsp;after&nbsp;it&nbsp;is&nbsp;no&nbsp;longer&nbsp;needed.<br>
     68 &nbsp;<br>
     69 A&nbsp;cleaned&nbsp;up&nbsp;<a href="#TraceValue">TraceValue</a>&nbsp;cannot&nbsp;be&nbsp;used&nbsp;for&nbsp;further&nbsp;operations.&nbsp;<a href="#TraceValue-CleanUp">CleanUp</a>()<br>
     70 may&nbsp;be&nbsp;called&nbsp;more&nbsp;than&nbsp;once&nbsp;without&nbsp;error.</tt></dd></dl>
     71 
     72 <dl><dt><a name="TraceValue-GetBuildbotDataType"><strong>GetBuildbotDataType</strong></a>(self, output_context)</dt></dl>
     73 
     74 <dl><dt><a name="TraceValue-GetBuildbotValue"><strong>GetBuildbotValue</strong></a>(self)</dt></dl>
     75 
     76 <dl><dt><a name="TraceValue-GetRepresentativeNumber"><strong>GetRepresentativeNumber</strong></a>(self)</dt></dl>
     77 
     78 <dl><dt><a name="TraceValue-GetRepresentativeString"><strong>GetRepresentativeString</strong></a>(self)</dt></dl>
     79 
     80 <dl><dt><a name="TraceValue-Serialize"><strong>Serialize</strong></a>(self, dir_path)</dt></dl>
     81 
     82 <dl><dt><a name="TraceValue-UploadToCloud"><strong>UploadToCloud</strong></a>(self, bucket)</dt></dl>
     83 
     84 <dl><dt><a name="TraceValue-__enter__"><strong>__enter__</strong></a>(self)</dt></dl>
     85 
     86 <dl><dt><a name="TraceValue-__exit__"><strong>__exit__</strong></a>(self, _, __, ___)</dt></dl>
     87 
     88 <dl><dt><a name="TraceValue-__init__"><strong>__init__</strong></a>(self, page, trace_data, important<font color="#909090">=False</font>, description<font color="#909090">=None</font>)</dt><dd><tt>A&nbsp;value&nbsp;that&nbsp;contains&nbsp;a&nbsp;TraceData&nbsp;object&nbsp;and&nbsp;knows&nbsp;how&nbsp;to<br>
     89 output&nbsp;it.<br>
     90 &nbsp;<br>
     91 Adding&nbsp;TraceValues&nbsp;and&nbsp;outputting&nbsp;as&nbsp;JSON&nbsp;will&nbsp;produce&nbsp;a&nbsp;directory&nbsp;full&nbsp;of<br>
     92 HTML&nbsp;files&nbsp;called&nbsp;trace_files.&nbsp;Outputting&nbsp;as&nbsp;chart&nbsp;JSON&nbsp;will&nbsp;also&nbsp;produce<br>
     93 an&nbsp;index,&nbsp;files.html,&nbsp;linking&nbsp;to&nbsp;each&nbsp;of&nbsp;these&nbsp;files.</tt></dd></dl>
     94 
     95 <dl><dt><a name="TraceValue-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
     96 
     97 <hr>
     98 Class methods defined here:<br>
     99 <dl><dt><a name="TraceValue-MergeLikeValuesFromDifferentPages"><strong>MergeLikeValuesFromDifferentPages</strong></a>(cls, values)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    100 
    101 <dl><dt><a name="TraceValue-MergeLikeValuesFromSamePage"><strong>MergeLikeValuesFromSamePage</strong></a>(cls, values)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
    102 
    103 <hr>
    104 Static methods defined here:<br>
    105 <dl><dt><a name="TraceValue-GetJSONTypeName"><strong>GetJSONTypeName</strong></a>()</dt></dl>
    106 
    107 <hr>
    108 Data descriptors defined here:<br>
    109 <dl><dt><strong>cleaned_up</strong></dt>
    110 </dl>
    111 <hr>
    112 Methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
    113 <dl><dt><a name="TraceValue-AsDictWithoutBaseClassEntries"><strong>AsDictWithoutBaseClassEntries</strong></a>(self)</dt></dl>
    114 
    115 <dl><dt><a name="TraceValue-GetChartAndTraceNameForComputedSummaryResult"><strong>GetChartAndTraceNameForComputedSummaryResult</strong></a>(self, trace_tag)</dt></dl>
    116 
    117 <dl><dt><a name="TraceValue-GetChartAndTraceNameForPerPageResult"><strong>GetChartAndTraceNameForPerPageResult</strong></a>(self)</dt></dl>
    118 
    119 <dl><dt><a name="TraceValue-IsMergableWith"><strong>IsMergableWith</strong></a>(self, that)</dt></dl>
    120 
    121 <dl><dt><a name="TraceValue-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
    122 
    123 <dl><dt><a name="TraceValue-__hash__"><strong>__hash__</strong></a>(self)</dt></dl>
    124 
    125 <hr>
    126 Static methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
    127 <dl><dt><a name="TraceValue-FromDict"><strong>FromDict</strong></a>(value_dict, page_dict)</dt><dd><tt>Produces&nbsp;a&nbsp;value&nbsp;from&nbsp;a&nbsp;value&nbsp;dict&nbsp;and&nbsp;a&nbsp;page&nbsp;dict.<br>
    128 &nbsp;<br>
    129 <a href="telemetry.value.html#Value">Value</a>&nbsp;dicts&nbsp;are&nbsp;produced&nbsp;by&nbsp;serialization&nbsp;to&nbsp;JSON,&nbsp;and&nbsp;must&nbsp;be&nbsp;accompanied<br>
    130 by&nbsp;a&nbsp;dict&nbsp;mapping&nbsp;page&nbsp;IDs&nbsp;to&nbsp;pages,&nbsp;also&nbsp;produced&nbsp;by&nbsp;serialization,&nbsp;in<br>
    131 order&nbsp;to&nbsp;be&nbsp;completely&nbsp;deserialized.&nbsp;If&nbsp;deserializing&nbsp;multiple&nbsp;values,&nbsp;use<br>
    132 ListOfValuesFromListOfDicts&nbsp;instead.<br>
    133 &nbsp;<br>
    134 value_dict:&nbsp;a&nbsp;dictionary&nbsp;produced&nbsp;by&nbsp;<a href="#TraceValue-AsDict">AsDict</a>()&nbsp;on&nbsp;a&nbsp;value&nbsp;subclass.<br>
    135 page_dict:&nbsp;a&nbsp;dictionary&nbsp;mapping&nbsp;IDs&nbsp;to&nbsp;page&nbsp;objects.</tt></dd></dl>
    136 
    137 <dl><dt><a name="TraceValue-GetConstructorKwArgs"><strong>GetConstructorKwArgs</strong></a>(value_dict, page_dict)</dt><dd><tt>Produces&nbsp;constructor&nbsp;arguments&nbsp;from&nbsp;a&nbsp;value&nbsp;dict&nbsp;and&nbsp;a&nbsp;page&nbsp;dict.<br>
    138 &nbsp;<br>
    139 Takes&nbsp;a&nbsp;dict&nbsp;parsed&nbsp;from&nbsp;JSON&nbsp;and&nbsp;an&nbsp;index&nbsp;of&nbsp;pages&nbsp;and&nbsp;recovers&nbsp;the<br>
    140 keyword&nbsp;arguments&nbsp;to&nbsp;be&nbsp;passed&nbsp;to&nbsp;the&nbsp;constructor&nbsp;for&nbsp;deserializing&nbsp;the<br>
    141 dict.<br>
    142 &nbsp;<br>
    143 value_dict:&nbsp;a&nbsp;dictionary&nbsp;produced&nbsp;by&nbsp;<a href="#TraceValue-AsDict">AsDict</a>()&nbsp;on&nbsp;a&nbsp;value&nbsp;subclass.<br>
    144 page_dict:&nbsp;a&nbsp;dictionary&nbsp;mapping&nbsp;IDs&nbsp;to&nbsp;page&nbsp;objects.</tt></dd></dl>
    145 
    146 <dl><dt><a name="TraceValue-ListOfValuesFromListOfDicts"><strong>ListOfValuesFromListOfDicts</strong></a>(value_dicts, page_dict)</dt><dd><tt>Takes&nbsp;a&nbsp;list&nbsp;of&nbsp;value&nbsp;dicts&nbsp;to&nbsp;values.<br>
    147 &nbsp;<br>
    148 Given&nbsp;a&nbsp;list&nbsp;of&nbsp;value&nbsp;dicts&nbsp;produced&nbsp;by&nbsp;AsDict,&nbsp;this&nbsp;method<br>
    149 deserializes&nbsp;the&nbsp;dicts&nbsp;given&nbsp;a&nbsp;dict&nbsp;mapping&nbsp;page&nbsp;IDs&nbsp;to&nbsp;pages.<br>
    150 This&nbsp;method&nbsp;performs&nbsp;memoization&nbsp;for&nbsp;deserializing&nbsp;a&nbsp;list&nbsp;of&nbsp;values<br>
    151 efficiently,&nbsp;where&nbsp;FromDict&nbsp;is&nbsp;meant&nbsp;to&nbsp;handle&nbsp;one-offs.<br>
    152 &nbsp;<br>
    153 values:&nbsp;a&nbsp;list&nbsp;of&nbsp;value&nbsp;dicts&nbsp;produced&nbsp;by&nbsp;<a href="#TraceValue-AsDict">AsDict</a>()&nbsp;on&nbsp;a&nbsp;value&nbsp;subclass.<br>
    154 page_dict:&nbsp;a&nbsp;dictionary&nbsp;mapping&nbsp;IDs&nbsp;to&nbsp;page&nbsp;objects.</tt></dd></dl>
    155 
    156 <hr>
    157 Data descriptors inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
    158 <dl><dt><strong>__dict__</strong></dt>
    159 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    160 </dl>
    161 <dl><dt><strong>__weakref__</strong></dt>
    162 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    163 </dl>
    164 <dl><dt><strong>name_suffix</strong></dt>
    165 <dd><tt>Returns&nbsp;the&nbsp;string&nbsp;after&nbsp;a&nbsp;.&nbsp;in&nbsp;the&nbsp;name,&nbsp;or&nbsp;the&nbsp;full&nbsp;name&nbsp;otherwise.</tt></dd>
    166 </dl>
    167 </td></tr></table></td></tr></table>
    168 </body></html>